Package org.apache.archiva.redback.users
Class AbstractUserQuery
- java.lang.Object
-
- org.apache.archiva.redback.users.AbstractUserQuery
-
- All Implemented Interfaces:
UserQuery
- Direct Known Subclasses:
LdapUserQuery
,SimpleUserQuery
public abstract class AbstractUserQuery extends Object implements UserQuery
Abstract Implementation of UserQuery. Intended to be subclassed by UserManager providers.
-
-
Field Summary
-
Fields inherited from interface org.apache.archiva.redback.users.UserQuery
ALLOWED_ORDER_FIELDS, ORDER_BY_EMAIL, ORDER_BY_FULLNAME, ORDER_BY_USERNAME
-
-
Constructor Summary
Constructors Constructor Description AbstractUserQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEmail()
Returns the case insensitive substring email criteria.long
getFirstResult()
Returns the index (zero based) of the first result to include.String
getFullName()
Returns the case insensitive substring full name criteria.long
getMaxResults()
Returns the maximum number of users to return.String
getOrderBy()
Returns the property used to order the results of this query.String
getUsername()
Returns the case insensitive substring user name criteria.boolean
isAscending()
Returns true if the results should be returned in ascending order.void
setAscending(boolean ascending)
Set this to true if the results should be returned in ascending order.void
setEmail(String email)
Sets the case insensitive substring email criteria.void
setFirstResult(int firstResult)
Sets the index (zero based) of the first result to include.void
setFullName(String fullName)
Sets the case insensitive substring full name criteria.void
setMaxResults(int maxResults)
Sets the maximum number of users to return.void
setOrderBy(String orderBy)
Sets the property used to order the results of this query.void
setUsername(String userName)
Sets the case insensitive substring user name criteria.
-
-
-
Constructor Detail
-
AbstractUserQuery
public AbstractUserQuery()
-
-
Method Detail
-
getUsername
public String getUsername()
Description copied from interface:UserQuery
Returns the case insensitive substring user name criteria.- Specified by:
getUsername
in interfaceUserQuery
- Returns:
- the username criteria.
-
setUsername
public void setUsername(String userName)
Description copied from interface:UserQuery
Sets the case insensitive substring user name criteria.- Specified by:
setUsername
in interfaceUserQuery
- Parameters:
userName
- the username criteria
-
getFullName
public String getFullName()
Description copied from interface:UserQuery
Returns the case insensitive substring full name criteria.- Specified by:
getFullName
in interfaceUserQuery
- Returns:
- the username criteria.
-
setFullName
public void setFullName(String fullName)
Description copied from interface:UserQuery
Sets the case insensitive substring full name criteria.- Specified by:
setFullName
in interfaceUserQuery
- Parameters:
fullName
- the full name criteria
-
getEmail
public String getEmail()
Description copied from interface:UserQuery
Returns the case insensitive substring email criteria.
-
setEmail
public void setEmail(String email)
Description copied from interface:UserQuery
Sets the case insensitive substring email criteria.
-
getFirstResult
public long getFirstResult()
Description copied from interface:UserQuery
Returns the index (zero based) of the first result to include. Useful for paging.- Specified by:
getFirstResult
in interfaceUserQuery
- Returns:
- the first index
-
setFirstResult
public void setFirstResult(int firstResult)
Description copied from interface:UserQuery
Sets the index (zero based) of the first result to include. Useful for paging.- Specified by:
setFirstResult
in interfaceUserQuery
- Parameters:
firstResult
- the first index
-
getMaxResults
public long getMaxResults()
Description copied from interface:UserQuery
Returns the maximum number of users to return.- Specified by:
getMaxResults
in interfaceUserQuery
- Returns:
- the maximum number of users to return.
-
setMaxResults
public void setMaxResults(int maxResults)
Description copied from interface:UserQuery
Sets the maximum number of users to return.- Specified by:
setMaxResults
in interfaceUserQuery
- Parameters:
maxResults
- the maximum number of users to return.
-
getOrderBy
public String getOrderBy()
Description copied from interface:UserQuery
Returns the property used to order the results of this query. This is one ofUserQuery.ORDER_BY_USERNAME
,UserQuery.ORDER_BY_FULLNAME
orUserQuery.ORDER_BY_EMAIL
.- Specified by:
getOrderBy
in interfaceUserQuery
- Returns:
- the order property.
-
setOrderBy
public void setOrderBy(String orderBy)
Description copied from interface:UserQuery
Sets the property used to order the results of this query. This is one ofUserQuery.ORDER_BY_USERNAME
,UserQuery.ORDER_BY_FULLNAME
orUserQuery.ORDER_BY_EMAIL
.- Specified by:
setOrderBy
in interfaceUserQuery
- Parameters:
orderBy
- the order property.
-
isAscending
public boolean isAscending()
Description copied from interface:UserQuery
Returns true if the results should be returned in ascending order.- Specified by:
isAscending
in interfaceUserQuery
- Returns:
- ascending
-
setAscending
public void setAscending(boolean ascending)
Description copied from interface:UserQuery
Set this to true if the results should be returned in ascending order.- Specified by:
setAscending
in interfaceUserQuery
- Parameters:
ascending
- true if the results should be returned in ascending
-
-