Interface QueryBuilderInterceptor
- All Known Implementing Classes:
BusinessUnitQueryBuilderInterceptor
,SecureQueryInterceptor
public interface QueryBuilderInterceptor
Interceptor for
CriteriaQueryBuilder
.
Can be used to execute additional conditions for a specified model.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static enum
static interface
-
Method Summary
Modifier and TypeMethodDescriptionbuildConditionFor
(Class<T> modelClass, boolean isInsecure, QueryBuilderInterceptor.QueryBuilderType queryBuilderType, QueryBuilderInterceptor.QueryBuilderSituation queryBuilderSituation) default @Nullable QueryBuilderInterceptor.SelectionInterceptor
createSelectionInterceptor
(EntityModel root, String basePath, List<Path> fields) Called for each 'base path' (a path without a field) that is selected inCriteriaQueryBuilder
query that uses a custom selection.fieldUsedInQueryCondition
(Class<?> modelClass, String field, boolean isInsecure) Called for every field that is used in a condition.
-
Method Details
-
buildConditionFor
<T> List<Node> buildConditionFor(Class<T> modelClass, boolean isInsecure, QueryBuilderInterceptor.QueryBuilderType queryBuilderType, QueryBuilderInterceptor.QueryBuilderSituation queryBuilderSituation) -
createSelectionInterceptor
@Nullable default @Nullable QueryBuilderInterceptor.SelectionInterceptor createSelectionInterceptor(EntityModel root, String basePath, List<Path> fields) Called for each 'base path' (a path without a field) that is selected inCriteriaQueryBuilder
query that uses a custom selection. The returned interceptor may add additional query paths and inspect / modify the results.- Returns:
- the
QueryBuilderInterceptor.SelectionInterceptor
that should be applied or null
-
fieldUsedInQueryCondition
Called for every field that is used in a condition. For example the condition 'find User where relAddress.value = "xy"' would result in 2 calls: ["User", "relAddress"] and ["Address", "value"]. The nodes returned from this method will be added to the query.
-