public class CriteriaTransferObject extends Object implements com.google.gwt.user.client.rpc.IsSerializable, Serializable
CriteriaTransferObjectConverter.
Criteria transfer object pattern allows client-side
components to construct serializable versions
of PersistentEntityCriteria instances, which can
then be passed through the chosen communication mechanism
to the remote (server-side) component. This way, the user
can create persistent entity criteria on the client side
and use CriteriaTransferObjectConverter to transform
them into corresponding PersistentEntityCriteria
instances seamlessly on the server.
This class essentially acts as map-based container for
FilterAndSortCriteria instances, defining basic
entity criteria for target entity properties on the client.
FilterAndSortCriteria,
CriteriaTransferObjectConverter,
PersistentEntityCriteria,
Serialized Form| Constructor and Description |
|---|
CriteriaTransferObject() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(FilterAndSortCriteria criteria)
Adds the given
FilterAndSortCriteria instance
to this transfer object. |
FilterAndSortCriteria |
get(String propertyId)
Returns a
FilterAndSortCriteria instance
with the given propertyId. |
Integer |
getFirstResult() |
Integer |
getMaxResults() |
Set<String> |
getPropertyIdSet()
Returns a set of symbolic persistent entity property
identifiers (propertyId values) for
FilterAndSortCriteria instances contained
within this transfer object. |
void |
setFirstResult(Integer firstResult) |
void |
setMaxResults(Integer maxResults) |
public Integer getFirstResult()
public void setFirstResult(Integer firstResult)
firstResult - Index of the starting element or
null representing no constraints on this
paging parameter.public Integer getMaxResults()
public void setMaxResults(Integer maxResults)
maxResults - Maximum number of elements to return
or null representing no constraints on this
paging parameter.public void add(FilterAndSortCriteria criteria)
FilterAndSortCriteria instance
to this transfer object.
Note that the propertyId of the given
FilterAndSortCriteria instance must be unique
within the transfer object (in other words, existing
FilterAndSortCriteria with same propertyId
will be replaced by this method).
criteria - FilterAndSortCriteria instance
to add.public FilterAndSortCriteria get(String propertyId)
FilterAndSortCriteria instance
with the given propertyId.
When not found, the method creates and adds
an empty FilterAndSortCriteria instance
to the transfer object automatically.
propertyId - Symbolic persistent entity property
identifier.FilterAndSortCriteria instance with
the given propertyId.public Set<String> getPropertyIdSet()
FilterAndSortCriteria instances contained
within this transfer object.Copyright © 2013. All rights reserved.