Class DocumentIdResponse


  • public class DocumentIdResponse
    extends Response
    The asynchronous response to a document remove operation. This is a value object.
    Author:
    Einar M R Rosenvinge
    • Constructor Summary

      Constructors 
      Constructor Description
      DocumentIdResponse​(long requestId)
      Creates a successful response
      DocumentIdResponse​(long requestId, com.yahoo.document.DocumentId documentId)
      Creates a successful response containing a document id
      DocumentIdResponse​(long requestId, com.yahoo.document.DocumentId documentId, java.lang.String textMessage, boolean success)
      Creates a response containing a textual message and/or a document id
      DocumentIdResponse​(long requestId, java.lang.String textMessage, boolean success)
      Creates a response containing a textual message
    • Constructor Detail

      • DocumentIdResponse

        public DocumentIdResponse​(long requestId)
        Creates a successful response
      • DocumentIdResponse

        public DocumentIdResponse​(long requestId,
                                  com.yahoo.document.DocumentId documentId)
        Creates a successful response containing a document id
        Parameters:
        documentId - the DocumentId to encapsulate in the Response
      • DocumentIdResponse

        public DocumentIdResponse​(long requestId,
                                  java.lang.String textMessage,
                                  boolean success)
        Creates a response containing a textual message
        Parameters:
        textMessage - the message to encapsulate in the Response
        success - true if the response represents a successful call
      • DocumentIdResponse

        public DocumentIdResponse​(long requestId,
                                  com.yahoo.document.DocumentId documentId,
                                  java.lang.String textMessage,
                                  boolean success)
        Creates a response containing a textual message and/or a document id
        Parameters:
        documentId - the DocumentId to encapsulate in the Response
        textMessage - the message to encapsulate in the Response
        success - true if the response represents a successful call
    • Method Detail

      • getDocumentId

        public com.yahoo.document.DocumentId getDocumentId()
        Returns the document id of this response, or null if there is none
        Returns:
        the DocumentId, or null
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class Response
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Response