public static final class DocumentSearchResults.Builder extends Object implements Serializable, ModelBuilder, DocumentSearchResultsContract
DocumentSearchResults
instances. Enforces the constraints of
the DocumentSearchResultsContract
.Modifier and Type | Method and Description |
---|---|
DocumentSearchResults |
build()
Returns an instance of the object being built by this builder based
on the current state of the builder.
|
static DocumentSearchResults.Builder |
create(DocumentSearchCriteria.Builder criteria)
Create a builder for the document search result and initialize it with the given document search criteria
builder.
|
static DocumentSearchResults.Builder |
create(DocumentSearchResultsContract contract)
Creates a new builder instance initialized with copies of the properties from the given contract.
|
DocumentSearchCriteria.Builder |
getCriteria()
Returns the criteria that was used to execute the search.
|
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.
|
List<DocumentSearchResult.Builder> |
getSearchResults()
Returns the unmodifiable list of search results.
|
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.
|
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.
|
void |
setCriteria(DocumentSearchCriteria.Builder criteria)
Sets the criteria builder on this builder to the given value.
|
void |
setCriteriaModified(boolean criteriaModified) |
void |
setNumberOfSecurityFilteredResults(int numberOfSecurityFilteredResults) |
void |
setOverThreshold(boolean overThreshold) |
void |
setSearchResults(List<DocumentSearchResult.Builder> searchResults) |
public static DocumentSearchResults.Builder create(DocumentSearchCriteria.Builder criteria)
criteriaModified
to "false", overThreshold
to "false",
and numberOfSecurityFilteredResults
to 0.criteria
- the document search criteria builder with which to initialize the returned builder instanceIllegalArgumentException
- if the given document search criteria builder is nullpublic static DocumentSearchResults.Builder create(DocumentSearchResultsContract contract)
contract
- the contract from which to copy propertiesIllegalArgumentException
- if the given contract is nullpublic DocumentSearchResults build()
ModelBuilder
build
in interface ModelBuilder
public List<DocumentSearchResult.Builder> getSearchResults()
DocumentSearchResultsContract
getSearchResults
in interface DocumentSearchResultsContract
public DocumentSearchCriteria.Builder getCriteria()
DocumentSearchResultsContract
DocumentSearchResultsContract.isCriteriaModified()
for more information.getCriteria
in interface DocumentSearchResultsContract
public boolean isCriteriaModified()
DocumentSearchResultsContract
isCriteriaModified
in interface DocumentSearchResultsContract
public boolean isOverThreshold()
DocumentSearchResultsContract
isOverThreshold
in interface DocumentSearchResultsContract
public int getNumberOfSecurityFilteredResults()
DocumentSearchResultsContract
getNumberOfSecurityFilteredResults
in interface DocumentSearchResultsContract
public void setSearchResults(List<DocumentSearchResult.Builder> searchResults)
public void setCriteria(DocumentSearchCriteria.Builder criteria)
criteria
- the criteria builder to set, must not be nullIllegalArgumentException
- if criteria is nullpublic void setCriteriaModified(boolean criteriaModified)
public void setOverThreshold(boolean overThreshold)
public void setNumberOfSecurityFilteredResults(int numberOfSecurityFilteredResults)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.