org.broadleafcommerce.openadmin.dto
Class CriteriaTransferObject

java.lang.Object
  extended by org.broadleafcommerce.openadmin.dto.CriteriaTransferObject

public class CriteriaTransferObject
extends Object

Generic persistent entity criteria transfer object. Provides a storage mechanism for query related information regarding an entity.

Author:
Jeff Fischer

Constructor Summary
CriteriaTransferObject()
           
 
Method Summary
 void add(FilterAndSortCriteria criteria)
          Add a FilterAndSortCriteria instance.
 void addAll(Collection<FilterAndSortCriteria> criterias)
          Add all FilterAndSortCriteria instances.
 FilterAndSortCriteria get(String name)
           
 Map<String,FilterAndSortCriteria> getCriteriaMap()
          Retrieve the added FilterAndSortCriteria instances organized into a map
 Integer getFirstResult()
          The index of records in the database for which a fetch will start.
 Integer getMaxResults()
          The max number of records from the datastore to return.
 void setCriteriaMap(Map<String,FilterAndSortCriteria> criteriaMap)
           
 void setFirstResult(Integer firstResult)
          The index of records in the datastore for which a fetch will start.
 void setMaxResults(Integer maxResults)
          The max number of records from the datastore to return.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CriteriaTransferObject

public CriteriaTransferObject()
Method Detail

getFirstResult

public Integer getFirstResult()
The index of records in the database for which a fetch will start.

Returns:
the index to start, or null

setFirstResult

public void setFirstResult(Integer firstResult)
The index of records in the datastore for which a fetch will start.

Parameters:
firstResult - the index to start, or null

getMaxResults

public Integer getMaxResults()
The max number of records from the datastore to return.

Returns:
the max records, or null

setMaxResults

public void setMaxResults(Integer maxResults)
The max number of records from the datastore to return.

Parameters:
maxResults - the max records, or null

add

public void add(FilterAndSortCriteria criteria)
Add a FilterAndSortCriteria instance. Contains information about which records are retrieved and in what direction they're sorted.

Parameters:
criteria - FilterAndSortCriteria

addAll

public void addAll(Collection<FilterAndSortCriteria> criterias)
Add all FilterAndSortCriteria instances. Contains information about which records are retrieved and in what direction they're sorted.

Parameters:
criterias - the list of FilterAndSortCriteria instances to add

getCriteriaMap

public Map<String,FilterAndSortCriteria> getCriteriaMap()
Retrieve the added FilterAndSortCriteria instances organized into a map

Returns:
the FilterAndSortCriteria instances as a map

setCriteriaMap

public void setCriteriaMap(Map<String,FilterAndSortCriteria> criteriaMap)

get

public FilterAndSortCriteria get(String name)


Copyright © 2013. All Rights Reserved.