Class EnumOrdinalItemFilterProcessor<E extends Enum<E>>
- java.lang.Object
-
- com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemFilterProcessor<O>
-
- com.evolveum.midpoint.repo.sqlbase.filtering.item.SinglePathItemFilterProcessor<PropertyValueFilter<E>,com.querydsl.core.types.Path<Integer>>
-
- com.evolveum.midpoint.repo.sqlbase.filtering.item.EnumOrdinalItemFilterProcessor<E>
-
- Type Parameters:
E
- type of enum on the enum contained in object filter, this is optionally mapped to final type used for ordinal. Can benull
if no mapping is needed.
- All Implemented Interfaces:
FilterProcessor<PropertyValueFilter<E>>
public class EnumOrdinalItemFilterProcessor<E extends Enum<E>> extends SinglePathItemFilterProcessor<PropertyValueFilter<E>,com.querydsl.core.types.Path<Integer>>
Filter processor for a an attribute path (Prism item) of enum type that is mapped to SQL as ordinal value.
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.SinglePathItemFilterProcessor
path
-
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemFilterProcessor
context
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ItemSqlMapper
mapper(@NotNull Function<com.querydsl.core.types.EntityPath<?>,com.querydsl.core.types.Path<Integer>> rootToQueryItem)
Returns the mapper creating the enum filter processor from context.static <E extends Enum<E>>
ItemSqlMappermapper(@NotNull Function<com.querydsl.core.types.EntityPath<?>,com.querydsl.core.types.Path<Integer>> rootToQueryItem, @Nullable Function<E,Enum<?>> conversionFunction)
Returns the mapper creating the enum filter processor from context with enum value conversion function.com.querydsl.core.types.Predicate
process(PropertyValueFilter<E> filter)
-
Methods inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemFilterProcessor
createBinaryCondition, getSingleValue, isIgnoreCaseFilter, operation, predicateWithNotTreated, singleValuePredicate
-
-
-
-
Method Detail
-
mapper
public static ItemSqlMapper mapper(@NotNull @NotNull Function<com.querydsl.core.types.EntityPath<?>,com.querydsl.core.types.Path<Integer>> rootToQueryItem)
Returns the mapper creating the enum filter processor from context. With no value conversion function the filter value must contain enum whose ordinal numbers are used in the repository.
-
mapper
public static <E extends Enum<E>> ItemSqlMapper mapper(@NotNull @NotNull Function<com.querydsl.core.types.EntityPath<?>,com.querydsl.core.types.Path<Integer>> rootToQueryItem, @Nullable @Nullable Function<E,Enum<?>> conversionFunction)
Returns the mapper creating the enum filter processor from context with enum value conversion function.
-
process
public com.querydsl.core.types.Predicate process(PropertyValueFilter<E> filter) throws QueryException
- Throws:
QueryException
-
-