Package com.caplin.jtm.persistence
Class QueryParams
- java.lang.Object
-
- com.caplin.jtm.persistence.QueryParams
-
public class QueryParams extends java.lang.Object
Class holding additional information to customize a persistence query.
-
-
Constructor Summary
Constructors Constructor Description QueryParams()
Create a new instance ofQueryParams
initialized with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryParams
addArg(java.lang.String argument)
Add an argument to the list of argumentsQueryParams
addArgs(java.util.List<java.lang.String> argument)
Add multiple arguments to the list of argumentsQueryParams
addOrdering(java.lang.String fieldName, Ordering order)
Add a criterion to the List of ordering criteriajava.lang.String[]
getArgs()
long
getLimit()
java.lang.String[]
getOrderingAsEncodedArray()
QueryParams
setLimit(long limit)
Set the maximum number of rows to be returned by the query
-
-
-
Method Detail
-
addArg
public QueryParams addArg(java.lang.String argument)
Add an argument to the list of arguments- Parameters:
argument
- argument to be added- Returns:
- this instance of
QueryParams
-
addArgs
public QueryParams addArgs(java.util.List<java.lang.String> argument)
Add multiple arguments to the list of arguments- Parameters:
argument
- arguments to be added- Returns:
- this instance of
QueryParams
-
addOrdering
public QueryParams addOrdering(java.lang.String fieldName, Ordering order)
Add a criterion to the List of ordering criteria- Parameters:
fieldName
- The field to be ordered onorder
-Ordering
specifying the sort order to be applied to the field specified infieldName
- Returns:
- this instance of
QueryParams
-
setLimit
public QueryParams setLimit(long limit)
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
public java.lang.String[] getOrderingAsEncodedArray()
-
getArgs
public java.lang.String[] getArgs()
-
-