Class LdapRoleModelCriteriaBuilder
- java.lang.Object
- 
- org.keycloak.models.map.storage.ldap.LdapModelCriteriaBuilder<LdapRoleEntity,RoleModel,LdapRoleModelCriteriaBuilder>
- 
- org.keycloak.models.map.storage.ldap.role.LdapRoleModelCriteriaBuilder
 
 
- 
- All Implemented Interfaces:
- ModelCriteriaBuilder<RoleModel,LdapRoleModelCriteriaBuilder>
 
 public class LdapRoleModelCriteriaBuilder extends LdapModelCriteriaBuilder<LdapRoleEntity,RoleModel,LdapRoleModelCriteriaBuilder> 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.models.map.storage.ModelCriteriaBuilderModelCriteriaBuilder.Operator
 
- 
 - 
Constructor SummaryConstructors Constructor Description LdapRoleModelCriteriaBuilder(LdapMapRoleMapperConfig roleMapperConfig)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description LdapRoleModelCriteriaBuilderand(LdapRoleModelCriteriaBuilder... builders)Creates and returns a new instance ofModelCriteriaBuilderthat combines the given builders with the Boolean AND operator.LdapRoleModelCriteriaBuildercompare(SearchableModelField<? super RoleModel> modelField, ModelCriteriaBuilder.Operator op, Object... value)Adds a constraint for the given model field to this criteria builder and returns a criteria builder that is combined with the the new constraint.StringgetClientId()StringgetRealmId()BooleanisClientRole()LdapRoleModelCriteriaBuildernot(LdapRoleModelCriteriaBuilder builder)Creates and returns a new instance ofModelCriteriaBuilderthat negates the given builder.LdapRoleModelCriteriaBuilderor(LdapRoleModelCriteriaBuilder... builders)Creates and returns a new instance ofModelCriteriaBuilderthat combines the given builders with the Boolean OR operator.LdapRoleModelCriteriaBuilderwithCustomFilter(String customFilter)- 
Methods inherited from class org.keycloak.models.map.storage.ldap.LdapModelCriteriaBuilderequal, getPredicateFunc, in
 
- 
 
- 
- 
- 
Constructor Detail- 
LdapRoleModelCriteriaBuilderpublic LdapRoleModelCriteriaBuilder(LdapMapRoleMapperConfig roleMapperConfig) 
 
- 
 - 
Method Detail- 
getClientIdpublic String getClientId() 
 - 
isClientRolepublic Boolean isClientRole() 
 - 
getRealmIdpublic String getRealmId() 
 - 
andpublic LdapRoleModelCriteriaBuilder and(LdapRoleModelCriteriaBuilder... builders) Description copied from interface:ModelCriteriaBuilderCreates and returns a new instance ofModelCriteriaBuilderthat combines the given builders with the Boolean AND operator.Predicate coming out of andon an empty array ofbuilders(i.e. empty conjunction) is alwaystrue.cb = storage.getCriteriaBuilder(); storage.read(cb.or( cb.and(cb.compare(FIELD1, EQ, 1), cb.compare(FIELD2, EQ, 2)), cb.and(cb.compare(FIELD1, EQ, 3), cb.compare(FIELD2, EQ, 4)) );- Specified by:
- andin interface- ModelCriteriaBuilder<RoleModel,LdapRoleModelCriteriaBuilder>
- Overrides:
- andin class- LdapModelCriteriaBuilder<LdapRoleEntity,RoleModel,LdapRoleModelCriteriaBuilder>
 
 - 
orpublic LdapRoleModelCriteriaBuilder or(LdapRoleModelCriteriaBuilder... builders) Description copied from interface:ModelCriteriaBuilderCreates and returns a new instance ofModelCriteriaBuilderthat combines the given builders with the Boolean OR operator.Predicate coming out of oron an empty array ofbuilders(i.e. empty disjunction) is alwaysfalse.cb = storage.getCriteriaBuilder(); storage.read(cb.or( cb.compare(FIELD1, EQ, 1).compare(FIELD2, EQ, 2), cb.compare(FIELD1, EQ, 3).compare(FIELD2, EQ, 4) );- Specified by:
- orin interface- ModelCriteriaBuilder<RoleModel,LdapRoleModelCriteriaBuilder>
- Overrides:
- orin class- LdapModelCriteriaBuilder<LdapRoleEntity,RoleModel,LdapRoleModelCriteriaBuilder>
 
 - 
notpublic LdapRoleModelCriteriaBuilder not(LdapRoleModelCriteriaBuilder builder) Description copied from interface:ModelCriteriaBuilderCreates and returns a new instance ofModelCriteriaBuilderthat negates the given builder.Note that if the builderhas no condition yet, there is nothing to negate: empty negation is alwaystrue.- Specified by:
- notin interface- ModelCriteriaBuilder<RoleModel,LdapRoleModelCriteriaBuilder>
- Overrides:
- notin class- LdapModelCriteriaBuilder<LdapRoleEntity,RoleModel,LdapRoleModelCriteriaBuilder>
- Returns:
 
 - 
comparepublic LdapRoleModelCriteriaBuilder compare(SearchableModelField<? super RoleModel> modelField, ModelCriteriaBuilder.Operator op, Object... value) Description copied from interface:ModelCriteriaBuilderAdds a constraint for the given model field to this criteria builder and returns a criteria builder that is combined with the the new constraint. The resulting constraint is a logical conjunction (i.e. AND) of the original constraint present in thisModelCriteriaBuilderand the given operator.- Parameters:
- modelField- Field on the logical model to be constrained
- op- Operator
- value- Additional operands of the operator.
- Returns:
 
 - 
withCustomFilterpublic LdapRoleModelCriteriaBuilder withCustomFilter(String customFilter) 
 
- 
 
-