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
 void commit()
          perform commit on all tx-states
 boolean contains(java.lang.Object pKey)
          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(java.lang.Object pKey)
          retrieve an objects ObjectEnvelope state from the hashtable.
 ObjectEnvelope getByIdentity(Identity id)
          retrieve an objects ObjectModification state from the hashtable
 void put(java.lang.Object pKey, ObjectEnvelope modification)
          store an objects transactional state into the Hashtable
 void refresh()
          prepare this instance for reuse
 void remove(java.lang.Object pKey)
          remove an objects entry from the Hashtable
 void rollback()
          perform rollback on all tx-states
 java.lang.String toString()
          Returns a String representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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


commit

public void commit()
            throws TransactionAbortedException,
                   LockNotGrantedException
perform commit on all tx-states

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 Hashtable


elements

public java.util.Enumeration elements()
Get an enumeration of all the elements in this ObjectEnvelopeTable in random order. Creation date: (11.02.2001 12:45:08)

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)
retrieve an objects ObjectEnvelope state from the hashtable. If no ObjectEnvelope is found, a new one is created and returned.

Returns:
the resulting ObjectEnvelope

put

public void put(java.lang.Object pKey,
                ObjectEnvelope modification)
store an objects transactional state into the Hashtable


toString

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


contains

public boolean contains(java.lang.Object pKey)
retrieve an objects ObjectModification state from the hashtable



Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14