public class QueryFilter
extends java.lang.Object
A data service parameter used to define filters and ordering when accessing a
datastore via a ManagedEntity
. This class can be used as an
input parameter for a data service method.
Filtering is managed in two ways:
ManagedEntity
, for which certain
fields are defined. The filter will reject all ManagedEntity
objects for which at least one field value does not match the corresponding
value defined in the reference ManagedEntity
.Operations on datastores such as UPDATE, DELETE and SELECT can be applied to a subset of the datastore using such filters.
Ordering the managed entities returned when retrieving information from the datastore is managed through an expression in SQL syntax that will be applied in an ORDER BY clause when reading data from the datastore.
Constructor and Description |
---|
QueryFilter(ManagedEntity pWhereEntity,
java.lang.String pAdditionalWhereExpression,
java.lang.String pOrderByExpression,
java.lang.Integer pMaxRowCount)
Constructs a new
QueryFilter . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAdditionalWhereExpression()
Returns the additional WHERE expression, or null if this expression is not
set.
|
java.lang.Integer |
getMaxRowCount()
Returns the maximum number of rows to retrieve.
|
java.lang.String |
getOrderByExpression()
Returns the ORDER BY expression, or null if this expression is not set.
|
ManagedEntity |
getWhereEntity()
Returns the reference
ManagedEntity used for filtering. |
public QueryFilter(ManagedEntity pWhereEntity, java.lang.String pAdditionalWhereExpression, java.lang.String pOrderByExpression, java.lang.Integer pMaxRowCount)
QueryFilter
.pWhereEntity
- The reference ManagedEntity
used for
filtering the datastore information.pAdditionalWhereExpression
- SQL Clause for filtering data from the datastore.
This clause should not include the WHERE keyword. If it is not
specified, the clause will not be generated.pOrderByExpression
- SQL Clause for ordering data from the datastore.
This clause should not include the ORDER BY keyword. If it is not
specified, the ORDER BY clause will not be generated.pMaxRowCount
- maximum number of rows to retrieve.public java.lang.Integer getMaxRowCount()
public java.lang.String getOrderByExpression()
public java.lang.String getAdditionalWhereExpression()
public ManagedEntity getWhereEntity()
ManagedEntity
used for filtering.ManagedEntity