|
|||||||||||
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.OneToManyMapStore
The backing store for a one-to-many map defined over the class base table of its values.
The value class has two fields designated the "owner" and "key" fields, both of which must map to a single column in its backing table. Each row having a non-null owner represents the presence of a mapping from that key to that value in the owner's Map. The owner column must be an OID column. The key column may or may not be an OID.
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,
ClassBaseTable valueTable,
int ownerFieldNumber,
int keyFieldNumber)
Returns a one-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 setRangeVar,
Column elemColumn)
|
protected QueryStatement.QueryColumn[] |
newSubqueryStatement(QueryStatement qs,
CorrelationName setRangeVar,
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, ClassBaseTable valueTable, int ownerFieldNumber, int keyFieldNumber)
ownerTable
- The backing table of the owner objects.valueTable
- The backing table of the value objects.ownerFieldNumber
- The absolute field number of the owner field in the value class.keyFieldNumber
- The absolute field number of the key field in the value class.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 setRangeVar, Column elemColumn)
protected QueryStatement.QueryColumn[] newSubqueryStatement(QueryStatement qs, CorrelationName setRangeVar, 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 |