Interface QueryResponseMessage<T>

Type Parameters:
T - The type of object resulting from the query
All Superinterfaces:
Message<T>, ResultMessage<T>, Serializable
All Known Implementing Classes:
ConvertingResponseMessage, GenericQueryResponseMessage, GrpcBackedResponseMessage

public interface QueryResponseMessage<T> extends ResultMessage<T>
Message that contains the results of a Query. Results are represented as a Collection of result objects. When a query resulted in a single result object, that object is contained as the sole element of the collection.
Since:
3.2
Author:
Allard Buijze
  • Method Details

    • withMetaData

      QueryResponseMessage<T> withMetaData(@Nonnull Map<String,?> metaData)
      Returns a copy of this QueryResponseMessage with the given metaData. The payload remains unchanged.
      Specified by:
      withMetaData in interface Message<T>
      Specified by:
      withMetaData in interface ResultMessage<T>
      Parameters:
      metaData - The new MetaData for the QueryResponseMessage
      Returns:
      a copy of this message with the given MetaData
    • andMetaData

      QueryResponseMessage<T> andMetaData(@Nonnull Map<String,?> additionalMetaData)
      Returns a copy of this QueryResponseMessage with its MetaData merged with given metaData. The payload remains unchanged.
      Specified by:
      andMetaData in interface Message<T>
      Specified by:
      andMetaData in interface ResultMessage<T>
      Parameters:
      additionalMetaData - The MetaData to merge into the QueryResponseMessage
      Returns:
      a copy of this message with the given additional MetaData