Package de.xima.fc.gui.model.data.filter
Class AcmFilterCriterionSupplier<TEntity extends de.xima.cmn.dao.interfaces.IEntity<Long>>
- java.lang.Object
-
- de.xima.fc.gui.model.data.filter.AcmFilterCriterionSupplier<TEntity>
-
- Type Parameters:
TEntity
- Type of the entity to which the filter criteria are applied.
- All Implemented Interfaces:
IFilterCriterionSupplier
,ISerializableFunction<IEntityContext,de.xima.cmn.criteria.FilterCriterion>
,Serializable
,Function<IEntityContext,de.xima.cmn.criteria.FilterCriterion>
public class AcmFilterCriterionSupplier<TEntity extends de.xima.cmn.dao.interfaces.IEntity<Long>> extends Object
A supplier for a list of filter criteria that should be applied when searching the database for matching entities. This is intended to be used withattribute select criteria managers
.- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AcmFilterCriterionSupplier(String key, Class<TEntity> entityClass, de.xima.cmn.criteria.SelectCriterion selectCriterion, ISerializablePredicate<javax.persistence.Tuple> tuplePredicate)
Creates a new filter criteria supplier with a single select criterion.AcmFilterCriterionSupplier(String key, Class<TEntity> entityClass, List<de.xima.cmn.criteria.SelectCriterion> selectCriterions, ISerializablePredicate<javax.persistence.Tuple> tuplePredicate)
Creates a new filter criteria supplier with a single select criterion.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.xima.cmn.criteria.FilterCriterion
apply(IEntityContext ec)
boolean
equals(Object obj)
String
getKey()
-
-
-
Constructor Detail
-
AcmFilterCriterionSupplier
public AcmFilterCriterionSupplier(String key, Class<TEntity> entityClass, de.xima.cmn.criteria.SelectCriterion selectCriterion, ISerializablePredicate<javax.persistence.Tuple> tuplePredicate)
Creates a new filter criteria supplier with a single select criterion. Lets you specify a filter predicate with custom Java logic that is applied to each existing entity. This supplier creates a filter that matches only entities that satisfy the given predicate.- Parameters:
key
- Key for equating different criteria suppliers.entityClass
- Type of the entity to which the filter criteria are applied.selectCriterion
- Select criterion for the entity attribute to select.tuplePredicate
- Predicate for the entities to match, each tuple represents an entity containing the attributes from the given select criteria.
-
AcmFilterCriterionSupplier
public AcmFilterCriterionSupplier(String key, Class<TEntity> entityClass, List<de.xima.cmn.criteria.SelectCriterion> selectCriterions, ISerializablePredicate<javax.persistence.Tuple> tuplePredicate)
Creates a new filter criteria supplier with a single select criterion. Lets you specify a filter predicate with custom Java logic that is applied to each existing entity. This supplier creates a filter that matches only entities that satisfy the given predicate.- Parameters:
key
- Key for equating different criteria suppliers.entityClass
- Type of the entity to which the filter criteria are applied.selectCriterions
- A list of select criterion for the entity attributes to select.tuplePredicate
- Predicate for the entities to match, each tuple represents an entity containing the attributes from the given select criteria.
-
-
Method Detail
-
apply
public de.xima.cmn.criteria.FilterCriterion apply(IEntityContext ec)
-
getKey
public String getKey()
- Specified by:
getKey
in interfaceIFilterCriterionSupplier
- Returns:
- unique key of the filter. Usually the filter keyword. Used for
Object.equals(Object)
.
-
-