Package io.vertigo.datamodel.criteria
Class Criteria<D extends DtObject>
- java.lang.Object
- 
- io.vertigo.datamodel.criteria.Criteria<D>
 
- 
- Type Parameters:
- D- the type of dtObject filtered with this criteria
 - All Implemented Interfaces:
- Serializable
 
 public abstract class Criteria<D extends DtObject> extends Object implements Serializable A criteria to filter a list. A criteria can be translated to an SQL query and a Predicate for Java filtering To create a Criteria use the classCriterions- Author:
- mlaroche
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description Criteria()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Criteria<D>and(Criteria<D> criteria)Return a new criteria composing the previous criteria and the provided one with a and operator.Criteria<D>or(Criteria<D> criteria)Return a new criteria composing the previous criteria and the provided one with a or operator.abstract Predicate<D>toPredicate()Translate the criteria to a Java predicateStringtoString()io.vertigo.core.lang.Tuple<String,CriteriaCtx>toStringAnCtx(CriteriaEncoder criteriaEncoder)Translate the criteria to a SQL statement
 
- 
- 
- 
Method Detail- 
andpublic final Criteria<D> and(Criteria<D> criteria) Return a new criteria composing the previous criteria and the provided one with a and operator.- Parameters:
- criteria- the criteria to add
- Returns:
- the composed criteria
 
 - 
orpublic final Criteria<D> or(Criteria<D> criteria) Return a new criteria composing the previous criteria and the provided one with a or operator.- Parameters:
- criteria- the criteria to add
- Returns:
- the composed criteria
 
 - 
toPredicatepublic abstract Predicate<D> toPredicate() Translate the criteria to a Java predicate- Returns:
- the predicate
 
 - 
toStringAnCtxpublic io.vertigo.core.lang.Tuple<String,CriteriaCtx> toStringAnCtx(CriteriaEncoder criteriaEncoder) Translate the criteria to a SQL statement- Parameters:
- sqlDialect- the dialect to use
- Returns:
- a tuple with the query and the sql params
 
 
- 
 
-