Package org.opennms.netmgt.search.api
Class SearchResult
- java.lang.Object
-
- org.opennms.netmgt.search.api.SearchResult
-
public class SearchResult extends java.lang.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(java.lang.String context)
SearchResult(SearchContext searchContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addItem(SearchResultItem item)
SearchContext
getContext()
java.util.List<SearchResultItem>
getResults()
boolean
hasMore()
boolean
isEmpty()
boolean
isMore()
void
setMore(boolean more)
SearchResult
withMore(boolean hasMore)
SearchResult
withMore(java.util.Collection<?> totalList, java.util.Collection<?> subList)
SearchResult
withResults(java.util.List<SearchResultItem> searchResultItems)
-
-
-
Field Detail
-
EMPTY
public static SearchResult EMPTY
-
-
Constructor Detail
-
SearchResult
public SearchResult(java.lang.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 java.util.List<SearchResultItem> getResults()
-
isEmpty
public boolean isEmpty()
-
setMore
public void setMore(boolean more)
-
isMore
public boolean isMore()
-
withResults
public SearchResult withResults(java.util.List<SearchResultItem> searchResultItems)
-
withMore
public SearchResult withMore(boolean hasMore)
-
withMore
public SearchResult withMore(java.util.Collection<?> totalList, java.util.Collection<?> subList)
-
-