public static final class DocumentSearchResult.Builder extends Object implements Serializable, ModelBuilder, DocumentSearchResultContract
DocumentSearchResult
instances. Enforces the constraints of the
DocumentSearchResultContract
.Modifier and Type | Method and Description |
---|---|
DocumentSearchResult |
build()
Returns an instance of the object being built by this builder based
on the current state of the builder.
|
static DocumentSearchResult.Builder |
create(Document.Builder document)
Create a builder for the document search result and initialize it with the given document builder.
|
static DocumentSearchResult.Builder |
create(DocumentSearchResultContract contract)
Creates a new builder instance initialized with copies of the properties from the given contract.
|
Document.Builder |
getDocument()
Returns the document represented by this result.
|
List<DocumentAttribute.AbstractBuilder<?>> |
getDocumentAttributes()
Returns an unmodifiable list of objects implementing the
DocumentAttributeContract interface. |
void |
setDocument(Document.Builder document) |
void |
setDocumentAttributes(List<DocumentAttribute.AbstractBuilder<?>> documentAttributes) |
public static DocumentSearchResult.Builder create(Document.Builder document)
document
- the document builder with which to initialize the returned builder instanceIllegalArgumentException
- if the given document builder is nullpublic static DocumentSearchResult.Builder create(DocumentSearchResultContract contract)
contract
- the contract from which to copy propertiesIllegalArgumentException
- if the given contract is nullpublic DocumentSearchResult build()
ModelBuilder
build
in interface ModelBuilder
public Document.Builder getDocument()
DocumentSearchResultContract
DocumentContract
with the exception of document variables
. Even if a document has variables
defined they will not be included on the document returned from this method.getDocument
in interface DocumentSearchResultContract
public List<DocumentAttribute.AbstractBuilder<?>> getDocumentAttributes()
DocumentSearchResultContract
DocumentAttributeContract
interface. These
define the various document attributes that have been indexed for the document represented by this result.getDocumentAttributes
in interface DocumentSearchResultContract
public void setDocument(Document.Builder document)
public void setDocumentAttributes(List<DocumentAttribute.AbstractBuilder<?>> documentAttributes)
Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.