it.list.jft
Interface TransactionParam

All Superinterfaces:
Param

public interface TransactionParam
extends Param

Transaction parameter container.

This container of transaction parameters is created by Context.makeTransactionParam() and it is used by Context.makeTransaction().

See Also:
Transaction Usage, Acceptable Values

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

ACTION_ENTITY_ADD

static final int ACTION_ENTITY_ADD
Action-code: request to add an entity on the server.

This value may be set with setAction(int) and retrieved by getAction().

See Also:
Constant Field Values

ACTION_ENTITY_DEL

static final int ACTION_ENTITY_DEL
Action-code: request to logically remove an entity from the server.

This value may be set with setAction(int) and retrieved by getAction().

See Also:
Constant Field Values

ACTION_ENTITY_RWT

static final int ACTION_ENTITY_RWT
Action-code: request to replace an entity on the server.

This value may be set with setAction(int) and retrieved by getAction().

See Also:
Constant Field Values

ACTION_ENTITY_KIL

static final int ACTION_ENTITY_KIL
Action-code: request to physically remove an entity from the server.

This value may be set with setAction(int) and retrieved by getAction().

See Also:
Constant Field Values
Method Detail

getAction

int getAction()
Returns the requested action of a new transaction.

The requested action may be one of:

Used by:
Transaction.send()
Default value:
ACTION_ENTITY_ADD
Acceptable values:
   getAction() == ACTION_ENTITY_ADD
|| getAction() == ACTION_ENTITY_DEL
|| getAction() == ACTION_ENTITY_RWT
|| getAction() == ACTION_ENTITY_KIL

Returns:
the requested action of a new transaction.
See Also:
who sets this value

getKeyID

int getKeyID()
Returns the KeyID of a new transaction.

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.

Used by:
Transaction.send()
Default value:
0
Acceptable values:
getKeyID() == 0
|| getEntity() != null && getEntity().iskey(getKeyID(), true)

Returns:
the KeyID of a new transaction.
See Also:
who sets this value

getEntity

Entity getEntity()
Returns the Entity of a new transaction.

This is the Entity on which the action will be done.

The fields of this Entity that must be properly filled are:

All others fields of this Entity may be properly filled.

Used by:
Transaction.send()
Default value:
null
Acceptable values:
(getEntity() == null) != (getPendingTransactionID() == null)

Returns:
the Entity of a new transaction.
See Also:
who sets this value

getMask

Mask getMask()
Returns the optional mask of a new transaction.

When this value is not null it describes which fields of the Entity must be properly filled, because they will be sent to the server.

This mask and the Entity must refer to the same EntityClass.

Used by:
Transaction.send()
Default value:
null
Acceptable values:
getMask() == null
|| getEntity() != null && getMask().getEntityClassID() == getEntity().getEntityClassID()

Returns:
the optional mask of a new transaction.
See Also:
who sets this value

getResEntityRequired

boolean getResEntityRequired()
Returns the indication that client want an Entity come back from the server.

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().

Used by:
Transaction.send() and Transaction.query()
Default value:
false
Acceptable values:
true // any value

Returns:
the indication that client want an Entity come back from the server.
See Also:
who sets this value

getPendingTransactionID

TransactionID getPendingTransactionID()
Returns the TransactionID of a past transaction.

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.

Used by:
Transaction.getTransactionID() and Transaction.query()
Default value:
null
Acceptable values:
(getPendingTransactionID() == null) != (getEntity() == null)

Returns:
the TransactionID of a past transaction.
See Also:
who sets this value

setAction

void setAction(int action)
               throws IllegalStateException
Set/replace the requested action of a new transaction.

Parameters:
action - the requested action of a new transaction.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setKeyID

void setKeyID(int keyID)
              throws IllegalStateException
Set/replace the KeyID of a new transaction.

Parameters:
keyID - the KeyID of a new transaction.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setEntity

void setEntity(Entity entity)
               throws IllegalStateException
Set/replace the Entity of a new transaction.

Parameters:
entity - the Entity of a new transaction.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setMask

void setMask(Mask mask)
             throws IllegalStateException
Set/replace the optional mask of a new transaction.

Parameters:
mask - the optional mask of a new transaction.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setResEntityRequired

void setResEntityRequired(boolean required)
                          throws IllegalStateException
Set/replace the indication that client want an Entity come back from the server.

Parameters:
required - the indication that client want an Entity come back from the server.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setPendingTransactionID

void setPendingTransactionID(TransactionID transactionID)
                             throws IllegalStateException
Set/replace the TransactionID of a past transaction.

Parameters:
transactionID - the TransactionID of a past transaction.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning


Submit a bug or feature to FT\API Programming Support<\font>