T
- type of result elementspublic final class QueryResults<T>
extends java.lang.Object
implements java.io.Serializable
QueryResults
bundles data for paged query resultsConstructor and Description |
---|
QueryResults(java.util.List<T> results,
@Nullable java.lang.Long limit,
@Nullable java.lang.Long offset,
long total)
Create a new
QueryResults instance |
QueryResults(java.util.List<T> results,
QueryModifiers mod,
long total)
Create a new
QueryResults instance |
Modifier and Type | Method and Description |
---|---|
static <T> QueryResults<T> |
emptyResults() |
long |
getLimit()
Get the limit value used for the query
|
long |
getOffset()
Get the offset value used for the query
|
java.util.List<T> |
getResults()
Get the results in List form
An empty list is returned for no results.
|
long |
getTotal()
Get the total number of results
|
boolean |
isEmpty()
Return whether there are results in the current query window
|
public QueryResults(java.util.List<T> results, @Nullable @Nullable java.lang.Long limit, @Nullable @Nullable java.lang.Long offset, long total)
QueryResults
instanceresults
- paged resultslimit
- used limitoffset
- used offsettotal
- total result rows countpublic QueryResults(java.util.List<T> results, QueryModifiers mod, long total)
QueryResults
instanceresults
- paged resultsmod
- limit and offsettotal
- total result rows countpublic static <T> QueryResults<T> emptyResults()
public java.util.List<T> getResults()
public long getTotal()
public boolean isEmpty()
public long getLimit()
public long getOffset()
Copyright © 2007–2021 Querydsl. All rights reserved.