Package com.caplin.jtm.persistence
Class QueryParams
java.lang.Object
com.caplin.jtm.persistence.QueryParams
Class holding additional information to customize a persistence query.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance ofQueryParamsinitialized with default values. -
Method Summary
Modifier and TypeMethodDescriptionAdd an argument to the list of argumentsAdd multiple arguments to the list of argumentsaddOrdering(String fieldName, Ordering order) Add a criterion to the List of ordering criteriaString[]getArgs()longgetLimit()String[]setLimit(long limit) Set the maximum number of rows to be returned by the query
-
Constructor Details
-
QueryParams
public QueryParams()Create a new instance ofQueryParamsinitialized with default values.
-
-
Method Details
-
addArg
Add an argument to the list of arguments- Parameters:
argument- argument to be added- Returns:
- this instance of
QueryParams
-
addArgs
Add multiple arguments to the list of arguments- Parameters:
argument- arguments to be added- Returns:
- this instance of
QueryParams
-
addOrdering
Add a criterion to the List of ordering criteria- Parameters:
fieldName- The field to be ordered onorder-Orderingspecifying the sort order to be applied to the field specified infieldName- Returns:
- this instance of
QueryParams
-
setLimit
Set the maximum number of rows to be returned by the query- Parameters:
limit- maximum number of rows to be returned by the query- Returns:
- this instance of
QueryParams
-
getLimit
public long getLimit() -
getOrderingAsEncodedArray
-
getArgs
-