org.apache.ojb.odmg.collections
Class DMapImpl

java.lang.Object
  extended by java.util.AbstractMap
      extended by org.apache.ojb.odmg.collections.DMapImpl
All Implemented Interfaces:
Serializable, Map, PersistenceBrokerAware, DMap

public class DMapImpl
extends AbstractMap
implements DMap, Serializable, PersistenceBrokerAware

Version:
$Id: DMapImpl.java,v 1.1 2007-08-24 22:17:37 ewestfal Exp $
Author:
Thomas Mahler
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
DMapImpl()
          DMapImpl constructor comment.
DMapImpl(PBKey key)
          DListImpl constructor comment.
 
Method Summary
 void afterDelete(PersistenceBroker broker)
          noop
 void afterInsert(PersistenceBroker broker)
          noop
 void afterLookup(PersistenceBroker broker)
          noop
 void afterUpdate(PersistenceBroker broker)
          noop
 void beforeDelete(PersistenceBroker broker)
          noop
 void beforeInsert(PersistenceBroker broker)
          prepare itself for persistence.
 void beforeUpdate(PersistenceBroker broker)
          noop
 Set entrySet()
          Returns a set view of the mappings contained in this map.
 Set getEntries()
          Gets the entries.
 Integer getId()
          lazily retrieve the ID of the set, no need to precompute it.
protected  Logger getLog()
           
 PBKey getPBKey()
           
protected  TransactionImpl getTransaction()
           
protected  DMapEntry prepareEntry(Object key, Object value)
           
 Object put(Object key, Object value)
           
 Object remove(Object key)
           
 void setEntries(ManageableHashSet entries)
          Sets the entries.
 void setId(Integer id)
          Sets the id.
 void setPBKey(PBKey pbKey)
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, size, values
 

Constructor Detail

DMapImpl

public DMapImpl()
DMapImpl constructor comment.


DMapImpl

public DMapImpl(PBKey key)
DListImpl constructor comment.

Method Detail

getLog

protected Logger getLog()

getTransaction

protected TransactionImpl getTransaction()

getPBKey

public PBKey getPBKey()

setPBKey

public void setPBKey(PBKey pbKey)

prepareEntry

protected DMapEntry prepareEntry(Object key,
                                 Object value)

entrySet

public Set entrySet()
Returns a set view of the mappings contained in this map. Each element in the returned set is a Map.Entry. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress, the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.

Specified by:
entrySet in interface Map
Specified by:
entrySet in class AbstractMap
Returns:
a set view of the mappings contained in this map.

getId

public Integer getId()
lazily retrieve the ID of the set, no need to precompute it.


put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map
Overrides:
put in class AbstractMap

remove

public Object remove(Object key)
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap

getEntries

public Set getEntries()
Gets the entries.

Returns:
Returns a Set

setEntries

public void setEntries(ManageableHashSet entries)
Sets the entries.

Parameters:
entries - The entries to set

setId

public void setId(Integer id)
Sets the id.

Parameters:
id - The id to set

beforeInsert

public void beforeInsert(PersistenceBroker broker)
                  throws PersistenceBrokerException
prepare itself for persistence. Each DList entry generates an Identity for the wrapped persistent object.

Specified by:
beforeInsert in interface PersistenceBrokerAware
Parameters:
broker - The persistence broker performing the persistence operation
Throws:
PersistenceBrokerException

beforeUpdate

public void beforeUpdate(PersistenceBroker broker)
                  throws PersistenceBrokerException
noop

Specified by:
beforeUpdate in interface PersistenceBrokerAware
Parameters:
broker - The persistence broker performing the persistence operation
Throws:
PersistenceBrokerException

beforeDelete

public void beforeDelete(PersistenceBroker broker)
                  throws PersistenceBrokerException
noop

Specified by:
beforeDelete in interface PersistenceBrokerAware
Parameters:
broker - The persistence broker performing the persistence operation
Throws:
PersistenceBrokerException

afterUpdate

public void afterUpdate(PersistenceBroker broker)
                 throws PersistenceBrokerException
noop

Specified by:
afterUpdate in interface PersistenceBrokerAware
Parameters:
broker - The persistence broker performed the persistence operation
Throws:
PersistenceBrokerException

afterInsert

public void afterInsert(PersistenceBroker broker)
                 throws PersistenceBrokerException
noop

Specified by:
afterInsert in interface PersistenceBrokerAware
Parameters:
broker - The persistence broker performing the persistence operation
Throws:
PersistenceBrokerException

afterDelete

public void afterDelete(PersistenceBroker broker)
                 throws PersistenceBrokerException
noop

Specified by:
afterDelete in interface PersistenceBrokerAware
Parameters:
broker - The persistence broker performing the persistence operation
Throws:
PersistenceBrokerException

afterLookup

public void afterLookup(PersistenceBroker broker)
                 throws PersistenceBrokerException
noop

Specified by:
afterLookup in interface PersistenceBrokerAware
Parameters:
broker - The persistence broker performing the persistence operation
Throws:
PersistenceBrokerException


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.