gov.nih.nci.caarray.external.v1_0.query
Class SearchResult<T extends AbstractCaArrayEntity>
java.lang.Object
gov.nih.nci.caarray.external.v1_0.query.SearchResult<T>
- Type Parameters:
T
- the class of result objects this SearchResult encapsulates.
- All Implemented Interfaces:
- java.io.Serializable
public class SearchResult<T extends AbstractCaArrayEntity>
- extends java.lang.Object
- implements java.io.Serializable
SearchResult represents the result of performing a search.
- Author:
- dkokotov
- See Also:
- Serialized Form
Constructor Summary |
SearchResult()
No-op constructor (for tooling). |
SearchResult(java.util.List<T> results,
int maxAllowedResults,
int firstResultOffset)
Create a new SearchResult with given results and max # of results. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchResult
public SearchResult()
- No-op constructor (for tooling).
SearchResult
public SearchResult(java.util.List<T> results,
int maxAllowedResults,
int firstResultOffset)
- Create a new SearchResult with given results and max # of results.
- Parameters:
results
- the list of results.maxAllowedResults
- the maximum number of results that the service will return for the original search in a
single API invocation.firstResultOffset
- the offset (0-based) of the first result in this SearchResult relative to the overall
result set of the original query.
getResults
public java.util.List<T> getResults()
- Returns:
- the results
getMaxAllowedResults
public int getMaxAllowedResults()
- Returns:
- the maxAllowedResults
setMaxAllowedResults
public void setMaxAllowedResults(int maxAllowedResults)
- Parameters:
maxAllowedResults
- the maxAllowedResults to set
getFirstResultOffset
public int getFirstResultOffset()
- Returns:
- the offset (0-based) of the first result in this SearchResult relative to the overall
result set of the original query.
setFirstResultOffset
public void setFirstResultOffset(int firstResultOffset)
- Parameters:
firstResultOffset
- the offset (0-based) of the first result in this SearchResult relative to the overall
result set of the original query.
isFullResult
public boolean isFullResult()
- Returns:
- true if this represents a full result, meaning that the results returned are all of the results
requested; false if the actual number of results was greater than the maximum number of results the
service can return, and therefore this result is a subset of the available results.