public class JoinArrayStore<E> extends AbstractArrayStore<E>
addStmt, clearStmt, containerTable, elementCmd, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, removeStmt, sizeStmt
allowNulls, clr, dba, ownerMapping, ownerMemberMetaData, relationType, storeMgr
Constructor and Description |
---|
JoinArrayStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
ArrayTable arrayTable,
org.datanucleus.ClassLoaderResolver clr)
Constructor for an RDBMS implementation of a join array store.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Iterator<E> |
iterator(org.datanucleus.state.ObjectProvider ownerOP)
Method to return an iterator to the array.
|
add, clear, clearInternal, getArray, internalAdd, processBatchedWrites, set
getAddStmtForJoinTable, getClearStmt, getComponentInfoForElement, getContainerTable, getElementClassMetaData, getElementMapping, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, getSize, getSizeStmt, hasOrderMapping, invalidateAddStmt, isElementsAreEmbedded, isElementsAreSerialised, size, usingJoinTable, validateElementForReading, validateElementForWriting, validateElementType
allowsBatching, getComponentInformationForClass, getDatastoreAdapter, getObjectProviderForEmbeddedPCObject, getOwnerMapping, getOwnerMemberMetaData, getRelationType, getStoreManager, isEmbeddedMapping, setOwner
public JoinArrayStore(org.datanucleus.metadata.AbstractMemberMetaData mmd, ArrayTable arrayTable, org.datanucleus.ClassLoaderResolver clr)
mmd
- Metadata for the owning field/propertyarrayTable
- The Join tableclr
- ClassLoader resolverpublic Iterator<E> iterator(org.datanucleus.state.ObjectProvider ownerOP)
iterator
in interface org.datanucleus.store.types.scostore.ArrayStore<E>
iterator
in class AbstractArrayStore<E>
ownerOP
- ObjectProvider for the owner of the arraypublic ElementIteratorStatement getIteratorStatement(org.datanucleus.ExecutionContext ec, org.datanucleus.FetchPlan fp, boolean addRestrictionOnOwner)
SELECT 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}]
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).Copyright © 2019. All rights reserved.