org.datanucleus.store.rdbms.scostore
Class RDBMSFKArrayStore
java.lang.Object
org.datanucleus.store.rdbms.scostore.BaseContainerStore
org.datanucleus.store.rdbms.scostore.ElementContainerStore
org.datanucleus.store.rdbms.scostore.AbstractArrayStore
org.datanucleus.store.rdbms.scostore.RDBMSFKArrayStore
- All Implemented Interfaces:
- org.datanucleus.store.scostore.ArrayStore, org.datanucleus.store.scostore.Store
public class RDBMSFKArrayStore
- extends AbstractArrayStore
RDBMS-specific implementation of an FK ArrayStore.
| Fields inherited from class org.datanucleus.store.rdbms.scostore.ElementContainerStore |
addStmt, clearStmt, clr, containerTable, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, emd, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, removeStmt, sizeStmt, usingDiscriminatorInSizeStmt |
|
Method Summary |
void |
clear(org.datanucleus.store.ObjectProvider ownerSM)
Method to clear the Array. |
protected String |
getClearNullifyStmt()
Generates the statement for clearing items by nulling the owner link out. |
protected SQLStatement |
getSQLStatementForIterator(org.datanucleus.store.ObjectProvider ownerSM)
Method to generate an SQLStatement for iterating through elements of the set. |
Iterator |
iterator(org.datanucleus.store.ObjectProvider ownerSM)
Accessor for an iterator for the set. |
boolean |
set(org.datanucleus.store.ObjectProvider ownerSM,
Object array)
Method to set the array for the specified owner to the passed value. |
| Methods inherited from class org.datanucleus.store.rdbms.scostore.ElementContainerStore |
executeClear, getAddStmt, getClearStmt, getContainerTable, getElementInfo, getElementInformationForClass, getElementMapping, getEmd, getOrderMapping, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, getSize, getSizeStmt, hasOrderMapping, invalidateAddStmt, isElementsAreEmbedded, isElementsAreSerialised, size, validateElementForReading, validateElementForWriting, validateElementType |
| 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.scostore.ArrayStore |
size |
| Methods inherited from interface org.datanucleus.store.scostore.Store |
getStoreManager |
RDBMSFKArrayStore
public RDBMSFKArrayStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr)
- Parameters:
mmd - Metadata for the owning field/propertystoreMgr - Manager for the datastoreclr - ClassLoader resolver
clear
public void clear(org.datanucleus.store.ObjectProvider ownerSM)
- Method to clear the Array.
This is called when the container object is being deleted and the elements are to be removed (maybe for dependent field).
- Specified by:
clear in interface org.datanucleus.store.scostore.ArrayStore- Overrides:
clear in class AbstractArrayStore
- Parameters:
ownerSM - The state manager
getClearNullifyStmt
protected String getClearNullifyStmt()
- Generates the statement for clearing items by nulling the owner link out. The statement will be
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.
- Returns:
- The Statement for clearing items for the owner.
set
public boolean set(org.datanucleus.store.ObjectProvider ownerSM,
Object array)
- Method to set the array for the specified owner to the passed value.
- Specified by:
set in interface org.datanucleus.store.scostore.ArrayStore- Overrides:
set in class AbstractArrayStore
- Parameters:
ownerSM - State Manager for the ownerarray - the array
- Returns:
- Whether the array was updated successfully
iterator
public Iterator iterator(org.datanucleus.store.ObjectProvider ownerSM)
- Accessor for an iterator for the set.
- Specified by:
iterator in interface org.datanucleus.store.scostore.ArrayStore- Specified by:
iterator in class AbstractArrayStore
- Parameters:
ownerSM - State Manager for the set.
- Returns:
- Iterator for the set.
getSQLStatementForIterator
protected SQLStatement getSQLStatementForIterator(org.datanucleus.store.ObjectProvider ownerSM)
- Method to generate an SQLStatement for iterating through elements of the set.
Selects the element table.
Populates the iteratorMappingDef and iteratorMappingParams.
- Parameters:
ownerSM - StateManager for the owner object
- Returns:
- The SQLStatement
Copyright © 2012. All Rights Reserved.