Package org.opennms.netmgt.search.api
Class SearchResult
- java.lang.Object
-
- org.opennms.netmgt.search.api.SearchResult
-
public class SearchResult extends Object
Represents the complete result set of a search for a givenSearchContext
.- Author:
- mvrueden
-
-
Field Summary
Fields Modifier and Type Field Description static SearchResult
EMPTY
-
Constructor Summary
Constructors Constructor Description SearchResult(String context)
SearchResult(SearchContext searchContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addItem(SearchResultItem item)
SearchContext
getContext()
List<SearchResultItem>
getResults()
boolean
hasMore()
boolean
isEmpty()
boolean
isMore()
void
setMore(boolean more)
SearchResult
withMore(boolean hasMore)
SearchResult
withMore(Collection<?> totalList, Collection<?> subList)
SearchResult
withResults(List<SearchResultItem> searchResultItems)
-
-
-
Field Detail
-
EMPTY
public static SearchResult EMPTY
-
-
Constructor Detail
-
SearchResult
public SearchResult(String context)
-
SearchResult
public SearchResult(SearchContext searchContext)
-
-
Method Detail
-
addItem
public void addItem(SearchResultItem item)
-
getContext
public SearchContext getContext()
-
hasMore
public boolean hasMore()
-
getResults
public List<SearchResultItem> getResults()
-
isEmpty
public boolean isEmpty()
-
setMore
public void setMore(boolean more)
-
isMore
public boolean isMore()
-
withResults
public SearchResult withResults(List<SearchResultItem> searchResultItems)
-
withMore
public SearchResult withMore(boolean hasMore)
-
withMore
public SearchResult withMore(Collection<?> totalList, Collection<?> subList)
-
-