org.silverpeas.persistence.repository
Class SimpleQueryCriteria

java.lang.Object
  extended by org.silverpeas.persistence.repository.SimpleQueryCriteria
All Implemented Interfaces:
QueryCriteria

public class SimpleQueryCriteria
extends Object
implements QueryCriteria

A simple implementation of the QueryCriteria interface. It provides just a QueryCriteria.Clause instance to add each criterion as text representation.

Author:
mmoquillon

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.silverpeas.persistence.repository.QueryCriteria
QueryCriteria.Clause
 
Constructor Summary
SimpleQueryCriteria(T parameters)
          Constructs a simple query criteria with the specified parameters to use when defining the different clauses of the criteria.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface QueryCriteria
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 interface QueryCriteria
Returns:
the clause of all conditions the entities have to match.


Copyright © 2016 Silverpeas. All Rights Reserved.