Class IckleQueryWhereClauses
java.lang.Object
org.keycloak.models.map.storage.hotRod.IckleQueryWhereClauses
This class provides knowledge on how to build Ickle query where clauses for specified
SearchableModelField
.
For example,
for ClientModel.SearchableFields.CLIENT_ID
we use IckleQueryOperators.ExpressionCombinator
for
obtained ModelCriteriaBuilder.Operator
and use it with field name corresponding to ClientModel.SearchableFields.CLIENT_ID
however, for ClientModel.SearchableFields.ATTRIBUTE
we need to compare attribute name and attribute value
so we create where clause similar to the following:
(attributes.name = :attributeName) AND ( attributes.value = :attributeValue )
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
produceWhereClause
(SearchableModelField<?> modelField, ModelCriteriaBuilder.Operator op, Object[] values, Map<String, Object> parameters) Produces where clause for givenSearchableModelField
,ModelCriteriaBuilder.Operator
and values
-
Constructor Details
-
IckleQueryWhereClauses
public IckleQueryWhereClauses()
-
-
Method Details
-
produceWhereClause
public static String produceWhereClause(SearchableModelField<?> modelField, ModelCriteriaBuilder.Operator op, Object[] values, Map<String, Object> parameters) Produces where clause for givenSearchableModelField
,ModelCriteriaBuilder.Operator
and values- Parameters:
modelField
- model fieldop
- operatorvalues
- searched valuesparameters
- mapping between named parameters and corresponding values- Returns:
- resulting where clause
-