|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable
com.triactive.jdo.sco.Hashtable
public class Hashtable
A mutable second-class Hashtable object.
SCO fields declared as type java.util.Hashtable are populated with objects of this type whenever the owning object is actively being managed by a state manager.
This class is almost identical to HashMap, except it inherits from
java.util.Hashtable.
Remember that any changes made to either of them will most likely need to be
made to both.
HashMap,
Serialized Form| Constructor Summary | |
|---|---|
Hashtable(java.lang.Object owner,
java.lang.String fieldName,
PersistentMap backing)
Constructs an SCO Hashtable representing an existing persistent map. |
|
Hashtable(java.lang.Object owner,
java.lang.String fieldName,
PersistentMap backing,
java.util.Map value)
Constructs an SCO Hashtable having the specified initial contents. |
|
| Method Summary | |
|---|---|
boolean |
allowsNullValues()
Indicates whether or not this map allows null values. |
void |
applyUpdates()
Called to indicate that the owning object is being made persistent, or that the persistent state of this field is being updated. |
void |
clear()
|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
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.lang.String |
getFieldName()
Returns the field name in the owner object. |
java.lang.Class |
getKeyType()
Returns the type of keys in this map. |
java.lang.Object |
getOwner()
Returns the owner object of the SCO instance. |
java.lang.Class |
getValueType()
Returns the type of values in this map. |
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Enumeration |
keys()
|
java.util.Set |
keySet()
|
void |
makeDirty()
Marks this object dirty. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map m)
|
java.lang.Object |
remove(java.lang.Object key)
|
int |
size()
|
java.lang.String |
toString()
|
void |
unsetOwner()
Disconnects this object from its owner. |
java.util.Collection |
values()
|
protected java.lang.Object |
writeReplace()
Replaces the object to be serialized with a java.util.Hashtable object. |
| Methods inherited from class java.util.Hashtable |
|---|
contains, rehash |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Hashtable(java.lang.Object owner,
java.lang.String fieldName,
PersistentMap backing)
owner - The object that owns this second-class object.fieldName - The fieldName in the owning object.backing - The backing store for this map.
public Hashtable(java.lang.Object owner,
java.lang.String fieldName,
PersistentMap backing,
java.util.Map value)
If the owning object is already persistent it is assumed its field is being assigned an entirely new value. The existing map contents are cleared in the data store and the new contents are added.
owner - The object that owns this second-class object.fieldName - The fieldName in the owning object.backing - The backing store for this map.value - The initial contents of the map.| Method Detail |
|---|
public java.lang.Object getOwner()
SCO
getOwner in interface SCOnull if currently unowned.public java.lang.String getFieldName()
SCO
getFieldName in interface SCOnull if currently unowned.public java.lang.Class getKeyType()
SCOMap
getKeyType in interface SCOMappublic java.lang.Class getValueType()
SCOMap
getValueType in interface SCOMappublic boolean allowsNullValues()
SCOMap
allowsNullValues in interface SCOMaptrue if null values are allowed,
false otherwise.public void makeDirty()
SCO
makeDirty in interface SCOpublic void applyUpdates()
SCO
applyUpdates in interface SCOpublic void unsetOwner()
SCO
unsetOwner in interface SCOpublic java.lang.Object clone()
Mutable second-class Objects are required to provide a public clone method in order to allow for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.
clone in interface SCOclone in class java.util.Hashtablepublic int size()
size in interface java.util.Mapsize in class java.util.Hashtablepublic boolean isEmpty()
isEmpty in interface java.util.MapisEmpty in class java.util.Hashtablepublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.MapcontainsKey in class java.util.Hashtablepublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.MapcontainsValue in class java.util.Hashtablepublic java.lang.Object get(java.lang.Object key)
get in interface java.util.Mapget in class java.util.Hashtable
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapput in class java.util.Hashtablepublic void putAll(java.util.Map m)
putAll in interface java.util.MapputAll in class java.util.Hashtablepublic java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Mapremove in class java.util.Hashtablepublic void clear()
clear in interface java.util.Mapclear in class java.util.Hashtablepublic java.util.Set keySet()
keySet in interface java.util.MapkeySet in class java.util.Hashtablepublic java.util.Collection values()
values in interface java.util.Mapvalues in class java.util.Hashtablepublic java.util.Set entrySet()
entrySet in interface java.util.MapentrySet in class java.util.Hashtablepublic java.util.Enumeration keys()
keys in class java.util.Hashtablepublic java.util.Enumeration elements()
elements in class java.util.Hashtablepublic boolean equals(java.lang.Object o)
equals in interface java.util.Mapequals in class java.util.Hashtablepublic int hashCode()
hashCode in interface java.util.MaphashCode in class java.util.Hashtablepublic java.lang.String toString()
toString in class java.util.Hashtableprotected java.lang.Object writeReplace()
Hashtable to be serialized instead of this object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||