public class LdapUserQuery extends AbstractQuery<PlatformUserQuery,PlatformUser> implements PlatformUserQuery
ListQueryParameterObject.OrderBy, ListQueryParameterObject.ResultType
Query.NullHandlingOnOrder
Modifier and Type | Field and Description |
---|---|
protected static AttributesMapper<PlatformUser> |
COUNTING_ATTRIBUTES_MAPPER
An AttributesMapper that would be used only for the count query.
|
protected static QueryProperty |
EMAIL |
protected Map<String,Filter> |
filtersMap |
protected static QueryProperty |
FIRST_NAME |
protected PlatformIdentityService |
identityService |
protected boolean |
includeIdentityInfo |
protected static QueryProperty |
LAST_NAME |
protected LdapConfigurationApi |
ldapConfiguration |
protected org.slf4j.Logger |
logger |
protected String |
memberOfGroup |
protected String |
memberOfGroupKey |
protected Collection<String> |
memberOfGroupKeys |
protected Collection<String> |
memberOfGroupKeysForOr |
protected Collection<String> |
memberOfGroups |
protected String |
tenantId |
protected static QueryProperty |
USER_ID |
protected String |
userDefinitionKey |
protected Collection<String> |
userIdsForOr |
commandContext, commandExecutor
databaseType, DEFAULT_ORDER_BY, defaultOrderBy, firstResult, maxResults, nullHandlingColumn, nullHandlingOnOrder, orderByCollection, orderProperty, parameter, resultType, SORTORDER_ASC, SORTORDER_DESC
Constructor and Description |
---|
LdapUserQuery(LdapConfigurationApi ldapConfiguration,
PlatformIdentityService identityService) |
asc, checkQueryOk, count, desc, direction, execute, executeSingleResult, list, listPage, orderBy, orderBy, setCommandExecutor, singleResult
addOrder, buildOrderBy, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getNullHandlingColumn, getOrderBy, getOrderByCollectionSafe, getOrderByForWindow, getOuterJoinOrderBy, getParameter, hasOrderBy, hasOrderByForColumn, isNeedsPaging, mapOrderByToSql, setDatabaseType, setFirstResult, setMaxResults, setNullHandlingColumn, setParameter
protected static final QueryProperty USER_ID
protected static final QueryProperty FIRST_NAME
protected static final QueryProperty LAST_NAME
protected static final QueryProperty EMAIL
protected static final AttributesMapper<PlatformUser> COUNTING_ATTRIBUTES_MAPPER
protected final org.slf4j.Logger logger
protected final LdapConfigurationApi ldapConfiguration
protected final PlatformIdentityService identityService
protected boolean includeIdentityInfo
protected String memberOfGroup
protected Collection<String> memberOfGroups
protected String memberOfGroupKey
protected Collection<String> memberOfGroupKeys
protected Collection<String> userIdsForOr
protected Collection<String> memberOfGroupKeysForOr
protected String userDefinitionKey
protected String tenantId
public LdapUserQuery(LdapConfigurationApi ldapConfiguration, PlatformIdentityService identityService)
public List<PlatformUser> executeList(CommandContext commandContext)
executeList
in class AbstractQuery<PlatformUserQuery,PlatformUser>
protected PlatformUser mapWithDbInfos(Attributes attributes) throws NamingException
NamingException
public long executeCount(CommandContext commandContext)
executeCount
in class AbstractQuery<PlatformUserQuery,PlatformUser>
protected Filter prepareQueryFilter()
protected Filter memberOfFilter(Collection<String> groupDns)
protected Filter userIdsFilter(Collection<String> userIds)
public PlatformUserQuery includeIdentityInfo()
PlatformUserQuery
includeIdentityInfo
in interface PlatformUserQuery
public PlatformUserQuery userDisplayName(String displayName)
userDisplayName
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userDisplayNameLike(String displayNameLike)
userDisplayNameLike
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userDisplayNameLikeIgnoreCase(String displayNameLikeIgnoreCase)
userDisplayNameLikeIgnoreCase
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery accessibleByUser(String userId)
PlatformUserQuery
userId
.accessibleByUser
in interface PlatformUserQuery
userId
- the if of the user for which users should be queriedpublic PlatformUserQuery accessibleByUserWithUserDefinitionKey(String userId, String userDefinitionKey)
PlatformUserQuery
userId
and userDefinitionKey
.accessibleByUserWithUserDefinitionKey
in interface PlatformUserQuery
userId
- the id of the user for which users should be querieduserDefinitionKey
- the user definition key for the user for which users should be queriedpublic PlatformUserQuery active()
active
in interface PlatformUserQuery
public PlatformUserQuery state(String state)
state
in interface PlatformUserQuery
public PlatformUserQuery subState(String subState)
subState
in interface PlatformUserQuery
public PlatformUserQuery userIdsNotIn(List<String> ids)
userIdsNotIn
in interface PlatformUserQuery
public PlatformUserQuery userDefinitionKey(String userDefinitionKey)
userDefinitionKey
in interface PlatformUserQuery
public PlatformUserQuery type(String type)
PlatformUserQuery
type
in interface PlatformUserQuery
for known user types
public PlatformUserQuery subType(String subType)
subType
in interface PlatformUserQuery
public PlatformUserQuery presence(String presence)
PlatformUserQuery
presence
in interface PlatformUserQuery
for known presence states
public PlatformUserQuery infoEquals(String name, Object value)
PlatformUserQuery
infoEquals
in interface PlatformUserQuery
name
- the name of the infovalue
- the value that the info should havepublic PlatformUserQuery infoEqualsIgnoreCase(String name, String value)
PlatformUserQuery
infoEqualsIgnoreCase
in interface PlatformUserQuery
name
- the name of the infovalue
- the value that the info should havepublic PlatformUserQuery infoValueLike(String name, String valueLike)
PlatformUserQuery
infoValueLike
in interface PlatformUserQuery
name
- the name of the infovalueLike
- the value like the info should have ('%' has to be added by the caller itself)public PlatformUserQuery infoValueLikeIgnoreCase(String name, String valueLike)
PlatformUserQuery
infoValueLikeIgnoreCase
in interface PlatformUserQuery
name
- the name of the infovalueLike
- the value like the info should have ('%' has to be added by the caller itself)public PlatformUserQuery createdBefore(Date createdBefore)
createdBefore
in interface PlatformUserQuery
public PlatformUserQuery createAfter(Date createdAfter)
createAfter
in interface PlatformUserQuery
public PlatformUserQuery tenantId(String tenantId)
tenantId
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery withoutTenantId()
PlatformUserQuery
withoutTenantId
in interface PlatformUserQuery
public PlatformUserQuery memberOfGroupKey(String groupKey)
PlatformUserQuery
PlatformUser
s that belong to the group with the given key.memberOfGroupKey
in interface PlatformUserQuery
public PlatformUserQuery memberOfGroupKeys(Collection<String> groupKeys)
PlatformUserQuery
PlatformUser
s that belong to the groups with the given keys.memberOfGroupKeys
in interface PlatformUserQuery
public PlatformUserQuery userId(String id)
userId
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userIds(List<String> ids)
userIds
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userIdIgnoreCase(String id)
userIdIgnoreCase
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userFirstName(String firstName)
userFirstName
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userFirstNameLike(String firstNameLike)
userFirstNameLike
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userFirstNameLikeIgnoreCase(String firstNameLikeIgnoreCase)
userFirstNameLikeIgnoreCase
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userLastName(String lastName)
userLastName
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userLastNameLike(String lastNameLike)
userLastNameLike
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userLastNameLikeIgnoreCase(String lastNameLikeIgnoreCase)
userLastNameLikeIgnoreCase
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userFullNameLike(String fullNameLike)
userFullNameLike
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userFullNameLikeIgnoreCase(String fullNameLikeIgnoreCase)
userFullNameLikeIgnoreCase
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
protected PlatformUserQuery userFullNameLike(String filterKey, String fullNameLike)
public PlatformUserQuery userEmail(String email)
userEmail
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userEmailLike(String emailLike)
userEmailLike
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery memberOfGroup(String groupId)
memberOfGroup
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery memberOfGroups(List<String> groupIds)
memberOfGroups
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery userIdsOrMemberOfGroupKeys(Collection<String> userIds, Collection<String> groupKeys)
PlatformUserQuery
PlatformUser
s with the given user ids or that belong to the groups with the given keys.userIdsOrMemberOfGroupKeys
in interface PlatformUserQuery
public PlatformUserQuery orderByUserId()
orderByUserId
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery orderByUserFirstName()
orderByUserFirstName
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery orderByUserLastName()
orderByUserLastName
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
public PlatformUserQuery orderByUserEmail()
orderByUserEmail
in interface UserBaseQuery<PlatformUserQuery,PlatformUser>
protected PlatformUserQuery withInfo(String filterKey, String infoName, String value, BiFunction<String,String,Filter> filterCreator)
protected PlatformUserQuery with(String filterKey, Collection<String> attributeNames, String value, BiFunction<String,String,Filter> filterCreator)
protected OrFilter createFilter(Collection<String> attributeNames, String value, BiFunction<String,String,Filter> filterCreator)
protected PlatformUserQuery withFilter(String filterKey, Filter query)
protected LdapOperations getLdapOperations()
protected LdapUserProperties.Mappings getUserMappings()
protected LdapUserProperties getUserProperties()
protected DistinguishedNameProvider getDistinguishedNameProvider()
protected AttributesMapper<PlatformUser> getUserAttributesMapper()