Package com.caplin.jtm.persistence
Class QueryParams
- java.lang.Object
-
- com.caplin.jtm.persistence.QueryParams
-
public class QueryParams extends 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(String argument)
Add an argument to the list of argumentsQueryParams
addArgs(List<String> argument)
Add multiple arguments to the list of argumentsQueryParams
addOrdering(String fieldName, Ordering order)
Add a criterion to the List of ordering criteriaString[]
getArgs()
long
getLimit()
String[]
getOrderingAsEncodedArray()
QueryParams
setLimit(long limit)
Set the maximum number of rows to be returned by the query
-
-
-
Method Detail
-
addArg
public QueryParams addArg(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(List<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(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 String[] getOrderingAsEncodedArray()
-
getArgs
public String[] getArgs()
-
-