Package com.querydsl.core
Class QueryResults<T>
java.lang.Object
com.querydsl.core.QueryResults<T>
- Type Parameters:
T- type of result elements
- All Implemented Interfaces:
Serializable
QueryResults bundles data for paged query results- Author:
- tiwe
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQueryResults(List<T> results, @Nullable Long limit, @Nullable Long offset, long total) Create a newQueryResultsinstanceQueryResults(List<T> results, QueryModifiers mod, long total) Create a newQueryResultsinstance -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> QueryResults<T>longgetLimit()Get the limit value used for the querylongGet the offset value used for the queryGet the results in List form An empty list is returned for no results.longgetTotal()Get the total number of resultsbooleanisEmpty()Return whether there are results in the current query window
-
Constructor Details
-
QueryResults
public QueryResults(List<T> results, @Nullable @Nullable Long limit, @Nullable @Nullable Long offset, long total) Create a newQueryResultsinstance- Parameters:
results- paged resultslimit- used limitoffset- used offsettotal- total result rows count
-
QueryResults
Create a newQueryResultsinstance- Parameters:
results- paged resultsmod- limit and offsettotal- total result rows count
-
-
Method Details
-
emptyResults
-
getResults
Get the results in List form An empty list is returned for no results.- Returns:
- results
-
getTotal
public long getTotal()Get the total number of results- Returns:
- total rows
-
isEmpty
public boolean isEmpty()Return whether there are results in the current query window- Returns:
- true, if no results where found
-
getLimit
public long getLimit()Get the limit value used for the query- Returns:
- applied limit
-
getOffset
public long getOffset()Get the offset value used for the query- Returns:
- applied offset
-