org.kuali.rice.core.api.criteria
Class QueryByCriteria.Builder

java.lang.Object
  extended by org.kuali.rice.core.api.criteria.QueryByCriteria.Builder
All Implemented Interfaces:
Serializable, ModelBuilder
Enclosing class:
QueryByCriteria

public static final class QueryByCriteria.Builder
extends Object
implements ModelBuilder, Serializable

See Also:
Serialized Form

Method Summary
 QueryByCriteria build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static QueryByCriteria.Builder create()
           
static QueryByCriteria fromPredicates(Predicate... predicates)
          convenience method to create an immutable criteria from one or more predicates.
 CountFlag getCountFlag()
           
 Integer getMaxResults()
           
 List<OrderByField> getOrderByFields()
           
 Predicate[] getPredicates()
          will return an array of the predicates.
 Integer getStartAtIndex()
           
 void setCountFlag(CountFlag countFlag)
           
 void setMaxResults(Integer maxResults)
           
 void setOrderByFields(List<OrderByField> orderByFields)
           
 void setPredicates(Predicate... predicates)
          Sets the predicates.
 void setStartAtIndex(Integer startAtIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static QueryByCriteria.Builder create()

getStartAtIndex

public Integer getStartAtIndex()

setStartAtIndex

public void setStartAtIndex(Integer startAtIndex)

getMaxResults

public Integer getMaxResults()

setMaxResults

public void setMaxResults(Integer maxResults)

getCountFlag

public CountFlag getCountFlag()

setCountFlag

public void setCountFlag(CountFlag countFlag)

getOrderByFields

public List<OrderByField> getOrderByFields()

setOrderByFields

public void setOrderByFields(List<OrderByField> orderByFields)

getPredicates

public Predicate[] getPredicates()
will return an array of the predicates. may return null if no predicates were set.

Returns:
the predicates

setPredicates

public void setPredicates(Predicate... predicates)
Sets the predicates. If multiple predicates are specified then they are wrapped in an "and" predicate. If a null predicate is specified then there will be no constraints on the query.

Parameters:
predicates - the predicates to set.

build

public QueryByCriteria build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

fromPredicates

public static QueryByCriteria fromPredicates(Predicate... predicates)
convenience method to create an immutable criteria from one or more predicates.



Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.