Class JoinArrayStore<E>
java.lang.Object
org.datanucleus.store.rdbms.scostore.BaseContainerStore
org.datanucleus.store.rdbms.scostore.ElementContainerStore
org.datanucleus.store.rdbms.scostore.AbstractArrayStore<E>
org.datanucleus.store.rdbms.scostore.JoinArrayStore<E>
- All Implemented Interfaces:
org.datanucleus.store.types.scostore.ArrayStore<E>
,org.datanucleus.store.types.scostore.Store
Implementation of a Join ArrayStore
-
Field Summary
Fields inherited from class org.datanucleus.store.rdbms.scostore.ElementContainerStore
addStmt, clearStmt, containerTable, elementCmd, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, removeStmt, sizeStmt
Fields inherited from class org.datanucleus.store.rdbms.scostore.BaseContainerStore
allowNulls, clr, dba, ownerMapping, ownerMemberMetaData, relationType, storeMgr
-
Constructor Summary
ConstructorsConstructorDescriptionJoinArrayStore
(org.datanucleus.metadata.AbstractMemberMetaData mmd, ArrayTable arrayTable, org.datanucleus.ClassLoaderResolver clr) Constructor for an RDBMS implementation of a join array store. -
Method Summary
Modifier and TypeMethodDescriptiongetIteratorStatement
(org.datanucleus.ExecutionContext ec, org.datanucleus.FetchPlan fp, boolean addRestrictionOnOwner) Method to return the SQLStatement and mapping for an iterator for this backing store.iterator
(org.datanucleus.state.DNStateManager ownerSM) Accessor for an iterator through the array elements.Methods inherited from class org.datanucleus.store.rdbms.scostore.AbstractArrayStore
add, clear, clearInternal, getArray, internalAdd, set
Methods inherited from class org.datanucleus.store.rdbms.scostore.ElementContainerStore
getAddStmtForJoinTable, getClearStmt, getComponentInfoForElement, getContainerTable, getElementClassMetaData, getElementMapping, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, getSize, getSizeStmt, hasOrderMapping, invalidateAddStmt, isElementsAreEmbedded, isElementsAreSerialised, size, usingJoinTable, validateElementForReading, validateElementForWriting, validateElementType
Methods inherited from class org.datanucleus.store.rdbms.scostore.BaseContainerStore
allowsBatching, getComponentInformationForClass, getDatastoreAdapter, getOwnerMapping, 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.types.scostore.ArrayStore
size
Methods inherited from interface org.datanucleus.store.types.scostore.Store
getOwnerMemberMetaData, getStoreManager
-
Constructor Details
-
JoinArrayStore
public JoinArrayStore(org.datanucleus.metadata.AbstractMemberMetaData mmd, ArrayTable arrayTable, org.datanucleus.ClassLoaderResolver clr) Constructor for an RDBMS implementation of a join array store.- Parameters:
mmd
- Metadata for the owning field/propertyarrayTable
- The Join tableclr
- ClassLoader resolver
-
-
Method Details
-
iterator
Description copied from class:AbstractArrayStore
Accessor for an iterator through the array elements.- Specified by:
iterator
in interfaceorg.datanucleus.store.types.scostore.ArrayStore<E>
- Specified by:
iterator
in classAbstractArrayStore<E>
- Parameters:
ownerSM
- StateManager for the container.- Returns:
- The Iterator
-
getIteratorStatement
public ElementIteratorStatement getIteratorStatement(org.datanucleus.ExecutionContext ec, org.datanucleus.FetchPlan fp, boolean addRestrictionOnOwner) Method to return the SQLStatement and mapping for an iterator for this backing store. Create a statement of the formSELECT ELEM_COLS FROM JOIN_TBL [JOIN ELEM_TBL ON ELEM_TBL.ID = JOIN_TBL.ELEM_ID] [WHERE] [JOIN_TBL.OWNER_ID = {value}] [AND] [JOIN_TBL.DISCRIM = {discrimValue}] [ORDER BY {orderClause}]
- Parameters:
ec
- ExecutionContextfp
- FetchPlan to use in determing which fields of element to selectaddRestrictionOnOwner
- Whether to restrict to a particular owner (otherwise functions as bulk fetch for many owners).- Returns:
- The SQLStatement and its associated StatementClassMapping
-