Class SimpleQueryCriteria
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.repository.SimpleQueryCriteria
-
- All Implemented Interfaces:
QueryCriteria
public class SimpleQueryCriteria extends Object implements QueryCriteria
A simple implementation of theQueryCriteria
interface. It provides just aQueryCriteria.Clause
instance to add each criterion as text representation.- Author:
- mmoquillon
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.persistence.datasource.repository.QueryCriteria
QueryCriteria.Clause
-
-
Constructor Summary
Constructors Constructor Description SimpleQueryCriteria(T parameters)
Constructs a simple query criteria with the specified parameters to use when defining the different clauses of the criteria.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryCriteria.Clause
clause()
Gets the clause the entities must match.PaginationCriterion
pagination()
Gets the pagination to apply to the query.SimpleQueryCriteria
withPagination(PaginationCriterion pagination)
Adds a criterion on the pagination to apply on the query for entities.
-
-
-
Constructor Detail
-
SimpleQueryCriteria
public SimpleQueryCriteria(T parameters)
Constructs a simple query criteria with the specified parameters to use when defining the different clauses of the criteria.- Type Parameters:
T
- the concrete type of the parameters.- Parameters:
parameters
- the parameters to use when setting the different clauses.
-
-
Method Detail
-
withPagination
public SimpleQueryCriteria withPagination(PaginationCriterion pagination)
Adds a criterion on the pagination to apply on the query for entities.- Parameters:
pagination
- the pagination criterion.- Returns:
- itself with criterion on a pagination.
-
pagination
public PaginationCriterion pagination()
Description copied from interface:QueryCriteria
Gets the pagination to apply to the query.- Specified by:
pagination
in interfaceQueryCriteria
- Returns:
- a criterion on a pagination. If no such criterion exists, then
PaginationCriterion.NO_PAGINATION
is returned.
-
clause
public QueryCriteria.Clause clause()
Description copied from interface:QueryCriteria
Gets the clause the entities must match.- Specified by:
clause
in interfaceQueryCriteria
- Returns:
- the clause of all conditions the entities have to match.
-
-