Class DocumentSearchResult
java.lang.Object
org.kuali.rice.core.api.mo.AbstractDataTransferObject
org.kuali.rice.kew.api.document.search.DocumentSearchResult
- All Implemented Interfaces:
Serializable,ModelObjectBasic,ModelObjectComplete,DocumentSearchResultContract
public final class DocumentSearchResult
extends AbstractDataTransferObject
implements DocumentSearchResultContract
An immutable data transfer object implementation of the
DocumentSearchResultContract. Instances of this
class should be constructed using the nested DocumentSearchResult.Builder class.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder which can be used to constructDocumentSearchResultinstances. -
Method Summary
Modifier and TypeMethodDescriptionReturns the document represented by this result.getDocumentAttributeByName(String attributeName) Returns an unmodifiable list of all document attributes on this result which have the given name.Returns an unmodifiable list of objects implementing theDocumentAttributeContractinterface.getSingleDocumentAttributeByName(String attributeName) Returns a single document attribute from this result which has the given name.Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, equalsExcludeFields, getDefaultHashCodeEqualsExcludeFields, hashCode, hashCodeExcludeFields, toString
-
Method Details
-
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
-
getDocumentAttributeByName
Returns an unmodifiable list of all document attributes on this result which have the given name. It is legal for a result to contain more than one attribute of the same name. In these cases, this represents a document attribute which has more than one value.- Parameters:
attributeName- the attribute name of document attributes to retrieve- Returns:
- an unmodifiable list of document attributes with the given name, will never be null but may be empty
-
getSingleDocumentAttributeByName
Returns a single document attribute from this result which has the given name. If there is more than one document attribute on this result with the given name, only a single one will be returned (though it is undeterministic which one will this will be). If there are no attributes on this result with the given name then this method will return null.- Parameters:
attributeName- the attribute name of the document attribute to retrieve- Returns:
- a single document attribute with the given name, or null if one does not exist
-