Class MongoResponse


  • public class MongoResponse
    extends BsonResponse
    Response implementation used by MongoService and backed by BsonValue that provides simplify methods to deal mongo response
    Author:
    Andrea Di Cesare
    • Constructor Detail

      • MongoResponse

        protected MongoResponse​(io.undertow.server.HttpServerExchange exchange)
    • Method Detail

      • init

        public static MongoResponse init​(io.undertow.server.HttpServerExchange exchange)
      • of

        public static MongoResponse of​(io.undertow.server.HttpServerExchange exchange)
      • type

        public static Type type()
      • readContent

        public String readContent()
        Description copied from class: ServiceResponse
        Reads the content as a String. This method is used by ResponseSender to generate the response content to send to the client.
        Overrides:
        readContent in class BsonResponse
        Returns:
        the content as string
      • getDbOperationResult

        public OperationResult getDbOperationResult()
        Returns:
        the dbOperationResult
      • setDbOperationResult

        public void setDbOperationResult​(OperationResult dbOperationResult)
        Parameters:
        dbOperationResult - the dbOperationResult to set
      • getWarnings

        public List<String> getWarnings()
        Returns:
        the warnings
      • addWarning

        public void addWarning​(String warning)
        Parameters:
        warning -
      • getCount

        public long getCount()
        Returns:
        the count
      • setCount

        public void setCount​(long count)
        Parameters:
        count - the count to set