|
||||||||||
| 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.MapEntrySetStore
public abstract class MapEntrySetStore
Representation of backing store for a Map EntrySet.
| Field Summary | |
|---|---|
protected ClassLoaderResolver |
clr
|
protected JavaTypeMapping |
keyMapping
Mapping for the key. |
protected MapStore |
mapStore
The backing store for the Map. |
protected DatastoreContainerObject |
mapTable
Table containing the key and value forming the entry. |
protected JavaTypeMapping |
valueMapping
Mapping for the value. |
| Fields inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore |
|---|
allowsNull, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr |
| Constructor Summary | |
|---|---|
MapEntrySetStore(DatastoreContainerObject mapTable,
AbstractMemberMetaData ownerMemberMetaData,
JavaTypeMapping ownerMapping,
JavaTypeMapping keyMapping,
JavaTypeMapping valueMapping,
MapStore mapStore,
ClassLoaderResolver clr)
Constructor for a store for the entries of a map. |
|
| Method Summary | |
|---|---|
boolean |
add(StateManager sm,
java.lang.Object element,
int size)
Method to add an entry to the Map. |
boolean |
addAll(StateManager sm,
java.util.Collection elements,
int size)
Method to add entries to the Map. |
void |
clear(StateManager sm)
Method to clear the Map. |
boolean |
contains(StateManager sm,
java.lang.Object element)
Method to check if an element exists in the collection. |
QueryExpression |
getExistsSubquery(QueryExpression stmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionTableAlias)
Create a subquery for the given query that joins a SetStore element table to the owner table. |
JavaTypeMapping |
getKeyMapping()
|
MapStore |
getMapStore()
|
JavaTypeMapping |
getOwnerMapping()
Accessor for the owner mapping. |
QueryExpression |
getSizeSubquery(QueryExpression stmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionTableAlias)
Create a subquery for the size() of the collection of entries. |
JavaTypeMapping |
getValueMapping()
|
boolean |
hasOrderMapping()
Accessor for whether this store has an order mapping to allow for duplicates, or ordering. |
abstract java.util.Iterator |
iterator(StateManager sm)
Accessor for an iterator for the entries of the Map. |
ScalarExpression |
joinElementsTo(QueryExpression stmt,
QueryExpression qs,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionTableAlias,
java.lang.Class filteredElementType,
ScalarExpression elmExpr,
DatastoreIdentifier elementTableAlias,
boolean existsQuery)
Method used in queries when contains() has been invoked. |
boolean |
remove(StateManager sm,
java.lang.Object element,
int size,
boolean allowDependentField)
Method to remove an entry from the Map. |
boolean |
removeAll(StateManager sm,
java.util.Collection elements,
int size)
Method to remove entries from the Map. |
abstract int |
size(StateManager sm)
Accessor for the size of the Map. |
void |
update(StateManager sm,
java.util.Collection coll)
Method to update the collection to be the supplied collection of elements. |
boolean |
updateEmbeddedElement(StateManager sm,
java.lang.Object element,
int fieldNumber,
java.lang.Object value)
Method to update an embedded element. |
protected boolean |
validateElementType(java.lang.Object element)
|
| Methods inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore |
|---|
allowsBatching, getDatastoreAdapter, 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.CollectionStore |
|---|
getElementType |
| Methods inherited from interface org.datanucleus.store.scostore.Store |
|---|
getStoreManager |
| Field Detail |
|---|
protected DatastoreContainerObject mapTable
protected MapStore mapStore
protected JavaTypeMapping keyMapping
protected JavaTypeMapping valueMapping
protected ClassLoaderResolver clr
| Constructor Detail |
|---|
public MapEntrySetStore(DatastoreContainerObject mapTable,
AbstractMemberMetaData ownerMemberMetaData,
JavaTypeMapping ownerMapping,
JavaTypeMapping keyMapping,
JavaTypeMapping valueMapping,
MapStore mapStore,
ClassLoaderResolver clr)
mapTable - The table handling the relation (can be join table, or key table, or value table)ownerMemberMetaData - Metadata for the owning field/propertyownerMapping - Mapping back to the owner from this tablekeyMapping - Mapping for the keyvalueMapping - Mapping for the valuemapStore - Backing store for the mapclr - ClassLoader resolver| Method Detail |
|---|
public boolean hasOrderMapping()
hasOrderMapping in interface CollectionStore
public boolean updateEmbeddedElement(StateManager sm,
java.lang.Object element,
int fieldNumber,
java.lang.Object value)
updateEmbeddedElement in interface CollectionStoresm - State Manager of the ownerelement - The element to updatefieldNumber - The number of the field to updatevalue - The value
public JavaTypeMapping getOwnerMapping()
getOwnerMapping in class BaseContainerStoreprotected boolean validateElementType(java.lang.Object element)
public abstract java.util.Iterator iterator(StateManager sm)
iterator in interface CollectionStoresm - State manager for the owner
public abstract int size(StateManager sm)
size in interface CollectionStoresm - The state manager
public void update(StateManager sm,
java.util.Collection coll)
update in interface CollectionStoresm - StateManager of the objectcoll - The collection to use
public boolean contains(StateManager sm,
java.lang.Object element)
CollectionStore
contains in interface CollectionStoresm - State Manager for the collection.element - Element to check
public boolean add(StateManager sm,
java.lang.Object element,
int size)
add in interface CollectionStoresm - State Manager for the ownerelement - Entry to addsize - Current size of the collection if known. -1 if not known
public boolean addAll(StateManager sm,
java.util.Collection elements,
int size)
addAll in interface CollectionStoresm - State Manager for the ownerelements - Entries to addsize - Current size of collection (if known). -1 if not known
public boolean remove(StateManager sm,
java.lang.Object element,
int size,
boolean allowDependentField)
remove in interface CollectionStoresm - State Manager for the ownerelement - Entry to removesize - Current size of collection if known. -1 if not knownallowDependentField - Whether to allow any cascading delete actions to be fired from this removal
public boolean removeAll(StateManager sm,
java.util.Collection elements,
int size)
removeAll in interface CollectionStoresm - State Manager for the ownerelements - Entries to removesize - Current size of collection if known. -1 if not known
public void clear(StateManager sm)
clear in interface CollectionStoresm - State Manager for the owner.public MapStore getMapStore()
public JavaTypeMapping getKeyMapping()
public JavaTypeMapping getValueMapping()
public QueryExpression getExistsSubquery(QueryExpression stmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionTableAlias)
stmt - The Query Statement.ownerMapping - the mapping for the owner.ownerTe - Table Expression for the ownercollectionTableAlias - Alias for the "Collection" table.
NucleusUserException - unsupported method
public QueryExpression getSizeSubquery(QueryExpression stmt,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionTableAlias)
stmt - The Query Statement.ownerMapping - the mapping for the owner.ownerTe - Table Expression for the ownercollectionTableAlias - Alias for the "Collection" table.
NucleusUserException - unsupported method
public ScalarExpression joinElementsTo(QueryExpression stmt,
QueryExpression qs,
JavaTypeMapping ownerMapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionTableAlias,
java.lang.Class filteredElementType,
ScalarExpression elmExpr,
DatastoreIdentifier elementTableAlias,
boolean existsQuery)
stmt - The Query StatementownerMapping - the mapping for the owner.ownerTe - Table Expression for the ownercollectionTableAlias - Alias for the "Collection" table.filteredElementType - The Class Type for the filtered elementelmExpr - The Expression for the elementelementTableAlias - The SQL alias to assign to the expression or to the element table.
NucleusUserException - unsupported method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||