oracle.cle.persistence
Class Transaction

java.lang.Object
  |
  +--oracle.cle.persistence.Transaction
Direct Known Subclasses:
TOPLinkTransaction

public abstract class Transaction
extends java.lang.Object

Purpose: Abstract object level transaction for tracking object changes to write to relational database.


Constructor Summary
Transaction(java.lang.Object connection)
           
 
Method Summary
abstract  void commitChanges()
          Commit all of the changes to registered objects.
 java.lang.Object getConnection()
           
abstract  void ignoreChangesAndRelease()
          Ignore all changes to working copies.
abstract  java.util.Vector registerAllObjects(java.util.Vector vector)
          Build a working copy (clone) of a collection of persistent objects to allow change isolation.
abstract  java.lang.Object registerForChanges(java.lang.Object persistentObject)
          Build a working copy (clone) of a persistent object to allow change isolation.
abstract  void registerForDelete(java.lang.Object persistentObject)
          Register to have an object deleted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transaction

public Transaction(java.lang.Object connection)
Method Detail

getConnection

public java.lang.Object getConnection()

registerForChanges

public abstract java.lang.Object registerForChanges(java.lang.Object persistentObject)
Build a working copy (clone) of a persistent object to allow change isolation. Changes made to this clone will be merged into original upon commit of changes. This includes registration of new objects.

NOTE: It is essential that objects do not get modified unless registered and that only working copies reference each together (inlcuding new objects)


registerAllObjects

public abstract java.util.Vector registerAllObjects(java.util.Vector vector)
Build a working copy (clone) of a collection of persistent objects to allow change isolation. Changes made to these clones will be merged into original upon commit of changes. This includes registration of new objects.

NOTE: It is essential that objects do not get modified unless registered and that only working copies reference each together (inlcuding new objects)


registerForDelete

public abstract void registerForDelete(java.lang.Object persistentObject)
Register to have an object deleted. It is essential that the object not be referenced when the commitChanges is invoked.

commitChanges

public abstract void commitChanges()
Commit all of the changes to registered objects. This includes UPDATEs, INSERTs, and deletes (both explicitely deleted and those removed from privately-owned ccollections).

ignoreChangesAndRelease

public abstract void ignoreChangesAndRelease()
Ignore all changes to working copies. This is basically a NO-OP called before the Transaction is released for GC.


Copyright © 2003 ORACLE Corp. All Rights Reserved.