Interface DocumentSearchResultsContract
- All Known Implementing Classes:
DocumentSearchResults,DocumentSearchResults.Builder
public interface DocumentSearchResultsContract
Defines the contract for results returned from a document search. A document search returns multiple results, each
one representing a document and it's document attributes. The results additional include information about the
criteria that was used to execute the search, as well as whether or not it was modified after it was submitted for
execution of the document search.
Additionally, results from the document search might be filtered for a particular principal for security purposes. In these cases, the document search results include information on the number of results that were filtered out because the principal executing the search did not have permission to view them.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionReturns the criteria that was used to execute the search.intReturn the number of results that matched the criteria but are not included on this results instance because they principal executing the document search did not have permissions to view them.List<? extends DocumentSearchResultContract>Returns the unmodifiable list of search results.booleanReturns true if the criteria on this search result was modified from the original criteria submitted by the executor of the document search.booleanReturns true if the results of the search returned more rows then the document search framework is allowed to return back to the caller of the api.
-
Method Details
-
getSearchResults
List<? extends DocumentSearchResultContract> getSearchResults()Returns the unmodifiable list of search results. Each of these result objects represents a document returned from the search.- Returns:
- an unmodifiable list of search results, will never be null but may be null
-
getCriteria
DocumentSearchCriteriaContract getCriteria()Returns the criteria that was used to execute the search. This may not be the same criteria that was submitted to the document search api since it is possible for criteria to be modified by backend processing of the submitted criteria. SeeisCriteriaModified()for more information.- Returns:
- the criteria used to execute this search, will never be null
-
isCriteriaModified
boolean isCriteriaModified()Returns true if the criteria on this search result was modified from the original criteria submitted by the executor of the document search. This may happen in cases where the document search implementation modifies the given criteria. This may be possible through document search customization hooks, or may happen as part of a process of "defaulting" certain portions of the criteria.- Returns:
- a boolean indicating whether or not the criteria was modified from it's original form prior to search execution
-
isOverThreshold
boolean isOverThreshold()Returns true if the results of the search returned more rows then the document search framework is allowed to return back to the caller of the api. The implementation of the document search is permitted to cap the number of results returned and a result cap can also be specified on the criteria itself.- Returns:
- true if there are more results available for the requested search then can be included in the list of results
-
getNumberOfSecurityFilteredResults
int getNumberOfSecurityFilteredResults()Return the number of results that matched the criteria but are not included on this results instance because they principal executing the document search did not have permissions to view them.- Returns:
- the number of results that were filtered for security reasons
-