|
||||||||||
| 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.JoinMapStore
public abstract class JoinMapStore
Representation of the backing store for a Map. Uses a join table to link the owning container object with the values/keys contained in the map.
| Field Summary | |
|---|---|
protected JavaTypeMapping |
adapterMapping
when the element mappings columns can't be part of the primary key by datastore limitations like BLOB types. |
protected ClassLoaderResolver |
clr
|
| 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 |
|---|
allowsNull, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr |
| Constructor Summary | |
|---|---|
JoinMapStore(DatastoreContainerObject mapTable,
ClassLoaderResolver clr,
JavaTypeMapping ownerMapping,
JavaTypeMapping keyMapping,
JavaTypeMapping valueMapping,
JavaTypeMapping orderMapping,
java.lang.String keyType,
boolean isEmbeddedKey,
boolean isSerialisedKey,
java.lang.String valueType,
boolean isEmbeddedValue,
boolean isSerialisedValue,
AbstractMemberMetaData ownerMemberMetaData,
AbstractMapStoreSpecialization specialization)
Constructor for an Inverse Map. |
|
| Method Summary | |
|---|---|
void |
clear(StateManager ownerSM)
Method to clear the map of all values. |
protected abstract void |
clearInternal(StateManager ownerSM)
|
SetStore |
entrySetStore()
Accessor for the map entries in the Map. |
JavaTypeMapping |
getAdapterMapping()
|
protected abstract int[] |
internalPut(StateManager ownerSM,
ManagedConnection conn,
boolean batched,
java.lang.Object key,
java.lang.Object value,
boolean executeNow)
|
protected abstract void |
internalUpdate(StateManager ownerSM,
ManagedConnection conn,
boolean batched,
java.lang.Object key,
java.lang.Object value,
boolean executeNow)
|
ScalarExpression |
joinKeysTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapTableAlias,
java.lang.Class filteredKeyType,
ScalarExpression keyExpr,
DatastoreIdentifier keyTableAlias)
Utility to create a join for keys to be used in a containsKey() query. |
ScalarExpression[] |
joinKeysValuesTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapTableAlias,
java.lang.Class filteredKeyType,
java.lang.Class filteredValueType,
ScalarExpression keyExpr,
ScalarExpression valExpr,
DatastoreIdentifier keyTableAlias,
DatastoreIdentifier valueTableAlias)
Utility to create a join for keys and values to be used in a containsEntry() query. |
ScalarExpression |
joinValuesTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapTableAlias,
java.lang.Class filteredValueType,
ScalarExpression valExpr,
DatastoreIdentifier valueTableAlias)
Used as part of the Querying of Maps where a containsValue() is used. |
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(StateManager sm,
java.lang.Object key,
java.lang.Object value)
Method to put an item in the Map. |
void |
putAll(StateManager sm,
java.util.Map m)
Method to put all elements from a Map into our Map. |
java.lang.Object |
remove(StateManager sm,
java.lang.Object key)
Method to remove an item from the map. |
protected abstract void |
removeInternal(StateManager sm,
java.lang.Object key)
|
SetStore |
valueSetStore()
Accessor for the values in the Map. |
| Methods inherited from class org.datanucleus.store.mapped.scostore.AbstractMapStore |
|---|
containsKey, containsValue, get, getExistsSubquery, getKeyMapping, getKeyType, getKmd, getMapTable, getSizeSubquery, getValue, getValueMapping, getValueType, getVmd, isValuesAreEmbedded, isValuesAreSerialised, joinKeysToGet, keysAreEmbedded, keysAreSerialised, updateEmbeddedKey, updateEmbeddedValue, validateKeyForReading, validateKeyForWriting, validateKeyType, validateValueForReading, validateValueForWriting, validateValueType, 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 JavaTypeMapping adapterMapping
protected ClassLoaderResolver clr
| Constructor Detail |
|---|
public JoinMapStore(DatastoreContainerObject mapTable,
ClassLoaderResolver clr,
JavaTypeMapping ownerMapping,
JavaTypeMapping keyMapping,
JavaTypeMapping valueMapping,
JavaTypeMapping orderMapping,
java.lang.String keyType,
boolean isEmbeddedKey,
boolean isSerialisedKey,
java.lang.String valueType,
boolean isEmbeddedValue,
boolean isSerialisedValue,
AbstractMemberMetaData ownerMemberMetaData,
AbstractMapStoreSpecialization specialization)
mapTable - Join table for the Mapclr - The ClassLoaderResolverspecialization - The Specialization| Method Detail |
|---|
public void putAll(StateManager sm,
java.util.Map m)
putAll in interface MapStoreputAll in class AbstractMapStoresm - State Manager for the Mapm - The Map to add
public java.lang.Object put(StateManager sm,
java.lang.Object key,
java.lang.Object value)
sm - State Manager for the map.key - The key to store the value againstvalue - The value to store.
public java.lang.Object remove(StateManager sm,
java.lang.Object key)
sm - State Manager for the map.key - Key of the item to remove.
protected abstract void removeInternal(StateManager sm,
java.lang.Object key)
public void clear(StateManager ownerSM)
ownerSM - State Manager for the map.protected abstract void clearInternal(StateManager ownerSM)
public SetStore keySetStore()
public SetStore valueSetStore()
public SetStore entrySetStore()
public JavaTypeMapping getAdapterMapping()
protected abstract MapKeySetStore newMapKeySetStore()
protected abstract MapValueSetStore newMapValueSetStore()
protected abstract MapEntrySetStore newMapEntrySetStore()
protected abstract void internalUpdate(StateManager ownerSM,
ManagedConnection conn,
boolean batched,
java.lang.Object key,
java.lang.Object value,
boolean executeNow)
throws MappedDatastoreException
MappedDatastoreException
protected abstract int[] internalPut(StateManager ownerSM,
ManagedConnection conn,
boolean batched,
java.lang.Object key,
java.lang.Object value,
boolean executeNow)
throws MappedDatastoreException
MappedDatastoreException
public ScalarExpression joinKeysTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapTableAlias,
java.lang.Class filteredKeyType,
ScalarExpression keyExpr,
DatastoreIdentifier keyTableAlias)
stmt - The Query StatementparentStmt - the parent Query Statement. If there is no parent, parentStmt must be equals to stmtownerMapping - Mapping for the ownerownerTe - Table Expression for the ownermapTableAlias - Alias for the "Map" table.filteredKeyType - The Class Type for the filtered keykeyTableAlias - The SQL alias to assign to the expression or to the key table.keyExpr - the expression to the key field. if not provided, obtain the expression of the ID of the table where filteredKeyType is stored
public ScalarExpression[] joinKeysValuesTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapTableAlias,
java.lang.Class filteredKeyType,
java.lang.Class filteredValueType,
ScalarExpression keyExpr,
ScalarExpression valExpr,
DatastoreIdentifier keyTableAlias,
DatastoreIdentifier valueTableAlias)
stmt - The Query Statement to apply the joinparentStmt - the parent Query Statement. If there is no parent, parentStmt must be equals to stmtownerMapping - Mapping for the ownerownerTe - Table Expression for the ownermapTableAlias - The SQL alias to assign to the expression or to the main table.filteredKeyType - The Class Type for the filtered keyfilteredValueType - The Class Type for the filtered valuekeyExpr - the expression to the key fieldvalExpr - Table Expression for the valuekeyTableAlias - The SQL alias to assign to the expression or to the key table.valueTableAlias - The SQL alias to assign to the expression or to the value table.
public ScalarExpression joinValuesTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapTableAlias,
java.lang.Class filteredValueType,
ScalarExpression valExpr,
DatastoreIdentifier valueTableAlias)
stmt - The Query StatementparentStmt - the parent Query Statement. If there is no parent, parentStmt must be equals to stmtownerMapping - Mapping for the ownerownerTe - Table Expression for the ownermapTableAlias - Alias for the "Map" table.filteredValueType - The Class Type for the filtered valuevalExpr - the expression to the value field. if not provided, obtain the expression of the ID of the table where filteredValueType is storedvalueTableAlias - The SQL alias to assign to the expression or to the value table.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||