|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.scostore.BaseContainerStore
org.datanucleus.store.rdbms.scostore.AbstractMapStore
org.datanucleus.store.rdbms.scostore.RDBMSFKMapStore
public class RDBMSFKMapStore
RDBMS-specific implementation of an MapStore where either the value has a FK to the owner (and the key
stored in the value), or whether the key has a FK to the owner (and the value stored in the key).
| Field Summary | |
|---|---|
protected org.datanucleus.ClassLoaderResolver |
clr
|
protected int |
keyFieldNumber
Field number of key in value class (when Key=Non-PC, Value=PC). |
| Fields inherited from class org.datanucleus.store.rdbms.scostore.AbstractMapStore |
|---|
iterateUsingDiscriminator, keyMapping, keysAreEmbedded, keysAreSerialised, keyType, kmd, mapTable, valueMapping, valuesAreEmbedded, valuesAreSerialised, valueTable, valueType, vmd |
| Fields inherited from class org.datanucleus.store.rdbms.scostore.BaseContainerStore |
|---|
allowNulls, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr |
| Constructor Summary | |
|---|---|
RDBMSFKMapStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr)
Constructor for the backing store for an FK Map for RDBMS. |
|
| Method Summary | |
|---|---|
void |
clear(org.datanucleus.store.ObjectProvider sm)
Method to clear the map of all values. |
void |
clearKeyOfValue(org.datanucleus.store.ObjectProvider sm,
Object key,
Object oldValue)
Utility to clear the key of a value from the Map. |
org.datanucleus.store.scostore.SetStore |
entrySetStore()
Accessor for the map entries in the Map. |
protected SQLStatement |
getSQLStatementForGet(org.datanucleus.store.ObjectProvider ownerSM)
Method to return an SQLStatement for retrieving the value for a key. |
protected Object |
getValue(org.datanucleus.store.ObjectProvider ownerSM,
Object key)
Method to retrieve a value from the Map given the key. |
protected void |
initialise()
Method to initialise the statements being used. |
org.datanucleus.store.scostore.SetStore |
keySetStore()
Accessor for the keys in the Map. |
Object |
put(org.datanucleus.store.ObjectProvider sm,
Object newKey,
Object newValue)
Method to put an item in the Map. |
Object |
remove(org.datanucleus.store.ObjectProvider sm,
Object key)
Method to remove an entry from the map. |
protected boolean |
updateKeyFkInternal(org.datanucleus.store.ObjectProvider sm,
Object key,
Object owner)
|
protected boolean |
updateValueFkInternal(org.datanucleus.store.ObjectProvider sm,
Object value,
Object owner)
|
protected void |
validateValueType(org.datanucleus.ClassLoaderResolver clr,
Object value)
Utility to validate the type of a value for storing in the Map. |
org.datanucleus.store.scostore.SetStore |
valueSetStore()
Accessor for the values in the Map. |
| Methods inherited from class org.datanucleus.store.rdbms.scostore.AbstractMapStore |
|---|
containsKey, containsValue, get, getKeyMapping, getKmd, getMapTable, getUpdateEmbeddedKeyStmt, getUpdateEmbeddedValueStmt, getValueMapping, getVmd, isValuesAreEmbedded, isValuesAreSerialised, keysAreEmbedded, keysAreSerialised, putAll, updatedEmbeddedKey, updateEmbeddedKey, updateEmbeddedValue, updateEmbeddedValue, validateKeyForReading, validateKeyForWriting, validateKeyType, validateValueForReading, validateValueForWriting, valuesAreEmbedded, valuesAreSerialised |
| Methods inherited from class org.datanucleus.store.rdbms.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.Store |
|---|
getStoreManager |
| Field Detail |
|---|
protected final org.datanucleus.ClassLoaderResolver clr
protected int keyFieldNumber
| Constructor Detail |
|---|
public RDBMSFKMapStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr)
mmd - Field Meta-Data for the Map field.storeMgr - The Store Manager we are using.clr - The ClassLoaderResolver| Method Detail |
|---|
protected void initialise()
AbstractMapStore
initialise in class AbstractMapStore
protected void validateValueType(org.datanucleus.ClassLoaderResolver clr,
Object value)
validateValueType in class AbstractMapStorevalue - The value to check.clr - The ClassLoaderResolver
public Object put(org.datanucleus.store.ObjectProvider sm,
Object newKey,
Object newValue)
sm - State Manager for the map.newKey - The key to store the value againstnewValue - The value to store.
public Object remove(org.datanucleus.store.ObjectProvider sm,
Object key)
sm - State Manager for the map.key - Key of the entry to remove.
public void clear(org.datanucleus.store.ObjectProvider sm)
sm - State Manager for the map.
public void clearKeyOfValue(org.datanucleus.store.ObjectProvider sm,
Object key,
Object oldValue)
sm - State Manager for the map.key - Key of the objectoldValue - Value to removepublic org.datanucleus.store.scostore.SetStore keySetStore()
public org.datanucleus.store.scostore.SetStore valueSetStore()
public org.datanucleus.store.scostore.SetStore entrySetStore()
protected boolean updateValueFkInternal(org.datanucleus.store.ObjectProvider sm,
Object value,
Object owner)
protected boolean updateKeyFkInternal(org.datanucleus.store.ObjectProvider sm,
Object key,
Object owner)
protected Object getValue(org.datanucleus.store.ObjectProvider ownerSM,
Object key)
throws NoSuchElementException
getValue in class AbstractMapStoreownerSM - State Manager for the owner of the map.key - The key to retrieve the value for.
NoSuchElementException - if the key was not foundprotected SQLStatement getSQLStatementForGet(org.datanucleus.store.ObjectProvider ownerSM)
ownerSM - StateManager for the owning object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||