Interface UserQuery.IFilterableColumns
- All Known Subinterfaces:
UserQuery.IFilterQuery
- All Known Implementing Classes:
UserQuery.FilterQuery
- Enclosing class:
UserQuery
IUser
Example:
Corresponds to SQL:
UserQuery.create().where().name().isLike("john%");SELECT * FROM IWA_IWA_User WHERE name LIKE 'john%'
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionPrepares a where statement for the columnEMailAddress.
Must be followed by a call to a condition method.enabled()Filters users which are enabled.external()Filters users which are managed by an external security system.Prepares a where statement for the columnExternalId.
Must be followed by a call to a condition method.fullName()Prepares a where statement for the columnFullName.
Must be followed by a call to a condition method.Filters users which has the givenrole.Filters users which has the role with the givenroleName.hasRoleAssigned(IRole role) Filters users which has the givenroledirectly assigned.hasRoleAssigned(String roleName) Filters users which has the role with the givenroleNamedirectly assigned.Prepares a where statement for the columnLastLoginTimestamp.
Must be followed by a call to a condition method.name()Prepares a where statement for the columnName.
Must be followed by a call to a condition method.Adds a condition, which negates a set of where conditions given by theotherQuerywith a NOT expression.
Only the where clause of the givenotherQueryis considered.Prepares a where statement for the columnSecurityMemberId.
Must be followed by a call to a condition method.Prepares a where statement for the columnSecuritySystemId.
Must be followed by a call to a condition method.
-
Method Details
-
hasRole
Filters users which has the given
role. A user has the role if the role is directly assigned, transitive over the role hierarchy or role members.Example:
Get all users that has the role "manager"import ch.ivyteam.ivy.security.IUser; import ch.ivyteam.ivy.security.IRole; import ch.ivyteam.ivy.security.query.UserQuery; IRole manager = ivy.wf.getSecurityContext().roles().find("manager"); UserQuery query = UserQuery.create().where().hasRole(manager); List<IUser> usersWithRoleManager = ivy.wf.getSecurityContext().getUserQueryExecutor().getResults(query);- Parameters:
role- role to filter the users- Returns:
- the query for further composition
- Throws:
IllegalArgumentException- If the given role is null- See Also:
- API:
- This public API is available in Java.
-
hasRole
Filters users which has the role with the given
roleName. A user has the role if the role is directly assigned, transitive over the role hierarchy or role members.Example:
Get all users that has the role "manager"import ch.ivyteam.ivy.security.IUser; import ch.ivyteam.ivy.security.query.UserQuery; UserQuery query = UserQuery.create().where().hasRole("manager"); List<IUser> usersWithRoleManager = ivy.wf.getSecurityContext().getUserQueryExecutor().getResults(query);- Parameters:
roleName- name of the role to filter the users- Returns:
- the query for further composition
- Throws:
IllegalArgumentException- If the given role name is null or cannot be found- Since:
- 9.3
- See Also:
- API:
- This public API is available in Java.
-
hasRoleAssigned
Filters users which has the given
roledirectly assigned. In contrast tohasRole(ch.ivyteam.ivy.security.IRole), it only considers directly assigned roles.Example:
Get all users that has directly assigned the role "manager"import ch.ivyteam.ivy.security.IUser; import ch.ivyteam.ivy.security.IRole; import ch.ivyteam.ivy.security.query.UserQuery; IRole manager = ivy.wf.getSecurityContext().roles().find("manager"); UserQuery query = UserQuery.create().where().hasRoleAssigned(manager); List<IUser> usersWithRoleManagerAssigned = ivy.wf.getSecurityContext().getUserQueryExecutor().getResults(query);- Parameters:
role- role to filter the users- Returns:
- the query for further composition
- Throws:
IllegalArgumentException- If the given role is null- See Also:
- API:
- This public API is available in Java.
-
hasRoleAssigned
Filters users which has the role with the given
roleNamedirectly assigned. In contrast tohasRole(String), it only considers directly assigned roles.Example:
Get all users that has directly assigned the role "manager"import ch.ivyteam.ivy.security.IUser; import ch.ivyteam.ivy.security.query.UserQuery; UserQuery query = UserQuery.create().where().hasRoleAssigned("manager"); List<IUser> usersWithRoleManagerAssigned = ivy.wf.getSecurityContext().getUserQueryExecutor().getResults(query);- Parameters:
roleName- name of the role to filter the users- Returns:
- the query for further composition
- Throws:
IllegalArgumentException- If the given role name is null or cannot be found- Since:
- 9.3
- See Also:
- API:
- This public API is available in Java.
-
enabled
UserQuery.IBoolFilterQuery enabled()Filters users which are enabled.- Returns:
- the query for further composition
- API:
- This public API is available in Java.
-
external
UserQuery.IBoolFilterQuery external()Filters users which are managed by an external security system.- Returns:
- the query for further composition
- API:
- This public API is available in Java.
-
not
Adds a condition, which negates a set of where conditions given by the
otherQuerywith a NOT expression.
Only the where clause of the givenotherQueryis considered. All other parts are ignored.SQL part:
NOT([otherSqlExpression])Example:
Corresponds to SQL:UserQuery subQuery = UserQuery.create().where() .name().isEqual("john"); UserQuery query = UserQuery.create().where() .not(subQuery);SELECT * FROM IWA_IWA_User WHERE NOT(name = 'john')
- Parameters:
otherQuery- Query from which the negated where part will be added to the current query.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
name
Prepares a where statement for the column
Name.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
fullName
UserQuery.IStringColumnFilterQuery fullName()Prepares a where statement for the column
FullName.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
securitySystemId
UserQuery.IIntegerColumnFilterQuery securitySystemId()Prepares a where statement for the column
SecuritySystemId.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
externalId
UserQuery.IStringColumnFilterQuery externalId()Prepares a where statement for the column
ExternalId.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
eMailAddress
UserQuery.IStringColumnFilterQuery eMailAddress()Prepares a where statement for the column
EMailAddress.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
securityMemberId
UserQuery.IStringColumnFilterQuery securityMemberId()Prepares a where statement for the column
SecurityMemberId.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-
lastLoginTimestamp
UserQuery.IInstantColumnFilterQuery lastLoginTimestamp()Prepares a where statement for the column
LastLoginTimestamp.
Must be followed by a call to a condition method.- Returns:
- query for further composition
- API:
- This public API is available in Java.
-