public class PersonCriteria extends PagingCriteria
loginNamePattern
, detailPattern
). If an attribute is set to
null
(which is the default value) this attribute will not be considered during the
filtering process.
Note that by default only active users are returned. If you need to list only the disabled users,
set the active
property to false
, if both active and disabled users are needed,
set the property to null
.
PagingCriteria.DynamicOrdering
Constructor and Description |
---|
PersonCriteria()
Creates new instance with disabled paging.
|
PersonCriteria(int count)
Creates new instance with enabled paging and given result count.
|
PersonCriteria(int index,
int count)
Creates new instance with enabled paging and given index and result count.
|
Modifier and Type | Method and Description |
---|---|
String |
getDetailPattern(String detailName)
Returns the string pattern of a person detail identified by given detail name, or
null if the detail with given name does not exist. |
Map<String,String> |
getDetailPatterns()
Returns a map of person detail patterns.
|
String |
getEmailPattern()
Returns the email pattern.
|
Boolean |
getEnabled() |
Collection<String> |
getExcludePersonIds()
Returns the exclude person ids collection.
|
String |
getFirstNamePattern()
Returns the first name pattern.
|
String |
getFullNameAndLoginPattern() |
String |
getId() |
Collection<String> |
getIncludePersonIds()
Returns the include person ids collection.
|
RoleUnitName |
getInRole()
Returns the in role constraint.
|
String |
getLastNamePattern()
Returns the last name pattern.
|
String |
getLoginNamePattern()
Returns the string pattern used to filter persons by their login name.
|
PersonOrdering |
getOrdering()
Returns the ordering.
|
String |
getPhonePattern()
Returns the phone pattern.
|
Boolean |
isActive()
Returns the active flag used to filter persons according to their active state.
|
boolean |
isFirstNamePatternCaseInsensitive()
Returns
true if the first name pattern is case insensitive. |
boolean |
isFullNameAndLoginPatternCaseInsensitive() |
boolean |
isIncludeSubstitution()
Returns whether to include substitution information (default false).
|
boolean |
isLastNamePatternCaseInsensitive()
Returns
true if the last name pattern is case insensitive. |
boolean |
isLoginNamePatternCaseInsensitive()
Returns
true if the login pattern is case insensitive. |
void |
setActive(Boolean active)
Sets the active flag used to filter persons according to their active state.
|
PersonCriteria |
setDetailPattern(String detailName,
String detailPattern)
Sets the string pattern of a person detail identified by given detail name.
|
void |
setEmailPattern(String emailPattern)
Sets the email pattern.
|
void |
setEnabled(Boolean value) |
void |
setExcludeLoginNames(Collection<String> excludePersonIds)
Sets the exclude person ids collection.
|
void |
setFirstNamePattern(String firstNamePattern)
Sets the first name pattern.
|
void |
setFirstNamePatternCaseInsensitive(boolean firstNamePatternCaseInsensitive)
Specifies whether the first name pattern filtering is case insensitive.
|
void |
setFullNameAndLoginPattern(String fullNameAndLoginPattern) |
void |
setFullNameAndLoginPatternCaseInsensitive(boolean fullNameAndLoginPatternCaseInsensitive) |
void |
setId(String id) |
void |
setIncludePersonIds(Collection<String> includePersonIds)
Sets the include person ids collection.
|
void |
setIncludeSubstitution(boolean includeSubstitution)
Sets whether to include substitution information (default false).
|
void |
setInRole(RoleUnitName role)
Sets the in role constraint.
|
void |
setLastNamePattern(String lastNamePattern)
Sets the last name pattern.
|
void |
setLastNamePatternCaseInsensitive(boolean lastNamePatternCaseInsensitive)
Specifies whether the last name pattern filtering is case insensitive.
|
void |
setLoginNamePattern(String loginNamePattern)
Sets the string pattern used to filter persons by their login name.
|
void |
setLoginNamePatternCaseInsensitive(boolean loginNamePatternCaseInsensitive)
Specifies whether the login pattern filtering is case insensitive.
|
void |
setOrdering(PersonColumn column)
Sets the ascending ordering for the given column.
|
void |
setOrdering(PersonColumn column,
OrderDirection direction)
Sets the ordering using the given column and direction.
|
void |
setOrdering(PersonOrdering ordering)
Sets the ordering.
|
void |
setPhonePattern(String phonePattern)
Sets the phone pattern.
|
String |
toString() |
getCount, getDynamicOrdering, getFilters, getIndex, isPaged, setCount, setDynamicOrdering, setFilters, setIndex
public PersonCriteria()
public PersonCriteria(int count)
count
- The maximum number of results to retrieve.public PersonCriteria(int index, int count)
index
- The position of the first result to retrieve.count
- The maximum number of results to retrieve.public String getLoginNamePattern()
null
if this
pattern is not set.public Boolean isActive()
public void setLoginNamePattern(String loginNamePattern)
loginNamePattern
- The string pattern used to filter persons by their login name.public boolean isLoginNamePatternCaseInsensitive()
true
if the login pattern is case insensitive.true
if the login pattern is case insensitivepublic void setLoginNamePatternCaseInsensitive(boolean loginNamePatternCaseInsensitive)
loginNamePatternCaseInsensitive
- public String getFirstNamePattern()
public void setFirstNamePattern(String firstNamePattern)
firstNamePattern
- public boolean isFirstNamePatternCaseInsensitive()
true
if the first name pattern is case insensitive.true
if the first name pattern is case insensitivepublic void setFirstNamePatternCaseInsensitive(boolean firstNamePatternCaseInsensitive)
firstNamePatternCaseInsensitive
- public String getLastNamePattern()
public void setLastNamePattern(String lastNamePattern)
lastNamePattern
- public boolean isLastNamePatternCaseInsensitive()
true
if the last name pattern is case insensitive.true
if the last name pattern is case insensitivepublic void setLastNamePatternCaseInsensitive(boolean lastNamePatternCaseInsensitive)
lastNamePatternCaseInsensitive
- public String getEmailPattern()
public void setEmailPattern(String emailPattern)
emailPattern
- public String getPhonePattern()
public void setPhonePattern(String phonePattern)
phonePattern
- public void setActive(Boolean active)
active
- public Map<String,String> getDetailPatterns()
public String getDetailPattern(String detailName)
null
if the detail with given name does not exist.detailName
- The name of a person detail. Cannot be null
.null
if the detail with given name does not exist.NullPointerException
- (unchecked) If the detailName
argument is null
.public PersonCriteria setDetailPattern(String detailName, String detailPattern)
detailName
- The name of a person detail. Cannot be null
.detailPattern
- The string pattern of given person detail. If set to null
, the detail
pattern with given name will be removed from the detail patterns.PersonCriteria
instance.NullPointerException
- (unchecked) If the detailName
argument is null
.public Collection<String> getIncludePersonIds()
public Collection<String> getExcludePersonIds()
public void setIncludePersonIds(Collection<String> includePersonIds)
includePersonIds
- public void setExcludeLoginNames(Collection<String> excludePersonIds)
excludePersonIds
- public RoleUnitName getInRole()
public void setInRole(RoleUnitName role)
role
- public boolean isIncludeSubstitution()
public void setIncludeSubstitution(boolean includeSubstitution)
includeSubstitution
- public PersonOrdering getOrdering()
public void setOrdering(PersonOrdering ordering)
ordering
- public void setOrdering(PersonColumn column)
column
- public void setOrdering(PersonColumn column, OrderDirection direction)
column
- direction
- public void setId(String id)
public String getId()
public void setEnabled(Boolean value)
public Boolean getEnabled()
public String getFullNameAndLoginPattern()
public void setFullNameAndLoginPattern(String fullNameAndLoginPattern)
public boolean isFullNameAndLoginPatternCaseInsensitive()
public void setFullNameAndLoginPatternCaseInsensitive(boolean fullNameAndLoginPatternCaseInsensitive)
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.