|
|||||||||||
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.AbstractCollectionStore
Abstract representation of a store of a Collection. Contains all common parts of storing Sets and Lists.
Nested Class Summary |
Nested classes inherited from class org.jpox.store.rdbms.scostore.ElementContainerStore |
ElementContainerStore.ElementInfo |
Field Summary | |
protected java.lang.String |
containsStmt
Statement for getting whether an element is contained in the collection. |
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 |
AbstractCollectionStore(StoreManager storeMgr,
ClassLoaderResolver clr)
Constructor. |
Method Summary | |
boolean |
contains(StateManager sm,
java.lang.Object element)
Method to verify if the association owner vs elements contains a specific element in the association |
protected java.lang.String |
getContainsStmt()
Generate statement for retrieving the contents of the Collection. |
QueryExpression |
getExistsSubquery(QueryExpression qs,
JavaTypeMapping mapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionRangeVar)
JDOQL utility to generate an exists() statement for an element. |
QueryExpression |
getSizeSubquery(QueryExpression qs,
JavaTypeMapping mapping,
LogicSetExpression ownerTe,
DatastoreIdentifier collectionRangeVar)
JDOQL utility to generate a subquery for the size() of the collection. |
protected java.lang.String |
getUpdateEmbeddedElementStmt(JavaTypeMapping fieldMapping)
Generate statement for update the field of an embedded element. |
protected void |
initialiseStatements()
Method to initialise the statements being used. |
boolean |
updateEmbeddedElement(StateManager sm,
java.lang.Object element,
int fieldNumber,
java.lang.Object value)
Method to update a field of an embedded element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String containsStmt
Constructor Detail |
protected AbstractCollectionStore(StoreManager storeMgr, ClassLoaderResolver clr)
storeMgr
- Manager for the storeclr
- ClassLoader resolverMethod Detail |
protected void initialiseStatements()
initialiseStatements
in class ElementContainerStore
protected java.lang.String getUpdateEmbeddedElementStmt(JavaTypeMapping fieldMapping)
UPDATE SETTABLE SET EMBEDDEDFIELD1 = ? WHERE OWNERCOL=? AND ELEMENTCOL = ?
fieldMapping
- The mapping for the field within the embedded object to be updated
public boolean updateEmbeddedElement(StateManager sm, java.lang.Object element, int fieldNumber, java.lang.Object value)
sm
- State Manager of the ownerelement
- The element to updatefieldNumber
- The number of the field to updatevalue
- The value
protected java.lang.String getContainsStmt()
SELECT OWNERCOL FROM COLLECTIONTABLE WHERE OWNERCOL=? AND ELEMENTCOL=? [AND DISCRIMINATOR=?] [AND RELATION_DISCRIM=?]
public boolean contains(StateManager sm, java.lang.Object element)
sm
- The StateManagerelement
- The element
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
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
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 |