|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.triactive.jdo.store.AbstractMapStore com.triactive.jdo.store.ManyToManyMapStore
The backing store for a many-to-many map defined over a join table.
The join table has (at least) three columns, designated the "owner", "key", and "value" columns. Each {owner,key,value} triplet represents the presence of that key-value mapping in the owner's Map. The owner column must be an OID column. The key and value columns may or may not be OIDs.
The base PersistenceCapable type of the owning objects in question must be
known (their ClassBaseTable
must be provided).
Field Summary | |
protected DatabaseAdapter |
dba
|
Method Summary | |
boolean |
allowsNullValues()
Indicates whether null values are allowed to be stored. |
void |
clearAll(java.util.Collection owners)
Clears the maps associated with an entire group of objects. |
boolean |
equals(java.lang.Object obj)
|
static MapStore |
getInstance(ClassBaseTable ownerTable,
Table joinTable,
ColumnMapping ownerMapping,
ColumnMapping keyMapping,
ColumnMapping valueMapping)
Returns a many-to-many map store. |
java.lang.Class |
getKeyType()
Returns the type of keys stored in the Map fields. |
java.lang.Class |
getValueType()
Returns the type of values stored in the Map fields. |
int |
hashCode()
|
protected com.triactive.jdo.store.AbstractMapStore |
intern()
|
boolean |
isEmbeddedKey()
Indicates whether or not keys are "embedded" in the store. An embedded object is stored by value (SCO), otherwise an OID reference is stored (FCO). |
boolean |
isEmbeddedValue()
Indicates whether or not values are "embedded" in the store. An embedded object is stored by value (SCO), otherwise an OID reference is stored (FCO). |
CollectionStore |
keySetCollection()
Returns a collection view of the map's key set. |
PersistentMap |
newMapInstance(StateManager owner)
Returns a new persistent map representing the map associated with the given object. Iterators returned by the map's collection views (entrySet(), keySet(), values()) support the remove() method. |
protected QueryStatement.QueryColumn[] |
newSubqueryStatement(QueryStatement qs,
CorrelationName collectionRangeVar,
Column elemColumn)
|
protected QueryStatement.QueryColumn[] |
newSubqueryStatement(QueryStatement qs,
CorrelationName collectionRangeVar,
CorrelationName elemRangeVar,
java.lang.Class elemSubtype,
Column elemColumn)
|
CollectionStore |
valuesCollection()
Returns a collection view of the map's values. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final DatabaseAdapter dba
Method Detail |
public static MapStore getInstance(ClassBaseTable ownerTable, Table joinTable, ColumnMapping ownerMapping, ColumnMapping keyMapping, ColumnMapping valueMapping)
ownerTable
- The backing table of the owner objects.joinTable
- The table joining owners,keys to values.ownerMapping
- The mapping for the owner column in the join table.keyMapping
- The mapping for the key column in the join table.valueMapping
- The mapping for the value column in the join table.public java.lang.Class getKeyType()
public java.lang.Class getValueType()
public boolean isEmbeddedKey()
public boolean isEmbeddedValue()
public boolean allowsNullValues()
public CollectionStore keySetCollection()
MapStore
public CollectionStore valuesCollection()
MapStore
protected QueryStatement.QueryColumn[] newSubqueryStatement(QueryStatement qs, CorrelationName collectionRangeVar, Column elemColumn)
protected QueryStatement.QueryColumn[] newSubqueryStatement(QueryStatement qs, CorrelationName collectionRangeVar, CorrelationName elemRangeVar, java.lang.Class elemSubtype, Column elemColumn)
public PersistentMap newMapInstance(StateManager owner)
Iterators returned by the map's collection views (entrySet(), keySet(), values()) support the remove() method.
owner
- The StateManager of the object whose set is to be returned.
public int hashCode()
public boolean equals(java.lang.Object obj)
protected com.triactive.jdo.store.AbstractMapStore intern()
public void clearAll(java.util.Collection owners)
The implementation in this class simply iterates over the owners,
and calls newMapInstance(o).clear()
on each one.
Like SetStore.clearAll(java.util.Collection)
there are opportunities for further
optimization here.
clearAll
in interface MapStore
owners
- The StateManagers of all the objects whose set is to be cleared.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |