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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
FindWithNamedQuery.Builder
RecordBuilder for FindWithNamedQuery instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public String
queryName
public Map<String, ByteBuffer>
parameters
public int
offset
public int
limit
public ByteBuffer
resumePoint
-
Constructor Summary
Constructors Constructor Description FindWithNamedQuery()
Default constructor. FindWithNamedQuery(String queryName, Map<String, ByteBuffer> parameters, Integer offset, Integer limit, ByteBuffer resumePoint)
All-args constructor.
-
Method Summary
Modifier and Type Method Description String
getQueryName()
Gets the value of the 'queryName' field. void
setQueryName(String value)
Sets the value of the 'queryName' field. Map<String, ByteBuffer>
getParameters()
Gets the value of the 'parameters' field. void
setParameters(Map<String, ByteBuffer> value)
Sets the value of the 'parameters' field. int
getOffset()
Gets the value of the 'offset' field. void
setOffset(int value)
Sets the value of the 'offset' field. int
getLimit()
Gets the value of the 'limit' field. void
setLimit(int value)
Sets the value of the 'limit' field. ByteBuffer
getResumePoint()
Gets the value of the 'resumePoint' field. void
setResumePoint(ByteBuffer value)
Sets the value of the 'resumePoint' field. static Schema
getClassSchema()
static BinaryMessageEncoder<FindWithNamedQuery>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<FindWithNamedQuery>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<FindWithNamedQuery>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this FindWithNamedQuery to a ByteBuffer. static FindWithNamedQuery
fromByteBuffer(ByteBuffer b)
Deserializes a FindWithNamedQuery from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static FindWithNamedQuery.Builder
newBuilder()
Creates a new FindWithNamedQuery RecordBuilder. static FindWithNamedQuery.Builder
newBuilder(FindWithNamedQuery.Builder other)
Creates a new FindWithNamedQuery RecordBuilder by copying an existing Builder. static FindWithNamedQuery.Builder
newBuilder(FindWithNamedQuery other)
Creates a new FindWithNamedQuery RecordBuilder by copying an existing FindWithNamedQuery instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
void
customEncode(Encoder out)
void
customDecode(ResolvingDecoder in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, equals, getConversion, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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
-
getQueryName
String getQueryName()
Gets the value of the 'queryName' field.
-
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.
-
getParameters
Map<String, ByteBuffer> getParameters()
Gets the value of the 'parameters' field.
-
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.
-
getResumePoint
ByteBuffer getResumePoint()
Gets the value of the 'resumePoint' field.
-
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.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<FindWithNamedQuery> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<FindWithNamedQuery> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
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
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this FindWithNamedQuery to a ByteBuffer.
-
fromByteBuffer
static FindWithNamedQuery fromByteBuffer(ByteBuffer b)
Deserializes a FindWithNamedQuery from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static FindWithNamedQuery.Builder newBuilder()
Creates a new FindWithNamedQuery RecordBuilder.
-
newBuilder
static FindWithNamedQuery.Builder newBuilder(FindWithNamedQuery.Builder other)
Creates a new FindWithNamedQuery RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static FindWithNamedQuery.Builder newBuilder(FindWithNamedQuery other)
Creates a new FindWithNamedQuery RecordBuilder by copying an existing FindWithNamedQuery instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
customEncode
void customEncode(Encoder out)
-
customDecode
void customDecode(ResolvingDecoder in)
-
-
-
-