Class DocumentSearchResult.Builder
java.lang.Object
org.kuali.rice.kew.api.document.search.DocumentSearchResult.Builder
- All Implemented Interfaces:
Serializable,ModelBuilder,DocumentSearchResultContract
- Enclosing class:
DocumentSearchResult
public static final class DocumentSearchResult.Builder
extends Object
implements Serializable, ModelBuilder, DocumentSearchResultContract
A builder which can be used to construct
DocumentSearchResult instances. Enforces the constraints of the
DocumentSearchResultContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()static DocumentSearchResult.Buildercreate(Document.Builder document) Create a builder for the document search result and initialize it with the given document builder.static DocumentSearchResult.Buildercreate(DocumentSearchResultContract contract) Creates a new builder instance initialized with copies of the properties from the given contract.Returns the document represented by this result.Returns an unmodifiable list of objects implementing theDocumentAttributeContractinterface.voidsetDocument(Document.Builder document) voidsetDocumentAttributes(List<DocumentAttribute.AbstractBuilder<?>> documentAttributes)
-
Method Details
-
create
Create a builder for the document search result and initialize it with the given document builder. Additionally initializes the list of document attribute builders on the new instance to an empty list.- Parameters:
document- the document builder with which to initialize the returned builder instance- Returns:
- a builder instance initialized with the given document builder
- Throws:
IllegalArgumentException- if the given document builder is null
-
create
Creates a new builder instance initialized with copies of the properties from the given contract.- Parameters:
contract- the contract from which to copy properties- Returns:
- a builder instance initialized with properties from the given contract
- Throws:
IllegalArgumentException- if the given contract is null
-
build
- Specified by:
buildin interfaceModelBuilder
-
getDocument
Description copied from interface:DocumentSearchResultContractReturns the document represented by this result. This should include all information available on theDocumentContractwith the exception of documentvariables. Even if a document has variables defined they will not be included on the document returned from this method.- Specified by:
getDocumentin interfaceDocumentSearchResultContract- Returns:
- the document represented by this result, this will never be null
-
getDocumentAttributes
Description copied from interface:DocumentSearchResultContractReturns an unmodifiable list of objects implementing theDocumentAttributeContractinterface. These define the various document attributes that have been indexed for the document represented by this result.- Specified by:
getDocumentAttributesin interfaceDocumentSearchResultContract- Returns:
- an unmodifiable list containing the document attribute values associated with the document represented by this result, this will never be null but may be empty
-
setDocument
-
setDocumentAttributes
-