org.apache.ojb.odmg
Class ObjectEnvelopeTable

java.lang.Object
  extended byorg.apache.ojb.odmg.ObjectEnvelopeTable

public class ObjectEnvelopeTable
extends java.lang.Object

manages all ObjectEnvelopes included by a transaction. Performs commit, and rollack operations on all included Envelopes.

Author:
Thomas Mahler, Matthew Baird MBAIRD: added explicit closing and de-referencing to prevent any GC issues.

Constructor Summary
ObjectEnvelopeTable(TransactionImpl myTransaction)
          Creates new ObjectEnvelopeTable
 
Method Summary
 boolean contains(Identity oid)
          retrieve an objects ObjectModification state from the hashtable
 java.util.Enumeration elements()
          Get an enumeration of all the elements in this ObjectEnvelopeTable in random order.
 ObjectEnvelope get(Identity oid, java.lang.Object pKey, boolean isNew)
          retrieve an objects ObjectEnvelope state from the hashtable.
 ObjectEnvelope get(java.lang.Object pKey, boolean isNew)
          retrieve an objects ObjectEnvelope state from the hashtable.
 ObjectEnvelope getByIdentity(Identity id)
          retrieve an objects ObjectModification state from the hashtable
 void refresh()
          prepare this instance for reuse
 void remove(java.lang.Object pKey)
          remove an objects entry from the object registry
 void rollback()
          perform rollback on all tx-states
 java.lang.String toString()
          Returns a String representation of this object
 void writeObjects(boolean reuse)
          Perform write to DB on all registered object wrapper (ObjectEnvelope)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectEnvelopeTable

public ObjectEnvelopeTable(TransactionImpl myTransaction)
Creates new ObjectEnvelopeTable

Method Detail

refresh

public void refresh()
prepare this instance for reuse


writeObjects

public void writeObjects(boolean reuse)
                  throws TransactionAbortedException,
                         LockNotGrantedException
Perform write to DB on all registered object wrapper (ObjectEnvelope)

Parameters:
reuse - When all registered objects be re-used after writing to DB set true, else set false to improve performance.
Throws:
TransactionAbortedException
LockNotGrantedException

rollback

public void rollback()
perform rollback on all tx-states


remove

public void remove(java.lang.Object pKey)
remove an objects entry from the object registry


elements

public java.util.Enumeration elements()
Get an enumeration of all the elements in this ObjectEnvelopeTable in random order.

Returns:
Enumeration an enumeration of all elements managed by this ObjectEnvelopeTable

getByIdentity

public ObjectEnvelope getByIdentity(Identity id)
retrieve an objects ObjectModification state from the hashtable


get

public ObjectEnvelope get(java.lang.Object pKey,
                          boolean isNew)
retrieve an objects ObjectEnvelope state from the hashtable. If no ObjectEnvelope is found, a new one is created and returned.

Returns:
the resulting ObjectEnvelope

get

public ObjectEnvelope get(Identity oid,
                          java.lang.Object pKey,
                          boolean isNew)
retrieve an objects ObjectEnvelope state from the hashtable. If no ObjectEnvelope is found, a new one is created and returned.

Returns:
the resulting ObjectEnvelope

toString

public java.lang.String toString()
Returns a String representation of this object


contains

public boolean contains(Identity oid)
retrieve an objects ObjectModification state from the hashtable



(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