|
||||||||||
| 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
org.datanucleus.store.mapped.scostore.FKMapStore
public abstract class FKMapStore
Representation of a FK backing for a Map. This class is used where you have a 1-N and the tables are not joined via a link table, instead using a FK. There are 2 possible uses here
| Field Summary | |
|---|---|
protected 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.mapped.scostore.AbstractMapStore |
|---|
iterateUsingDiscriminator, keyMapping, keysAreEmbedded, keysAreSerialised, keyType, kmd, mapTable, specialization, valueMapping, valuesAreEmbedded, valuesAreSerialised, valueTable, valueType, vmd |
| Fields inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore |
|---|
allowNulls, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr |
| Constructor Summary | |
|---|---|
FKMapStore(AbstractMemberMetaData fmd,
MappedStoreManager storeMgr,
ClassLoaderResolver clr,
AbstractMapStoreSpecialization specialization)
Constructor for an Inverse Map. |
|
| Method Summary | |
|---|---|
void |
clear(ObjectProvider sm)
Method to clear the map of all values. |
void |
clearKeyOfValue(ObjectProvider sm,
java.lang.Object key,
java.lang.Object oldValue)
Utility to clear the key of a value from the Map. |
SetStore |
entrySetStore()
Accessor for the map entries in the Map. |
protected abstract void |
initialise()
|
SetStore |
keySetStore()
Accessor for the keys in the Map. |
protected abstract MapEntrySetStore |
newMapEntrySetStore()
|
protected abstract MapKeySetStore |
newMapKeySetStore()
|
protected abstract MapValueSetStore |
newMapValueSetStore()
|
java.lang.Object |
put(ObjectProvider sm,
java.lang.Object newKey,
java.lang.Object newValue)
Method to put an item in the Map. |
java.lang.Object |
remove(ObjectProvider sm,
java.lang.Object key)
Method to remove an item from the map. |
protected abstract boolean |
updateKeyFkInternal(ObjectProvider sm,
java.lang.Object key,
java.lang.Object owner)
|
protected abstract boolean |
updateValueFkInternal(ObjectProvider sm,
java.lang.Object value,
java.lang.Object owner)
|
protected void |
validateValueType(ClassLoaderResolver clr,
java.lang.Object value)
Utility to validate the type of a value for storing in the Map. |
SetStore |
valueSetStore()
Accessor for the values in the Map. |
| Methods inherited from class org.datanucleus.store.mapped.scostore.AbstractMapStore |
|---|
containsKey, containsValue, get, getKeyMapping, getKeyType, getKmd, getMapTable, getValue, getValueMapping, getValueType, getVmd, isValuesAreEmbedded, isValuesAreSerialised, keysAreEmbedded, keysAreSerialised, putAll, updateEmbeddedKey, updateEmbeddedValue, validateKeyForReading, validateKeyForWriting, validateKeyType, validateValueForReading, validateValueForWriting, valuesAreEmbedded, valuesAreSerialised |
| 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.Store |
|---|
getStoreManager |
| Field Detail |
|---|
protected final ClassLoaderResolver clr
protected int keyFieldNumber
| Constructor Detail |
|---|
public FKMapStore(AbstractMemberMetaData fmd,
MappedStoreManager storeMgr,
ClassLoaderResolver clr,
AbstractMapStoreSpecialization specialization)
fmd - Field Meta-Data for the Map field.storeMgr - The Store Manager we are using.clr - The ClassLoaderResolverspecialization - The datastore-specific specialization| Method Detail |
|---|
protected abstract void initialise()
protected abstract boolean updateKeyFkInternal(ObjectProvider sm,
java.lang.Object key,
java.lang.Object owner)
protected abstract boolean updateValueFkInternal(ObjectProvider sm,
java.lang.Object value,
java.lang.Object owner)
protected abstract MapKeySetStore newMapKeySetStore()
protected abstract MapValueSetStore newMapValueSetStore()
protected abstract MapEntrySetStore newMapEntrySetStore()
protected void validateValueType(ClassLoaderResolver clr,
java.lang.Object value)
validateValueType in class AbstractMapStorevalue - The value to check.clr - The ClassLoaderResolver
public java.lang.Object put(ObjectProvider sm,
java.lang.Object newKey,
java.lang.Object newValue)
sm - State Manager for the map.newKey - The key to store the value againstnewValue - The value to store.
public java.lang.Object remove(ObjectProvider sm,
java.lang.Object key)
sm - State Manager for the map.key - Key of the item to remove.
public void clear(ObjectProvider sm)
sm - State Manager for the map.
public void clearKeyOfValue(ObjectProvider sm,
java.lang.Object key,
java.lang.Object oldValue)
sm - State Manager for the map.key - Key of the objectoldValue - Value to removepublic SetStore keySetStore()
public SetStore valueSetStore()
public SetStore entrySetStore()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||