public class IndirectMap extends java.util.Hashtable implements CollectionChangeTracker, IndirectCollection
To use an IndirectMap:
CollectionMapping, IndirectList, Serialized Form| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
clear() |
void |
clearDeferredChanges()
INTERNAL: clear any changes that have been deferred to instantiation.
|
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.
|
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.
|
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) |
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 |
setUseLazyInstantiation(boolean useLazyInstantiation)
INTERNAL Set whether this collection should attempt do deal with adds and removes without retrieving the collection from the dB
|
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() |
public IndirectMap()
public IndirectMap(int initialCapacity)
initialCapacity - the initial capacity of the hashtable
public IndirectMap(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of the hashtableloadFactor - a number between 0.0 and 1.0java.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 usepublic void clear()
clear in interface java.util.Mapclear in class java.util.HashtableHashtable.clear()public void clearDeferredChanges()
clearDeferredChanges in interface IndirectCollectionpublic java.lang.Object clone()
clone in class java.util.HashtableThis will result in a database query if necessary.public boolean contains(java.lang.Object value)
contains in class java.util.HashtableHashtable.contains(java.lang.Object)public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.MapcontainsKey in class java.util.HashtableHashtable.containsKey(java.lang.Object)public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.MapcontainsValue in class java.util.HashtableHashtable.containsValue(java.lang.Object)public java.util.Enumeration elements()
elements in class java.util.HashtableHashtable.elements()public java.util.Set entrySet()
entrySet in interface java.util.MapentrySet in class java.util.HashtableHashtable.entrySet()public boolean equals(java.lang.Object o)
equals in interface java.util.Mapequals in class java.util.HashtableHashtable.equals(java.lang.Object)public java.lang.Object get(java.lang.Object key)
get in interface java.util.Mapget in class java.util.HashtableHashtable.get(java.lang.Object)public java.lang.Object getDelegateObject()
getDelegateObject in interface IndirectCollectionpublic java.lang.String getTrackedAttributeName()
getTrackedAttributeName in interface CollectionChangeTrackerpublic java.beans.PropertyChangeListener _persistence_getPropertyChangeListener()
_persistence_getPropertyChangeListener in interface ChangeTrackerpublic ValueHolderInterface getValueHolder()
getValueHolder in interface IndirectContainerpublic int hashCode()
hashCode in interface java.util.MaphashCode in class java.util.HashtableHashtable.hashCode()public boolean hasTrackedPropertyChangeListener()
public boolean isEmpty()
isEmpty in interface java.util.MapisEmpty in class java.util.HashtableHashtable.isEmpty()public boolean isInstantiated()
isInstantiated in interface IndirectContainerpublic java.util.Enumeration keys()
keys in class java.util.HashtableHashtable.keys()public java.util.Set keySet()
keySet in interface java.util.MapkeySet in class java.util.HashtableHashtable.keySet()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapput in class java.util.HashtableHashtable.put(java.lang.Object, java.lang.Object)public void putAll(java.util.Map t)
putAll in interface java.util.MapputAll in class java.util.HashtableHashtable.putAll(java.util.Map)public java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Mapremove in class java.util.HashtableHashtable.remove(java.lang.Object)public void setTrackedAttributeName(java.lang.String attributeName)
setTrackedAttributeName in interface CollectionChangeTrackerpublic void _persistence_setPropertyChangeListener(java.beans.PropertyChangeListener changeListener)
_persistence_setPropertyChangeListener in interface ChangeTrackerpublic void setValueHolder(ValueHolderInterface valueHolder)
setValueHolder in interface IndirectContainerpublic int size()
size in interface java.util.Mapsize in class java.util.HashtableHashtable.size()public void setUseLazyInstantiation(boolean useLazyInstantiation)
setUseLazyInstantiation in interface IndirectCollectionpublic java.util.Collection getRemovedElements()
getRemovedElements in interface IndirectCollectionpublic java.util.Collection getAddedElements()
getAddedElements in interface IndirectCollectionpublic boolean hasDeferredChanges()
hasDeferredChanges in interface IndirectCollectionpublic java.lang.String toString()
toString in class java.util.HashtableHashtable.toString()public java.util.Collection values()
values in interface java.util.Mapvalues in class java.util.HashtableHashtable.values()