public class FKArrayStore<E> extends AbstractArrayStore<E>
addStmt, clearStmt, containerTable, elementCmd, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, removeStmt, sizeStmtallowNulls, clr, dba, ownerMapping, ownerMemberMetaData, relationType, storeMgr| Constructor and Description |
|---|
FKArrayStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(org.datanucleus.state.ObjectProvider ownerOP)
Method to clear the Array.
|
protected String |
getClearNullifyStmt()
Generates the statement for clearing items by nulling the owner link out.
|
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)
Accessor for an iterator for the set.
|
boolean |
set(org.datanucleus.state.ObjectProvider ownerOP,
Object array)
Method to set the array for the specified owner to the passed value.
|
add, clearInternal, getArray, internalAdd, processBatchedWritesgetAddStmtForJoinTable, getClearStmt, getComponentInfoForElement, getContainerTable, getElementClassMetaData, getElementMapping, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, getSize, getSizeStmt, hasOrderMapping, invalidateAddStmt, isElementsAreEmbedded, isElementsAreSerialised, size, usingJoinTable, validateElementForReading, validateElementForWriting, validateElementTypeallowsBatching, getComponentInformationForClass, getDatastoreAdapter, getObjectProviderForEmbeddedPCObject, getOwnerMapping, getOwnerMemberMetaData, getRelationType, getStoreManager, isEmbeddedMapping, setOwnerpublic FKArrayStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr)
mmd - Metadata for the owning field/propertystoreMgr - Manager for the datastoreclr - ClassLoader resolverpublic void clear(org.datanucleus.state.ObjectProvider ownerOP)
clear in interface org.datanucleus.store.types.scostore.ArrayStore<E>clear in class AbstractArrayStore<E>ownerOP - The ObjectProviderprotected String getClearNullifyStmt()
UPDATE ARRAYTABLE SET OWNERCOL=NULL, INDEXCOL=NULL [,DISTINGUISHER=NULL] WHERE OWNERCOL=? [AND DISTINGUISHER=?]when there is only one element table, and will be
UPDATE ? SET OWNERCOL=NULL, INDEXCOL=NULL [,DISTINGUISHER=NULL] WHERE OWNERCOL=? [AND DISTINGUISHER=?]when there is more than 1 element table.
public boolean set(org.datanucleus.state.ObjectProvider ownerOP,
Object array)
set in interface org.datanucleus.store.types.scostore.ArrayStore<E>set in class AbstractArrayStore<E>ownerOP - ObjectProvider for the ownerarray - the arraypublic 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 set.public ElementIteratorStatement getIteratorStatement(org.datanucleus.ExecutionContext ec, org.datanucleus.FetchPlan fp, boolean addRestrictionOnOwner)
SELECT ELEM_COLS
FROM ELEM_TBL
[WHERE]
[ELEM_TBL.OWNER_ID = {value}] [AND]
[ELEM_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.