public interface TransactionParam
Transaction parameter container.
This container of transaction parameters is created by
Context.makeTransactionParam()
and it is used by
Context.makeTransaction()
.
Field Summary | |
---|---|
static int |
ACTION_ENTITY_ADD
Action-code: request to add an entity on the server. |
static int |
ACTION_ENTITY_DEL
Action-code: request to logically remove an entity from the server. |
static int |
ACTION_ENTITY_KIL
Action-code: request to physically remove an entity from the server. |
static int |
ACTION_ENTITY_RWT
Action-code: request to replace an entity on the server. |
Method Summary | |
---|---|
int |
getAction()
Returns the requested action of a new transaction. |
Entity |
getEntity()
Returns the Entity of a new transaction. |
int |
getKeyID()
Returns the KeyID of a new transaction. |
Mask |
getMask()
Returns the optional mask of a new transaction. |
TransactionID |
getPendingTransactionID()
Returns the TransactionID of a past transaction. |
boolean |
getResEntityRequired()
Returns the indication that client want an Entity come back from the server. |
void |
setAction(int action)
Set/replace the requested action of a new transaction. |
void |
setEntity(Entity entity)
Set/replace the Entity of a new transaction. |
void |
setKeyID(int keyID)
Set/replace the KeyID of a new transaction. |
void |
setMask(Mask mask)
Set/replace the optional mask of a new transaction. |
void |
setPendingTransactionID(TransactionID transactionID)
Set/replace the TransactionID of a past transaction. |
void |
setResEntityRequired(boolean required)
Set/replace the indication that client want an Entity come back from the server. |
Methods inherited from interface Param |
---|
isBound |
Field Detail |
---|
static final int ACTION_ENTITY_ADD
This value may be set with setAction(int)
and retrieved by
getAction()
.
static final int ACTION_ENTITY_DEL
This value may be set with setAction(int)
and retrieved by
getAction()
.
static final int ACTION_ENTITY_RWT
This value may be set with setAction(int)
and retrieved by
getAction()
.
static final int ACTION_ENTITY_KIL
This value may be set with setAction(int)
and retrieved by
getAction()
.
Method Detail |
---|
int getAction()
The requested action may be one of:
ACTION_ENTITY_ADD
to request to add an entity,
ACTION_ENTITY_DEL
to request to logically remove an entity,
ACTION_ENTITY_RWT
to request to rewrite an entity,
ACTION_ENTITY_KIL
to request to physically remove an
entity.
Transaction.send()
ACTION_ENTITY_ADD
getAction() == ACTION_ENTITY_ADD
|| getAction() == ACTION_ENTITY_DEL
|| getAction() == ACTION_ENTITY_RWT
|| getAction() == ACTION_ENTITY_KIL
who sets this value
int getKeyID()
KeyID may be a primary key of the EntityClass
of
getEntity()
, otherwise it is zero. In the first case all the
KeyID fields of the Entity must be properly
filled.
Transaction.send()
getKeyID() == 0
|| getEntity()
!= null
&& getEntity()
.iskey(getKeyID(), true)
who sets this value
Entity getEntity()
This is the Entity on which the action will be done.
The fields of this Entity that must be properly filled are:
getKeyID()
(if
getKeyID()
is not zero),
getMask()
(if
getMask()
is not null
).
Transaction.send()
null
(getEntity() == null) != (getPendingTransactionID()
== null)
who sets this value
Mask getMask()
When this value is not
This mask and the Entity must refer to the same
null
it describes which fields
of the Entity must be properly filled,
because they will be sent to the server.
EntityClass
.
Transaction.send()
null
getMask() == null
|| getEntity()
!= null
&& getMask().getEntityClassID() == getEntity()
.getEntityClassID()
who sets this value
boolean getResEntityRequired()
When this value is false
the server will not send back an
Entity to the client inside the
TransactionSendEvent
and
TransactionQueryEvent
answers to the
Transaction.send()
and Transaction.query()
requests.
Otherwise, when this value is true
the server can choose
to put an Entity in the answer. In this case the client may find a not-null
returned value of TransactionEvent.getEntity()
.
Transaction.send()
and Transaction.query()
false
true // any value
who sets this value
TransactionID getPendingTransactionID()
If this value is not null
then
Context.makeTransaction()
will attempt to
create a Transaction that refers a past transaction with this
TransactionID. In this case this TransactionID must
belong to the same
Connection on which the Transaction will be created.
Transaction.getTransactionID()
and Transaction.query()
null
(getPendingTransactionID() == null) != (getEntity()
== null)
who sets this value
void setAction(int action) throws IllegalStateException
action
- the requested action of a new transaction.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setKeyID(int keyID) throws IllegalStateException
keyID
- the KeyID of a new transaction.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setEntity(Entity entity) throws IllegalStateException
entity
- the Entity of a new transaction.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setMask(Mask mask) throws IllegalStateException
mask
- the optional mask of a new transaction.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setResEntityRequired(boolean required) throws IllegalStateException
required
- the indication that client want an Entity come back from the
server.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their
meaning
void setPendingTransactionID(TransactionID transactionID) throws IllegalStateException
transactionID
- the TransactionID of a past transaction.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their
meaning