public final class SearchResults<T>
extends java.lang.Object
Constructor and Description |
---|
SearchResults(java.util.List<T> results,
java.lang.Long limit,
java.lang.Long offset,
long total)
Create a new SearchResults instance
|
SearchResults(java.util.List<T> results,
QueryModifiers mod,
long total)
Create a new SearchResults instance
|
Modifier and Type | Method and Description |
---|---|
static <T> SearchResults<T> |
emptyResults() |
long |
getLimit() |
long |
getOffset() |
java.util.List<T> |
getResults()
Get the results in List form
An empty list is returned for no results.
|
long |
getTotal()
Get the number of total results
|
boolean |
isEmpty() |
public SearchResults(java.util.List<T> results, @Nullable java.lang.Long limit, @Nullable java.lang.Long offset, long total)
results
- paged resultslimit
- used limitoffset
- used offsettotal
- total result rows countpublic SearchResults(java.util.List<T> results, QueryModifiers mod, long total)
results
- paged resultsmod
- limit and offsettotal
- total result rows countpublic static <T> SearchResults<T> emptyResults()
public java.util.List<T> getResults()
public long getTotal()
public boolean isEmpty()
public long getLimit()
public long getOffset()
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.