Class EnumOrdinalItemFilterProcessor<E extends Enum<E>>
- java.lang.Object
-
- com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor<PropertyValueFilter<T>>
-
- com.evolveum.midpoint.repo.sqlbase.filtering.item.SinglePathItemFilterProcessor<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>>
,RightHandProcessor
public class EnumOrdinalItemFilterProcessor<E extends Enum<E>> extends SinglePathItemFilterProcessor<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.ItemValueFilterProcessor
context
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <Q extends FlexibleRelationalPathBase<R>,R>
ItemSqlMapper<Q,R>mapper(@NotNull Function<Q,com.querydsl.core.types.Path<Integer>> rootToQueryItem)
Returns the mapper creating the enum filter processor from context.static <Q extends FlexibleRelationalPathBase<R>,R,E extends Enum<E>>
ItemSqlMapper<Q,R>mapper(@NotNull Function<Q,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)
com.querydsl.core.types.Predicate
process(PropertyValueFilter<E> filter, RightHandProcessor rightPath)
-
Methods inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.SinglePathItemFilterProcessor
rightHand
-
Methods inherited from class com.evolveum.midpoint.repo.sqlbase.filtering.item.ItemValueFilterProcessor
createBinaryCondition, getSingleValue, isIgnoreCaseFilter, operation, predicateWithNotTreated, singleValuePredicate, singleValuePredicateWithNotTreated
-
-
-
-
Method Detail
-
mapper
public static <Q extends FlexibleRelationalPathBase<R>,R> ItemSqlMapper<Q,R> mapper(@NotNull @NotNull Function<Q,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.- Type Parameters:
Q
- entity query type of the mappingR
- row type related to theEnumOrdinalItemFilterProcessor
-
mapper
public static <Q extends FlexibleRelationalPathBase<R>,R,E extends Enum<E>> ItemSqlMapper<Q,R> mapper(@NotNull @NotNull Function<Q,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.- Type Parameters:
Q
- entity query type of the mappingR
- row type related to theEnumOrdinalItemFilterProcessor
E
- see class javadoc
-
process
public com.querydsl.core.types.Predicate process(PropertyValueFilter<E> filter) throws QueryException
- Throws:
QueryException
-
process
public com.querydsl.core.types.Predicate process(PropertyValueFilter<E> filter, RightHandProcessor rightPath) throws RepositoryException
- Throws:
RepositoryException
-
-