com.mysema.query
Class SearchResults<T>

java.lang.Object
  extended by com.mysema.query.SearchResults<T>

@Immutable
public final class SearchResults<T>
extends Object

SearchResults bundles data for paged search results

Author:
tiwe

Constructor Summary
SearchResults(List<T> results, Long limit, Long offset, long total)
           
SearchResults(List<T> results, QueryModifiers mod, long total)
           
 
Method Summary
static
<T> SearchResults<T>
emptyResults()
           
 long getLimit()
           
 long getOffset()
           
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResults

public SearchResults(List<T> results,
                     @Nullable
                     Long limit,
                     @Nullable
                     Long offset,
                     long total)

SearchResults

public SearchResults(List<T> results,
                     QueryModifiers mod,
                     long total)
Method Detail

emptyResults

public static <T> SearchResults<T> emptyResults()

getResults

public List<T> getResults()
Get the results in List form An empty list is returned for no results.

Returns:

getTotal

public long getTotal()
Get the number of total results

Returns:

isEmpty

public boolean isEmpty()
Returns:

getLimit

public long getLimit()
Returns:

getOffset

public long getOffset()
Returns:


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.