Class EntityRequest
-
- 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 EntityRequest extends SpecificRecordBase implements SpecificRecord
Make a persistence request for some entity type. The action is determined by the type of the request payload. See also: EntityResponse, PersistEntities, MergeEntities, DeleteEntities, DeleteEntitiesById, FindEntities, FindAll
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
EntityRequest.Builder
RecordBuilder for EntityRequest instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public HoldingIdentity
holdingIdentity
public Object
request
public ExternalEventContext
flowExternalEventContext
-
Constructor Summary
Constructors Constructor Description EntityRequest()
Default constructor. EntityRequest(HoldingIdentity holdingIdentity, Object request, ExternalEventContext flowExternalEventContext)
All-args constructor.
-
Method Summary
Modifier and Type Method Description HoldingIdentity
getHoldingIdentity()
Gets the value of the 'holdingIdentity' field. void
setHoldingIdentity(HoldingIdentity value)
Sets the value of the 'holdingIdentity' field. Object
getRequest()
Gets the value of the 'request' field. void
setRequest(Object value)
Sets the value of the 'request' field. ExternalEventContext
getFlowExternalEventContext()
Gets the value of the 'flowExternalEventContext' field. void
setFlowExternalEventContext(ExternalEventContext value)
Sets the value of the 'flowExternalEventContext' field. static Schema
getClassSchema()
static BinaryMessageEncoder<EntityRequest>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<EntityRequest>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<EntityRequest>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this EntityRequest to a ByteBuffer. static EntityRequest
fromByteBuffer(ByteBuffer b)
Deserializes a EntityRequest from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static EntityRequest.Builder
newBuilder()
Creates a new EntityRequest RecordBuilder. static EntityRequest.Builder
newBuilder(EntityRequest.Builder other)
Creates a new EntityRequest RecordBuilder by copying an existing Builder. static EntityRequest.Builder
newBuilder(EntityRequest other)
Creates a new EntityRequest RecordBuilder by copying an existing EntityRequest instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, 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
-
EntityRequest
EntityRequest()
Default constructor.
-
EntityRequest
EntityRequest(HoldingIdentity holdingIdentity, Object request, ExternalEventContext flowExternalEventContext)
All-args constructor.- Parameters:
holdingIdentity
- The holding identity of the user making the db request.request
- The 'request' that we wish to make to the persistence API.flowExternalEventContext
- The context of the external event that this request was sent from.
-
-
Method Detail
-
getHoldingIdentity
HoldingIdentity getHoldingIdentity()
Gets the value of the 'holdingIdentity' field.
-
setHoldingIdentity
void setHoldingIdentity(HoldingIdentity value)
Sets the value of the 'holdingIdentity' field. The holding identity of the user making the db request.
- Parameters:
value
- the value to set.
-
getRequest
Object getRequest()
Gets the value of the 'request' field.
-
setRequest
void setRequest(Object value)
Sets the value of the 'request' field. The 'request' that we wish to make to the persistence API.
- Parameters:
value
- the value to set.
-
getFlowExternalEventContext
ExternalEventContext getFlowExternalEventContext()
Gets the value of the 'flowExternalEventContext' field.
-
setFlowExternalEventContext
void setFlowExternalEventContext(ExternalEventContext value)
Sets the value of the 'flowExternalEventContext' field. The context of the external event that this request was sent from.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<EntityRequest> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<EntityRequest> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
createDecoder
static BinaryMessageDecoder<EntityRequest> 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 EntityRequest to a ByteBuffer.
-
fromByteBuffer
static EntityRequest fromByteBuffer(ByteBuffer b)
Deserializes a EntityRequest 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 EntityRequest.Builder newBuilder()
Creates a new EntityRequest RecordBuilder.
-
newBuilder
static EntityRequest.Builder newBuilder(EntityRequest.Builder other)
Creates a new EntityRequest RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static EntityRequest.Builder newBuilder(EntityRequest other)
Creates a new EntityRequest RecordBuilder by copying an existing EntityRequest instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-