|
EclipseLink 2.1.2, build 'v20101206-r8635' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary<K,V> java.util.Hashtable org.eclipse.persistence.indirection.IndirectMap
public class IndirectMap
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:
CollectionMapping
,
IndirectList
,
Serialized FormField Summary | |
---|---|
protected java.util.Hashtable |
delegate
Reduce type casting |
protected int |
initialCapacity
Store initial size for lazy init. |
protected float |
loadFactor
Store load factor for lazy init. |
protected ValueHolderInterface |
valueHolder
Delegate indirection behavior to a value holder |
Constructor Summary | |
---|---|
IndirectMap()
PUBLIC: Construct a new, empty IndirectMap with a default capacity and load factor. |
|
IndirectMap(int initialCapacity)
PUBLIC: Construct a new, empty IndirectMap with the specified initial capacity and default load factor. |
|
IndirectMap(int initialCapacity,
float loadFactor)
PUBLIC: Construct a new, empty IndirectMap with the specified initial capacity and load factor. |
|
IndirectMap(java.util.Map m)
PUBLIC: Construct a new IndirectMap with the same mappings as the given Map. |
Method Summary | |
---|---|
java.beans.PropertyChangeListener |
_persistence_getPropertyChangeListener()
Return the property change listener for change tracking. |
void |
_persistence_setPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
INTERNAL: Set the property change listener for change tracking. |
protected java.util.Hashtable |
buildDelegate()
Return the freshly-built delegate. |
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object value)
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Enumeration |
elements()
|
java.util.Set |
entrySet()
|
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
get(java.lang.Object key)
|
java.util.Collection |
getAddedElements()
INTERNAL: Return the elements that have been added before instantiation. |
protected java.util.Hashtable |
getDelegate()
INTERNAL: Check whether the contents have been read from the database. |
java.lang.Object |
getDelegateObject()
INTERNAL: Return the real collection object. |
java.util.Collection |
getRemovedElements()
INTERNAL: Return the elements that have been removed before instantiation. |
java.lang.String |
getTrackedAttributeName()
INTERNAL: Return the mapping attribute name, used to raise change events. |
ValueHolderInterface |
getValueHolder()
PUBLIC: Return the valueHolder. |
boolean |
hasDeferredChanges()
INTERNAL: Return if any elements that have been added or removed before instantiation. |
int |
hashCode()
|
boolean |
hasTrackedPropertyChangeListener()
INTERNAL: Return if the collection has a property change listener for change tracking. |
protected void |
initialize(int initialCapacity,
float loadFactor)
Initialize the instance. |
protected void |
initialize(java.util.Map m)
Initialize the instance. |
boolean |
isEmpty()
|
boolean |
isInstantiated()
PUBLIC: Return whether the contents have been read from the database. |
java.util.Enumeration |
keys()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map t)
|
protected void |
raiseAddChangeEvent(java.lang.Object key,
java.lang.Object value)
Raise the add change event and relationship maintainence. |
protected void |
raiseRemoveChangeEvent(java.lang.Object key,
java.lang.Object value)
Raise the remove change event. |
protected void |
rehash()
|
java.lang.Object |
remove(java.lang.Object key)
|
void |
setTrackedAttributeName(java.lang.String attributeName)
INTERNAL: Set the mapping attribute name, used to raise change events. |
void |
setValueHolder(ValueHolderInterface valueHolder)
INTERNAL: Set the value holder. |
int |
size()
|
java.lang.String |
toString()
PUBLIC: Use the Hashtable.toString(); but wrap it with braces to indicate there is a bit of indirection. |
java.util.Collection |
values()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile java.util.Hashtable delegate
protected ValueHolderInterface valueHolder
protected int initialCapacity
protected float loadFactor
Constructor Detail |
---|
public IndirectMap()
public IndirectMap(int initialCapacity)
initialCapacity
- the initial capacity of the hashtablepublic IndirectMap(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of the hashtableloadFactor
- a number between 0.0 and 1.0
java.lang.IllegalArgumentException
- if the initial capacity is less
than or equal to zero, or if the load factor is less than
or equal to zeropublic IndirectMap(java.util.Map m)
m
- a map containing the mappings to useMethod Detail |
---|
protected java.util.Hashtable buildDelegate()
public void clear()
clear
in interface java.util.Map
clear
in class java.util.Hashtable
Hashtable.clear()
public java.lang.Object clone()
clone
in class java.util.Hashtable
This will result in a database query if necessary.
public boolean contains(java.lang.Object value)
contains
in class java.util.Hashtable
Hashtable.contains(java.lang.Object)
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
containsKey
in class java.util.Hashtable
Hashtable.containsKey(java.lang.Object)
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
containsValue
in class java.util.Hashtable
Hashtable.containsValue(java.lang.Object)
public java.util.Enumeration elements()
elements
in class java.util.Hashtable
Hashtable.elements()
public java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in class java.util.Hashtable
Hashtable.entrySet()
public boolean equals(java.lang.Object o)
equals
in interface java.util.Map
equals
in class java.util.Hashtable
Hashtable.equals(java.lang.Object)
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
get
in class java.util.Hashtable
Hashtable.get(java.lang.Object)
protected java.util.Hashtable getDelegate()
public java.lang.Object getDelegateObject()
getDelegateObject
in interface IndirectCollection
public java.lang.String getTrackedAttributeName()
getTrackedAttributeName
in interface CollectionChangeTracker
public java.beans.PropertyChangeListener _persistence_getPropertyChangeListener()
_persistence_getPropertyChangeListener
in interface ChangeTracker
public ValueHolderInterface getValueHolder()
getValueHolder
in interface IndirectContainer
public int hashCode()
hashCode
in interface java.util.Map
hashCode
in class java.util.Hashtable
Hashtable.hashCode()
public boolean hasTrackedPropertyChangeListener()
protected void initialize(int initialCapacity, float loadFactor)
protected void initialize(java.util.Map m)
public boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in class java.util.Hashtable
Hashtable.isEmpty()
public boolean isInstantiated()
isInstantiated
in interface IndirectContainer
public java.util.Enumeration keys()
keys
in class java.util.Hashtable
Hashtable.keys()
public java.util.Set keySet()
keySet
in interface java.util.Map
keySet
in class java.util.Hashtable
Hashtable.keySet()
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
put
in class java.util.Hashtable
Hashtable.put(java.lang.Object, java.lang.Object)
public void putAll(java.util.Map t)
putAll
in interface java.util.Map
putAll
in class java.util.Hashtable
Hashtable.putAll(java.util.Map)
protected void rehash()
rehash
in class java.util.Hashtable
Hashtable.rehash()
protected void raiseAddChangeEvent(java.lang.Object key, java.lang.Object value)
protected void raiseRemoveChangeEvent(java.lang.Object key, java.lang.Object value)
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
remove
in class java.util.Hashtable
Hashtable.remove(java.lang.Object)
public void setTrackedAttributeName(java.lang.String attributeName)
setTrackedAttributeName
in interface CollectionChangeTracker
public void _persistence_setPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
_persistence_setPropertyChangeListener
in interface ChangeTracker
public void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder
in interface IndirectContainer
public int size()
size
in interface java.util.Map
size
in class java.util.Hashtable
Hashtable.size()
public java.util.Collection getRemovedElements()
getRemovedElements
in interface IndirectCollection
public java.util.Collection getAddedElements()
getAddedElements
in interface IndirectCollection
public boolean hasDeferredChanges()
hasDeferredChanges
in interface IndirectCollection
public java.lang.String toString()
toString
in class java.util.Hashtable
Hashtable.toString()
public java.util.Collection values()
values
in interface java.util.Map
values
in class java.util.Hashtable
Hashtable.values()
|
EclipseLink 2.1.2, build 'v20101206-r8635' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |