Class IckleQueryMapModelCriteriaBuilder<E extends AbstractHotRodEntity,M>
- java.lang.Object
- 
- org.keycloak.models.map.storage.hotRod.IckleQueryMapModelCriteriaBuilder<E,M>
 
- 
- All Implemented Interfaces:
- ModelCriteriaBuilder<M,IckleQueryMapModelCriteriaBuilder<E,M>>
 
 public class IckleQueryMapModelCriteriaBuilder<E extends AbstractHotRodEntity,M> extends Object implements ModelCriteriaBuilder<M,IckleQueryMapModelCriteriaBuilder<E,M>> 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.models.map.storage.ModelCriteriaBuilderModelCriteriaBuilder.Operator
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static Map<SearchableModelField<?>,String>INFINISPAN_NAME_OVERRIDESstatic Set<SearchableModelField<?>>LOWERCASE_NORMALIZED_MODEL_FIELDS
 - 
Constructor SummaryConstructors Constructor Description IckleQueryMapModelCriteriaBuilder(Class<E> hotRodEntityClass)IckleQueryMapModelCriteriaBuilder(Class<E> hotRodEntityClass, StringBuilder whereClauseBuilder, Map<String,Object> parameters)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IckleQueryMapModelCriteriaBuilder<E,M>and(IckleQueryMapModelCriteriaBuilder<E,M>... builders)Creates and returns a new instance ofModelCriteriaBuilderthat combines the given builders with the Boolean AND operator.IckleQueryMapModelCriteriaBuilder<E,M>compare(SearchableModelField<? super M> 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.static StringgetFieldName(SearchableModelField<?> modelField)StringgetIckleQuery()Map<String,Object>getParameters()Ickle queries are created using named parameters to avoid query injections; this method provides mapping between parameter names and corresponding valuesIckleQueryMapModelCriteriaBuilder<E,M>not(IckleQueryMapModelCriteriaBuilder<E,M> builder)Creates and returns a new instance ofModelCriteriaBuilderthat negates the given builder.IckleQueryMapModelCriteriaBuilder<E,M>or(IckleQueryMapModelCriteriaBuilder<E,M>... builders)Creates and returns a new instance ofModelCriteriaBuilderthat combines the given builders with the Boolean OR operator.static ObjectsanitizeNonAnalyzed(Object value)
 
- 
- 
- 
Field Detail- 
INFINISPAN_NAME_OVERRIDESpublic static final Map<SearchableModelField<?>,String> INFINISPAN_NAME_OVERRIDES 
 - 
LOWERCASE_NORMALIZED_MODEL_FIELDSpublic static final Set<SearchableModelField<?>> LOWERCASE_NORMALIZED_MODEL_FIELDS 
 
- 
 - 
Method Detail- 
getFieldNamepublic static String getFieldName(SearchableModelField<?> modelField) 
 - 
comparepublic IckleQueryMapModelCriteriaBuilder<E,M> compare(SearchableModelField<? super M> 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.- Specified by:
- comparein interface- ModelCriteriaBuilder<E extends AbstractHotRodEntity,M>
- Parameters:
- modelField- Field on the logical model to be constrained
- op- Operator
- value- Additional operands of the operator.
- Returns:
 
 - 
andpublic IckleQueryMapModelCriteriaBuilder<E,M> and(IckleQueryMapModelCriteriaBuilder<E,M>... 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<E extends AbstractHotRodEntity,M>
 
 - 
orpublic IckleQueryMapModelCriteriaBuilder<E,M> or(IckleQueryMapModelCriteriaBuilder<E,M>... 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<E extends AbstractHotRodEntity,M>
 
 - 
notpublic IckleQueryMapModelCriteriaBuilder<E,M> not(IckleQueryMapModelCriteriaBuilder<E,M> 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<E extends AbstractHotRodEntity,M>
- Returns:
 
 - 
getIckleQuerypublic String getIckleQuery() - Returns:
- Ickle query that represents this QueryBuilder
 
 
- 
 
-