|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapStore
Interface representation of the backing store for a Map.
Method Summary | |
---|---|
void |
clear(StateManager ownerSM)
Method to clear the collection. |
boolean |
containsKey(StateManager ownerSM,
java.lang.Object key)
Accessor for whether the Map contains this key. |
boolean |
containsValue(StateManager ownerSM,
java.lang.Object value)
Accessor for whether the Map contains this value. |
SetStore |
entrySetStore()
Accessor for the entry set for the Map. |
java.lang.Object |
get(StateManager ownerSM,
java.lang.Object key)
Accessor for a value from the Map. |
QueryExpression |
getExistsSubquery(QueryExpression stmt,
JavaTypeMapping mapping,
LogicSetExpression te,
DatastoreIdentifier mapRangeVar)
Create a subquery for the given query that joins a MapStore value table to the owner table. |
java.lang.String |
getKeyType()
Accessor for the key type in the collection. |
QueryExpression |
getSizeSubquery(QueryExpression stmt,
JavaTypeMapping mapping,
LogicSetExpression te,
DatastoreIdentifier mapRangeVar)
Create a subquery for the size of the map. |
java.lang.String |
getValueType()
Accessor for the value type in the collection. |
ScalarExpression |
joinKeysTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression te,
DatastoreIdentifier mapRangeVar,
java.lang.Class filteredKeyType,
ScalarExpression keyExpr,
DatastoreIdentifier keyRangeVar)
Utility to create a join for keys to be used in a containsKey() query. |
ScalarExpression[] |
joinKeysToGet(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapRangeVar,
java.lang.Class filteredKeyType,
DatastoreIdentifier keyRangeVar,
DatastoreIdentifier valueRangeVar)
Used as part of the Querying of Maps where a get(Key) is used. |
ScalarExpression[] |
joinKeysValuesTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression te,
DatastoreIdentifier mapRangeVar,
java.lang.Class filteredKeyType,
java.lang.Class filteredValueType,
ScalarExpression keyExpr,
ScalarExpression valExpr,
DatastoreIdentifier keyRangeVar,
DatastoreIdentifier valueRangeVar)
Utility to create a join for keys and values to be used in ai containsEntry() query. |
ScalarExpression |
joinValuesTo(QueryExpression stmt,
QueryExpression parentStmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier mapRangeVar,
java.lang.Class filteredValueType,
ScalarExpression valExpr,
DatastoreIdentifier valueRangeVar)
Used as part of the Querying of Maps where a containsValue() is used. |
boolean |
keysAreEmbedded()
Accessor for whether the keys are embedded |
boolean |
keysAreSerialised()
Accessor for whether the keys are serialised |
SetStore |
keySetStore(ClassLoaderResolver clr)
Accessor for the keys in the Map. |
QueryExpression |
newQueryStatement(StateManager ownerSM,
java.lang.String candidateClass)
Method to create a query statement for a Map with values of the supplied candidate class. |
Query.ResultObjectFactory |
newResultObjectFactory(StateManager ownerSM,
QueryExpression stmt,
boolean ignoreCache,
boolean useFetchPlan)
Utility to create a Result Object Factory to process the results of selects returning values. |
java.lang.Object |
put(StateManager ownerSM,
java.lang.Object key,
java.lang.Object value)
Method to add a value to the Map against this key. |
void |
putAll(StateManager ownerSM,
java.util.Map m)
Method to add a map of values to the Map. |
java.lang.Object |
remove(StateManager ownerSM,
java.lang.Object key)
Method to remove a value from the Map. |
boolean |
updateEmbeddedKey(StateManager sm,
java.lang.Object key,
int fieldNumber,
java.lang.Object newValue)
Method to update en embedded key in the collection. |
boolean |
updateEmbeddedValue(StateManager sm,
java.lang.Object value,
int fieldNumber,
java.lang.Object newValue)
Method to update en embedded value in the collection. |
boolean |
valuesAreEmbedded()
Accessor for whether the values are embedded |
boolean |
valuesAreSerialised()
Accessor for whether the values are serialised |
SetStore |
valueSetStore(ClassLoaderResolver clr)
Accessor for the values in the Map. |
Methods inherited from interface org.jpox.store.scostore.Store |
---|
getOwnerMapping, getStoreManager |
Method Detail |
---|
java.lang.String getKeyType()
java.lang.String getValueType()
boolean keysAreEmbedded()
boolean keysAreSerialised()
boolean valuesAreEmbedded()
boolean valuesAreSerialised()
boolean containsValue(StateManager ownerSM, java.lang.Object value)
ownerSM
- State Manager for the Map.value
- The value to check
boolean containsKey(StateManager ownerSM, java.lang.Object key)
ownerSM
- State Manager for the Map.key
- The key to check
java.lang.Object get(StateManager ownerSM, java.lang.Object key)
ownerSM
- State Manager for the Map.key
- Key for the value.
java.lang.Object put(StateManager ownerSM, java.lang.Object key, java.lang.Object value)
ownerSM
- State Manager for the Map.key
- The key.value
- The value.
void putAll(StateManager ownerSM, java.util.Map m)
ownerSM
- State Manager for the Map.m
- The map to add.java.lang.Object remove(StateManager ownerSM, java.lang.Object key)
ownerSM
- State Manager for the Map.key
- Key whose value is to be removed.
void clear(StateManager ownerSM)
ownerSM
- State Manager for the collection.SetStore keySetStore(ClassLoaderResolver clr)
clr
- The ClassLoaderResolver
SetStore valueSetStore(ClassLoaderResolver clr)
clr
- The ClassLoaderResolver
SetStore entrySetStore()
boolean updateEmbeddedKey(StateManager sm, java.lang.Object key, int fieldNumber, java.lang.Object newValue)
sm
- State Manager of the ownerkey
- The elementfieldNumber
- Field to update in the keynewValue
- The new value for the field
boolean updateEmbeddedValue(StateManager sm, java.lang.Object value, int fieldNumber, java.lang.Object newValue)
sm
- State Manager of the ownervalue
- The elementfieldNumber
- Field to update in the valuenewValue
- The new value for the field
QueryExpression newQueryStatement(StateManager ownerSM, java.lang.String candidateClass)
ownerSM
- StateManager for the MapcandidateClass
- The class for the values
Query.ResultObjectFactory newResultObjectFactory(StateManager ownerSM, QueryExpression stmt, boolean ignoreCache, boolean useFetchPlan)
ownerSM
- State Manager for the Map.stmt
- The Query StatementignoreCache
- Whether to ignore the cacheuseFetchPlan
- whether to use the fetch plan to retrieve fields in the same query
QueryExpression getExistsSubquery(QueryExpression stmt, JavaTypeMapping mapping, LogicSetExpression te, DatastoreIdentifier mapRangeVar)
stmt
- The Query Statement to apply the joinmapping
- Mapping for the ownerte
- Table Expression for the ownermapRangeVar
- The range variable for the "Map" table.
QueryExpression getSizeSubquery(QueryExpression stmt, JavaTypeMapping mapping, LogicSetExpression te, DatastoreIdentifier mapRangeVar)
stmt
- The Query Statement to apply the joinmapping
- Mapping for the ownerte
- Table Expression for the ownermapRangeVar
- The range variable for the "Map" table.
ScalarExpression[] joinKeysValuesTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression te, DatastoreIdentifier mapRangeVar, java.lang.Class filteredKeyType, java.lang.Class filteredValueType, ScalarExpression keyExpr, ScalarExpression valExpr, DatastoreIdentifier keyRangeVar, DatastoreIdentifier valueRangeVar)
stmt
- The Query Statement to apply the joinparentStmt
- the parent Query Statement. If there is no parent, parentStmt
must be equals to stmt
ownerMapping
- Mapping for the ownerte
- Table Expression for the ownermapRangeVar
- The SQL alias, or "range variable", 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 valuekeyRangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the key table.valueRangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the value table.
ScalarExpression joinKeysTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression te, DatastoreIdentifier mapRangeVar, java.lang.Class filteredKeyType, ScalarExpression keyExpr, DatastoreIdentifier keyRangeVar)
stmt
- The Query StatementparentStmt
- the parent Query Statement. If there is no parent, parentStmt
must be equals to stmt
ownerMapping
- Mapping for the ownerte
- Table Expression for the ownermapRangeVar
- The range variable for the "Map" table.filteredKeyType
- The Class Type for the filtered keykeyExpr
- the expression to the key field. if not provided, obtain the expression of the ID of the table where filteredKeyType is storedkeyRangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the key table.
ScalarExpression joinValuesTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTe, DatastoreIdentifier mapRangeVar, java.lang.Class filteredValueType, ScalarExpression valExpr, DatastoreIdentifier valueRangeVar)
stmt
- The Query StatementparentStmt
- the parent Query Statement. If there is no parent, parentStmt
must be equals to stmt
ownerMapping
- Mapping for the ownerownerTe
- Table Expression for the ownermapRangeVar
- The range variable 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 storedvalueRangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the value table.
ScalarExpression[] joinKeysToGet(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTe, DatastoreIdentifier mapRangeVar, java.lang.Class filteredKeyType, DatastoreIdentifier keyRangeVar, DatastoreIdentifier valueRangeVar)
stmt
- The Query Statement to apply the joinparentStmt
- the parent Query Statement. If there is no parent, parentStmt
must be equals to stmt
ownerMapping
- Mapping for the ownerownerTe
- Table Expression for the ownermapRangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the main table.filteredKeyType
- The Class Type for the filtered keykeyRangeVar
- The SQL alias, or "range variable", to assign to the
expression or to the key table.valueRangeVar
- The SQL alias, or "range variable", 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 |