|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.rdbms.scostore.BaseContainerStore
org.jpox.store.rdbms.scostore.ElementContainerStore
org.jpox.store.rdbms.scostore.AbstractArrayStore
Abstract representation of the backing store for an array.
Nested Class Summary |
Nested classes inherited from class org.jpox.store.rdbms.scostore.ElementContainerStore |
ElementContainerStore.ElementInfo |
Field Summary | |
protected java.lang.String |
addStmt
Statement for adding an element to an array. |
Fields inherited from class org.jpox.store.rdbms.scostore.ElementContainerStore |
clearStmt, clr, containerTable, dba, elementInfo, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, elmIdentifier, emd, iterateUsingDiscriminator, LOCALISER, orderMapping, ownerFieldMetaData, ownerMapping, relationDiscriminatorMapping, relationDiscriminatorValue, sizeStmt, storeMgr, thisIdentifier |
Constructor Summary | |
protected |
AbstractArrayStore(StoreManager storeMgr,
ClassLoaderResolver clr)
Constructor. |
Method Summary | |
boolean |
add(StateManager sm,
java.lang.Object element,
int position)
Adds one element to the association owner vs elements |
void |
clear(StateManager ownerSM)
Clear the association from owner to all elements. |
java.util.List |
getArray(StateManager ownerSM)
Method to retrieve the elements of the array. |
QueryExpression |
getExistsSubquery(QueryExpression qs,
JavaTypeMapping mapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionRangeVar)
JDOQL utility to generate an exists() statement for an element. |
protected abstract QueryExpression |
getIteratorStatement(StateManager ownerSM)
Accessor for the statement for the iterator. |
QueryExpression |
getSizeSubquery(QueryExpression qs,
JavaTypeMapping mapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionRangeVar)
JDOQL utility to generate a subquery for the size() of the collection. |
java.util.Iterator |
iterator(StateManager ownerSM)
Accessor for an iterator through the array elements. |
boolean |
set(StateManager ownerSM,
java.lang.Object array)
Method to set the array for the specified owner to the passed value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jpox.store.scostore.ArrayStore |
getElementType, joinElementsTo, size |
Methods inherited from interface org.jpox.store.scostore.Store |
getOwnerMapping, getStoreManager |
Field Detail |
protected java.lang.String addStmt
Constructor Detail |
protected AbstractArrayStore(StoreManager storeMgr, ClassLoaderResolver clr)
storeMgr
- Manager for the storeclr
- ClassLoader resolverMethod Detail |
public java.util.List getArray(StateManager ownerSM)
ArrayStore
getArray
in interface ArrayStore
ownerSM
- State Manager of the owner
public void clear(StateManager ownerSM)
clear
in interface ArrayStore
clear
in class ElementContainerStore
ownerSM
- State Manager for the container.public boolean set(StateManager ownerSM, java.lang.Object array)
set
in interface ArrayStore
ownerSM
- State Manager for the ownerarray
- the array
public boolean add(StateManager sm, java.lang.Object element, int position)
sm
- State Manager for the containerelement
- The element to addposition
- The position to add this element at
protected abstract QueryExpression getIteratorStatement(StateManager ownerSM)
ownerSM
- the owner StateManager
public java.util.Iterator iterator(StateManager ownerSM)
iterator
in interface ArrayStore
iterator
in class ElementContainerStore
ownerSM
- State Manager for the container.
public QueryExpression getExistsSubquery(QueryExpression qs, JavaTypeMapping mapping, LogicSetExpression ownerTe, DatastoreIdentifier collectionRangeVar)
SELECT 1 FROM JOINTABLE THIS_JOIN WHERE THIS_JOIN.OWNER_ID_OID = THIS.OWNER_ID
getExistsSubquery
in interface ArrayStore
qs
- The JDOQL query statementmapping
- mapping of the fieldownerTe
- Expression for the tablecollectionRangeVar
- range variable for the collection
public QueryExpression getSizeSubquery(QueryExpression qs, JavaTypeMapping mapping, LogicSetExpression ownerTe, DatastoreIdentifier collectionRangeVar)
SELECT COUNT(*) FROM JOINTABLE THIS_JOIN WHERE THIS_JOIN.OWNER_ID_OID = THIS.OWNER_ID
getSizeSubquery
in interface ArrayStore
qs
- The JDOQL query statementmapping
- mapping of the fieldownerTe
- Expression for the tablecollectionRangeVar
- range variable for the collection
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |