Class IndirectMap<K,V>

java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<K,V>
org.eclipse.persistence.indirection.IndirectMap<K,V>
Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>, ChangeTracker, CollectionChangeTracker, IndirectCollection<Map.Entry<K,V>,Map<K,V>>, IndirectContainer<Map<K,V>>

public class IndirectMap<K,V> extends Hashtable<K,V> implements CollectionChangeTracker, IndirectCollection<Map.Entry<K,V>,Map<K,V>>
IndirectMap allows a domain class to take advantage of TopLink indirection without having to declare its instance variable as a ValueHolderInterface.

To use an IndirectMap:

  • Declare the appropriate instance variable with type Map or Hashtable
  • Send the message #useTransparentMap(String) to the appropriate CollectionMapping.
EclipseLink will place an IndirectMap in the instance variable when the containing domain object is read from the database. With the first message sent to the IndirectMap, the contents are fetched from the database and normal Hashtable/Map behavior is resumed.
Since:
TOPLink/Java 2.5
See Also: