public class UserQueryParameters extends PropertyQueryParameters
QueryParameters.OrderDirection
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_LAST_MODIFICATION_DATE
the parameter name for the last modification date
|
static String |
PARAM_TAG_PREFIX
the parameter for tag prefix filtering
|
static String |
PARAM_USER_ROLE_FILTER |
static String |
PLACEHOLDER_USER_ALIAS
Placeholder for the user alias, which is used for sorting and will be replaced by the query.
|
SORT_ASCENDING, SORT_DESCENDING
Constructor and Description |
---|
UserQueryParameters()
Create parameters for configuring the user query.
|
UserQueryParameters(int maxCount,
int offset)
Create parameters for configuring the user query.
|
Modifier and Type | Method and Description |
---|---|
void |
addRoleToExclude(UserRole role)
Add a role to exclude in the result.
|
void |
addRoleToInclude(UserRole role)
Add a role to include in the result.
|
void |
addUserTagIds(Long... tagIds)
Adds a tag by its id the users should be tagged with.
|
void |
addUserTagStoreTagId(String tagStoreAlias,
Collection<String> tagStoreTagIds)
Adds a list of tags for a specific TagStore the users should be tagged with.
|
void |
addUserTagStoreTagId(String tagStoreAlias,
String tagStoreTagId)
Adds a tag for a specific TagStore the users should be tagged with.
|
UserStatus[] |
getExcludeStatusFilter() |
UserStatus[] |
getIncludeStatusFilter()
Gets the status filter.
|
Timestamp |
getLastModifiedAfter() |
org.hibernate.criterion.MatchMode |
getMatchMode()
Returns the match mode used in user name based queries.
|
Map<String,Object> |
getParameters()
Get the parameters of this instances, the names are the keys
|
Collection<UserRole> |
getRolesToExclude() |
Collection<UserRole> |
getRolesToInclude() |
String |
getTagPrefix() |
Set<String> |
getTagStoreAliases() |
String[] |
getUserSearchFilters()
Get the user search strings
|
String[] |
getUserSearchParameterNames() |
Set<Long> |
getUserTagIds() |
Map<String,Set<String>> |
getUserTagStoreTagIds() |
boolean |
isHideSelectedTags() |
boolean |
isIgnoreEmailField()
Returns whether to include the email field in the search.
|
boolean |
isMultilingualTagPrefixSearch() |
boolean |
isRetrieveOnlyFollowedUsers() |
boolean |
needTransformListItem() |
void |
setExcludeStatusFilter(UserStatus[] excludeStatusFilter) |
void |
setHideSelectedTags(boolean hideSelectedTags) |
void |
setIncludeStatusFilter(UserStatus[] includeStatusFilter)
Sets the status filter.
|
void |
setLastModifiedAfter(Timestamp lastModifiedAfter) |
void |
setMatchMode(org.hibernate.criterion.MatchMode mode)
Sets the match mode for name queries.
|
void |
setRetrieveOnlyFollowedUsers(boolean onlyFollowedUsers)
Set whether to retrieve only users followed by the current user.
|
void |
setTagPrefix(String tagPrefix) |
void |
setTagStoreAliases(Set<String> tagStoreAliases)
Set aliases of tag stores to only consider tags from these stores
|
void |
setUserSearchFilters(String[] userSearchFilters)
Searches the user fields without email.
|
void |
setUserSearchFilters(String[] userSearchFilters,
boolean includeEmailFieldInSearch)
Sets the user search string.
|
void |
sortByEmailAsc()
Sort by the last name ascending
|
void |
sortByFirstNameAsc()
Sort by the first name ascending
|
void |
sortByLastNameAsc()
Sort by the email ascending
|
IdentifiableEntityData |
transformResultItem(Object resultItem)
Deprecated.
User UserToUserDataQueryResultConverter instead.
|
addPropertyFilter, getPropertyFilters
addParameter, addParameter, addSortField, addSortField, createParameterNamesForSearch, getDatabaseConfiguration, getLanguageCode, getPageInformation, getPageInformation, getResultSpecification, getSortString, isLimitResultSet, isLimitResultSetAvodingDuplicates, putParameter, putParametersForSearch, putParametersForSearch, setLanguageCode, setLimitResultSet, setLimitResultSetAvodingDuplicates, setResultSpecification, validateLong
public static final String PLACEHOLDER_USER_ALIAS
public static final String PARAM_USER_ROLE_FILTER
public static final String PARAM_LAST_MODIFICATION_DATE
public static final String PARAM_TAG_PREFIX
public UserQueryParameters()
UserQueryParameters(int, int)
public UserQueryParameters(int maxCount, int offset)
maxCount
- the upper limit of users to retrieve. A value of less than or equal to 0 means no
limit.offset
- the offset in the result set from where matches should be retrievedpublic void addRoleToExclude(UserRole role)
role
- the role to excludegetRolesToExclude()
public void addRoleToInclude(UserRole role)
role
- the role to includegetRolesToInclude()
public void addUserTagIds(Long... tagIds)
tagIds
- TagIds to filter for.public void addUserTagStoreTagId(String tagStoreAlias, Collection<String> tagStoreTagIds)
tagStoreAlias
- The alias of the TagStore.tagStoreTagIds
- Collection of tag ids to add for the given TagStore.public void addUserTagStoreTagId(String tagStoreAlias, String tagStoreTagId)
tagStoreAlias
- The alias of the TagStore.tagStoreTagId
- The id of the tag within the TagStore.public UserStatus[] getExcludeStatusFilter()
public UserStatus[] getIncludeStatusFilter()
public Timestamp getLastModifiedAfter()
public org.hibernate.criterion.MatchMode getMatchMode()
public Map<String,Object> getParameters()
getParameters
in class PropertyQueryParameters
public Collection<UserRole> getRolesToExclude()
public Collection<UserRole> getRolesToInclude()
public String getTagPrefix()
public Set<String> getTagStoreAliases()
public String[] getUserSearchFilters()
public String[] getUserSearchParameterNames()
public Map<String,Set<String>> getUserTagStoreTagIds()
public boolean isHideSelectedTags()
public boolean isIgnoreEmailField()
public boolean isMultilingualTagPrefixSearch()
public boolean isRetrieveOnlyFollowedUsers()
public boolean needTransformListItem()
needTransformListItem
in class QueryParameters
public void setExcludeStatusFilter(UserStatus[] excludeStatusFilter)
excludeStatusFilter
- the user status to ignorepublic void setHideSelectedTags(boolean hideSelectedTags)
hideSelectedTags
- the hideSelectedTags to setpublic void setIncludeStatusFilter(UserStatus[] includeStatusFilter)
includeStatusFilter
- the includeStatusFilter to setpublic void setLastModifiedAfter(Timestamp lastModifiedAfter)
lastModifiedAfter
- the lastModifiedAfter to setpublic void setMatchMode(org.hibernate.criterion.MatchMode mode)
mode
- the match modepublic void setRetrieveOnlyFollowedUsers(boolean onlyFollowedUsers)
onlyFollowedUsers
- true to retrieve only followed userspublic void setTagPrefix(String tagPrefix)
tagPrefix
- the tagPrefix to setpublic void setTagStoreAliases(Set<String> tagStoreAliases)
tagStoreAliases
- set of aliases identifying tag storespublic void setUserSearchFilters(String[] userSearchFilters)
setUserSearchFilters(String[], boolean)
userSearchFilters
- the user search stringspublic void setUserSearchFilters(String[] userSearchFilters, boolean includeEmailFieldInSearch)
userSearchFilters
- the user search stringincludeEmailFieldInSearch
- true if the email field should be included in searchpublic void sortByEmailAsc()
public void sortByFirstNameAsc()
public void sortByLastNameAsc()
@Deprecated public IdentifiableEntityData transformResultItem(Object resultItem)
transformResultItem
in class QueryParameters
resultItem
- the item to transformCopyright © 2019 Communote team. All rights reserved.