public interface TransactionExt extends Transaction, HasBroker
Transaction
interface.
Note: All listed methods are not part of the standard ODMG-api - they are special (proprietary) OJB extensions.
READ, UPGRADE, WRITE
Modifier and Type | Method and Description |
---|---|
void |
flush()
Calling
flush flushes persistent object modifications
made within the ODMG transaction since the last checkpoint to the underlying
database transaction, but does commit the database transaction. |
boolean |
isDeleted(Identity id)
Checks if the object with the given
Identity
has been deleted within the transaction using
Database.deletePersistent(Object) or markDelete(Object) . |
boolean |
isImplicitLocking()
Returns true if implicite locking is enabled.
|
boolean |
isOrdering()
Return true if the OJB ordering algorithm is enabled.
|
void |
markDelete(java.lang.Object anObject)
Marks an object for deletion without
locking the object.
|
void |
markDirty(java.lang.Object anObject)
Marks an object as dirty without
locking the object.
|
void |
setCascadingDelete(java.lang.Class target,
boolean doCascade)
Allows to change the cascading delete behavior of all references of the
specified class while this transaction is in use.
|
void |
setCascadingDelete(java.lang.Class target,
java.lang.String referenceField,
boolean doCascade)
Allows to change the cascading delete behavior of the target class's
reference field while this transaction is in use.
|
void |
setImplicitLocking(boolean value)
This method can be used to activate or deactivate the implicit
locking mechanism for the current transaction.
|
void |
setOrdering(boolean ordering)
Allows to enable/disable the OJB persistent object ordering algorithm.
|
abort, begin, checkpoint, commit, isOpen, join, leave, lock, tryLock
void markDelete(java.lang.Object anObject)
anObject
- Object to be markedvoid markDirty(java.lang.Object anObject)
anObject
- Object to be markedvoid flush()
Calling flush
flushes persistent object modifications
made within the ODMG transaction since the last checkpoint to the underlying
database transaction, but does commit the database transaction.
The ODMG transaction retains all locks it held on those objects at the time the flush
was invoked.
Transaction.checkpoint()
.void setImplicitLocking(boolean value)
value
- If set true implicit locking is enabled,
if false, implicit locking is disabled.ImplementationExt.setImplicitLocking(boolean)
boolean isImplicitLocking()
setImplicitLocking(boolean)
void setCascadingDelete(java.lang.Class target, java.lang.String referenceField, boolean doCascade)
target
- The class to change cascading delete behavior of the references.referenceField
- The field name of the 1:1, 1:n or m:n reference.doCascade
- If true cascading delete is enabled, false disabled.void setCascadingDelete(java.lang.Class target, boolean doCascade)
target
- The class to change cascading delete behavior of all references.doCascade
- If true cascading delete is enabled, false disabled.boolean isOrdering()
setOrdering(boolean)
void setOrdering(boolean ordering)
setImplicitLocking(boolean)
.ordering
- Set true to enable object ordering on commit.ImplementationExt.setOrdering(boolean)
boolean isDeleted(Identity id)
Identity
has been deleted within the transaction using
Database.deletePersistent(Object)
or markDelete(Object)
.id
- The identity of the object.(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30