Class FindWithNamedQuery

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class FindWithNamedQuery
    extends SpecificRecordBase implements SpecificRecord
                        

    Find entities matched by a named query. Parameters for the query may be specified. Pagination is supported, but there's no guarantee of consistency if the underlying data changes and using offset-based pagination. The data will not be sorted in Corda; if the database returns an unpredictable order that must be handled by the caller. FindWithNamedQuery can be used to enforce ordering if required. Replies with EntityResponse

    • Constructor Detail

      • FindWithNamedQuery

        FindWithNamedQuery()
        Default constructor.
      • FindWithNamedQuery

        FindWithNamedQuery(String queryName, Map<String, ByteBuffer> parameters, Integer offset, Integer limit, ByteBuffer resumePoint)
        All-args constructor.
        Parameters:
        queryName - The name of a named query defined somewhere in the CPK.
        parameters - Parameters for the query, with each value represented as a bytes array payload serialized in AMQP format.
        offset - The index of the first result in the query output that should be returned.
        limit - Limit number of rows in the output query results, after applying the offset.
        resumePoint - When a query supports stable paging, contains opaque data telling the query where to resume from when making queries for subsequent pages.
    • Method Detail

      • setQueryName

         void setQueryName(String value)

        Sets the value of the 'queryName' field. The name of a named query defined somewhere in the CPK.

        Parameters:
        value - the value to set.
      • setParameters

         void setParameters(Map<String, ByteBuffer> value)

        Sets the value of the 'parameters' field. Parameters for the query, with each value represented as a bytes array payload serialized in AMQP format. Null values must be tested using IS NULL in the query; it is not possible to pass in a null as a parameter value.

        Parameters:
        value - the value to set.
      • getOffset

         int getOffset()

        Gets the value of the 'offset' field.

      • setOffset

         void setOffset(int value)

        Sets the value of the 'offset' field. The index of the first result in the query output that should be returned.

        Parameters:
        value - the value to set.
      • getLimit

         int getLimit()

        Gets the value of the 'limit' field.

      • setLimit

         void setLimit(int value)

        Sets the value of the 'limit' field. Limit number of rows in the output query results, after applying the offset. Use the maximum int value if you do not want a lower limit.

        Parameters:
        value - the value to set.
      • setResumePoint

         void setResumePoint(ByteBuffer value)

        Sets the value of the 'resumePoint' field. When a query supports stable paging, contains opaque data telling the query where to resume from when making queries for subsequent pages.

        Parameters:
        value - the value to set.
      • createDecoder

         static BinaryMessageDecoder<FindWithNamedQuery> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint