|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.mapped.scostore.BaseContainerStore
org.datanucleus.store.mapped.scostore.AbstractMapStore
public abstract class AbstractMapStore
Abstract representation of the backing store for a Map.
| Field Summary | |
|---|---|
protected boolean |
iterateUsingDiscriminator
Flag to set whether the iterator statement will use a discriminator or not. |
protected JavaTypeMapping |
keyMapping
Mapping to the key from the mapTable. |
protected boolean |
keysAreEmbedded
Whether the keys are embedded. |
protected boolean |
keysAreSerialised
Whether the keys are serialised. |
protected java.lang.String |
keyType
Type of the key. |
protected AbstractClassMetaData |
kmd
Metadata for the keys (if persistable). |
protected DatastoreContainerObject |
mapTable
Table storing the map relation. |
protected AbstractMapStoreSpecialization |
specialization
|
protected JavaTypeMapping |
valueMapping
Mapping to the value from the mapTable. |
protected boolean |
valuesAreEmbedded
Whether the values are embedded. |
protected boolean |
valuesAreSerialised
Whether the values are serialised. |
protected DatastoreClass |
valueTable
Table storing the values. |
protected java.lang.String |
valueType
Type of the value. |
protected AbstractClassMetaData |
vmd
Metadata for the values (if persistable). |
| Fields inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore |
|---|
allowNulls, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr |
| Constructor Summary | |
|---|---|
AbstractMapStore(StoreManager storeMgr,
AbstractMapStoreSpecialization specialization)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(ObjectProvider sm,
java.lang.Object key)
Method to check if a key exists in the Map. |
boolean |
containsValue(ObjectProvider sm,
java.lang.Object value)
Method to check if a value exists in the Map. |
java.lang.Object |
get(ObjectProvider sm,
java.lang.Object key)
Method to return the value for a key. |
JavaTypeMapping |
getKeyMapping()
|
java.lang.String |
getKeyType()
Accessor for the key type for storing in this Map. |
AbstractClassMetaData |
getKmd()
|
DatastoreContainerObject |
getMapTable()
|
protected abstract java.lang.Object |
getValue(ObjectProvider sm,
java.lang.Object key)
Method to retrieve a value from the Map given the key. |
JavaTypeMapping |
getValueMapping()
|
java.lang.String |
getValueType()
Accessor for the value type for storing in this Map. |
AbstractClassMetaData |
getVmd()
|
boolean |
isValuesAreEmbedded()
|
boolean |
isValuesAreSerialised()
|
boolean |
keysAreEmbedded()
Accessor for whether the keys are embedded or not. |
boolean |
keysAreSerialised()
Accessor for whether the keys are serialised or not. |
void |
putAll(ObjectProvider sm,
java.util.Map m)
Method to put all elements from a Map into our Map. |
boolean |
updateEmbeddedKey(ObjectProvider sm,
java.lang.Object key,
int fieldNumber,
java.lang.Object newValue)
Method to update a field of an embedded key. |
boolean |
updateEmbeddedValue(ObjectProvider sm,
java.lang.Object value,
int fieldNumber,
java.lang.Object newValue)
Method to update a field of an embedded key. |
protected boolean |
validateKeyForReading(ObjectProvider sm,
java.lang.Object key)
Utility to validate a key is ok for reading. |
protected void |
validateKeyForWriting(ObjectProvider sm,
java.lang.Object key)
Utility to validate a key is ok for writing (present in the datastore). |
protected void |
validateKeyType(ClassLoaderResolver clr,
java.lang.Object key)
Utility to validate the type of a key for storing in the Map. |
protected boolean |
validateValueForReading(ObjectProvider sm,
java.lang.Object value)
Utility to validate a value is ok for reading. |
protected void |
validateValueForWriting(ObjectProvider sm,
java.lang.Object value)
Utility to validate a value is ok for writing (present in the datastore). |
protected void |
validateValueType(ClassLoaderResolver clr,
java.lang.Object value)
Utility to validate the type of a value for storing in the Map. |
boolean |
valuesAreEmbedded()
Accessor for whether the values are embedded or not. |
boolean |
valuesAreSerialised()
Accessor for whether the values are serialised or not. |
| Methods inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore |
|---|
allowsBatching, getDatastoreAdapter, getOwnerMapping, getOwnerMemberMetaData, getRelationType, getStateManagerForEmbeddedPCObject, getStoreManager, isEmbeddedMapping, setOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.datanucleus.store.scostore.MapStore |
|---|
clear, entrySetStore, keySetStore, put, remove, valueSetStore |
| Methods inherited from interface org.datanucleus.store.scostore.Store |
|---|
getStoreManager |
| Field Detail |
|---|
protected boolean iterateUsingDiscriminator
protected DatastoreContainerObject mapTable
protected DatastoreClass valueTable
protected AbstractClassMetaData kmd
protected AbstractClassMetaData vmd
protected JavaTypeMapping keyMapping
protected JavaTypeMapping valueMapping
protected java.lang.String keyType
protected java.lang.String valueType
protected boolean keysAreEmbedded
protected boolean keysAreSerialised
protected boolean valuesAreEmbedded
protected boolean valuesAreSerialised
protected final AbstractMapStoreSpecialization specialization
| Constructor Detail |
|---|
public AbstractMapStore(StoreManager storeMgr,
AbstractMapStoreSpecialization specialization)
storeMgr - Manager for the storespecialization - Specialisation for this datastore| Method Detail |
|---|
public boolean keysAreEmbedded()
keysAreEmbedded in interface MapStorepublic boolean keysAreSerialised()
keysAreSerialised in interface MapStorepublic boolean valuesAreEmbedded()
valuesAreEmbedded in interface MapStorepublic boolean valuesAreSerialised()
valuesAreSerialised in interface MapStorepublic java.lang.String getKeyType()
getKeyType in interface MapStorepublic java.lang.String getValueType()
getValueType in interface MapStore
public boolean containsKey(ObjectProvider sm,
java.lang.Object key)
containsKey in interface MapStoresm - State Manager for the mapkey - The key to check for.
public boolean containsValue(ObjectProvider sm,
java.lang.Object value)
containsValue in interface MapStoresm - State Manager for the mapvalue - The value to check for.
public java.lang.Object get(ObjectProvider sm,
java.lang.Object key)
get in interface MapStoresm - State Manager for the Map.key - The key of the object to retrieve.
public void putAll(ObjectProvider sm,
java.util.Map m)
putAll in interface MapStoresm - State Manager for the Mapm - The Map to add
protected void validateKeyType(ClassLoaderResolver clr,
java.lang.Object key)
clr - The ClassLoaderResolverkey - The key to check.
protected void validateValueType(ClassLoaderResolver clr,
java.lang.Object value)
clr - The ClassLoaderResolvervalue - The value to check.
protected boolean validateKeyForReading(ObjectProvider sm,
java.lang.Object key)
sm - State Manager for the map.key - The key to check.
protected boolean validateValueForReading(ObjectProvider sm,
java.lang.Object value)
sm - State Manager for the map.value - The value to check.
protected void validateKeyForWriting(ObjectProvider sm,
java.lang.Object key)
sm - State Manager for the map.key - The key to check.
protected void validateValueForWriting(ObjectProvider sm,
java.lang.Object value)
sm - State Manager for the map.value - The value to check.
protected abstract java.lang.Object getValue(ObjectProvider sm,
java.lang.Object key)
throws java.util.NoSuchElementException
sm - State Manager for the map.key - The key to retrieve the value for.
java.util.NoSuchElementException - if the value for the key was not found
public boolean updateEmbeddedKey(ObjectProvider sm,
java.lang.Object key,
int fieldNumber,
java.lang.Object newValue)
updateEmbeddedKey in interface MapStoresm - State Manager of the ownerkey - The key to updatefieldNumber - The number of the field to updatenewValue - The new value
public boolean updateEmbeddedValue(ObjectProvider sm,
java.lang.Object value,
int fieldNumber,
java.lang.Object newValue)
updateEmbeddedValue in interface MapStoresm - State Manager of the ownervalue - The value to updatefieldNumber - The number of the field to updatenewValue - The new value
public JavaTypeMapping getValueMapping()
public JavaTypeMapping getKeyMapping()
public boolean isValuesAreEmbedded()
public boolean isValuesAreSerialised()
public DatastoreContainerObject getMapTable()
public AbstractClassMetaData getKmd()
public AbstractClassMetaData getVmd()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||