Class DocumentSearchResult

java.lang.Object
org.kuali.rice.core.api.mo.AbstractDataTransferObject
org.kuali.rice.kew.api.document.search.DocumentSearchResult
All Implemented Interfaces:
Serializable, org.kuali.rice.core.api.mo.ModelObjectBasic, org.kuali.rice.core.api.mo.ModelObjectComplete, DocumentSearchResultContract

public final class DocumentSearchResult extends org.kuali.rice.core.api.mo.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:
  • Method Details

    • getDocument

      public Document getDocument()
      Description copied from interface: DocumentSearchResultContract
      Returns the document represented by this result. This should include all information available on the 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.
      Specified by:
      getDocument in interface DocumentSearchResultContract
      Returns:
      the document represented by this result, this will never be null
    • getDocumentAttributes

      public List<DocumentAttribute> getDocumentAttributes()
      Description copied from interface: DocumentSearchResultContract
      Returns an unmodifiable list of objects implementing the DocumentAttributeContract interface. These define the various document attributes that have been indexed for the document represented by this result.
      Specified by:
      getDocumentAttributes in interface DocumentSearchResultContract
      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

      public List<DocumentAttribute> getDocumentAttributeByName(String attributeName)
      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

      public DocumentAttribute getSingleDocumentAttributeByName(String attributeName)
      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