Methods Summary |
---|
public void | begin()Begin a transaction. The type of transaction is determined by the
setting of the Optimistic flag.
|
public void | commit()Commit the current transaction.
|
public boolean | getNontransactionalRead()If this flag is set to true, then queries and navigation are allowed
without an active transaction
|
public boolean | getOptimistic()Optimistic transactions do not hold data store locks until commit time.
|
public PersistenceManager | getPersistenceManager()The Tranansaction instance is always associated with exactly one
PersistenceManager.
|
public int | getQueryTimeout()Gets the number of seconds to wait for a query statement
to execute in the datastore associated with this Transaction instance
|
public boolean | getRestoreValues()If true, at rollback time instances restore their field values.
|
public boolean | getRetainValues()If true, at commit time instances retain their field values.
|
public javax.transaction.Synchronization | getSynchronization()The user-specified Synchronization instance for this Transaction instance.
|
public int | getUpdateTimeout()Gets the number of seconds to wait for an update statement
to execute in the datastore associated with this Transaction instance
|
public boolean | isActive()Returns whether there is a transaction currently active.
|
public void | rollback()Roll back the current transaction.
|
public void | setNontransactionalRead(boolean flag)If this flag is set to true, then queries and navigation are allowed
without an active transaction
|
public void | setOptimistic(boolean optimistic)Optimistic transactions do not hold data store locks until commit time.
|
public void | setQueryTimeout(int timeout)Sets the number of seconds to wait for a query statement
to execute in the datastore associated with this Transaction instance
|
public void | setRestoreValues(boolean restoreValues)If true, at rollback instances restore their values and the instances
transition to persistent-nontransactional.
|
public void | setRetainValues(boolean retainValues)If true, at commit instances retain their values and the instances
transition to persistent-nontransactional.
Setting this flag also sets the NontransactionalRead flag.
|
public void | setSynchronization(javax.transaction.Synchronization sync)The user can specify a Synchronization instance to be notified on
transaction completions. The beforeCompletion method is called prior
to flushing instances to the data store.
The afterCompletion method is called after performing the data store
commit operation.
|
public void | setUpdateTimeout(int timeout)Sets the number of seconds to wait for an update statement
to execute in the datastore associated with this Transaction instance
|