|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.scostore.BaseContainerStore
org.datanucleus.store.rdbms.scostore.ElementContainerStore
org.datanucleus.store.rdbms.scostore.AbstractCollectionStore
org.datanucleus.store.rdbms.scostore.AbstractListStore
org.datanucleus.store.rdbms.scostore.RDBMSJoinListStore
public class RDBMSJoinListStore
RDBMS-specific implementation of a ListStore using join table.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.scostore.ElementContainerStore |
|---|
ElementContainerStore.ElementInfo |
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.store.rdbms.scostore.AbstractListStore |
|---|
indexedList, indexOfStmt, lastIndexOfStmt, removeAtStmt, shiftStmt |
| Fields inherited from class org.datanucleus.store.rdbms.scostore.AbstractCollectionStore |
|---|
containsStmt |
| 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 |
| Fields inherited from class org.datanucleus.store.rdbms.scostore.BaseContainerStore |
|---|
allowNulls, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr |
| Constructor Summary | |
|---|---|
RDBMSJoinListStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
CollectionTable collTable,
org.datanucleus.ClassLoaderResolver clr)
Constructor for an RDBMS implementation of a join list store. |
|
| Method Summary | |
|---|---|
protected String |
getRemoveAllStmt(Collection elements)
Generate statement for removing a collection of items from the List. |
protected String |
getSetStmt()
Generates the statement for setting an item. |
protected SQLStatement |
getSQLStatementForIterator(org.datanucleus.store.ObjectProvider op,
int startIdx,
int endIdx,
org.datanucleus.store.mapped.StatementClassMapping resultMapping,
StatementParameterMapping paramMapping)
Method to generate an SQLStatement for iterating through elements of the set. |
protected boolean |
internalAdd(org.datanucleus.store.ObjectProvider sm,
int start,
boolean atEnd,
Collection c,
int size)
Internal method to add element(s) to the List. |
protected boolean |
internalRemove(org.datanucleus.store.ObjectProvider ownerSM,
Object element,
int size)
Convenience method to remove the specified element from the List. |
protected void |
internalRemoveAt(org.datanucleus.store.ObjectProvider sm,
int index,
int size)
Method to remove an element from the specified position |
protected ListIterator |
listIterator(org.datanucleus.store.ObjectProvider op,
int startIdx,
int endIdx)
Accessor for an iterator through the list elements. |
boolean |
removeAll(org.datanucleus.store.ObjectProvider op,
Collection elements,
int size)
Remove all elements from a collection from the association owner vs elements. |
Object |
set(org.datanucleus.store.ObjectProvider op,
int index,
Object element,
boolean allowDependentField)
Method to set an object in the List. |
void |
update(org.datanucleus.store.ObjectProvider sm,
Collection coll)
Method to update the collection to be the supplied collection of elements. |
| Methods inherited from class org.datanucleus.store.rdbms.scostore.AbstractListStore |
|---|
add, add, addAll, addAll, get, getIndexOfStmt, getIndicesOf, getIndicesOfStmt, getLastIndexOfStmt, getRemoveAtStmt, getShiftStmt, indexOf, internalIndexOf, internalRemoveAt, internalShift, iterator, lastIndexOf, listIterator, remove, remove, subList |
| Methods inherited from class org.datanucleus.store.rdbms.scostore.AbstractCollectionStore |
|---|
contains, containsInternal, getRemoveStmt, getUpdateEmbeddedElementStmt, internalRemove, updateEmbeddedElement, updateEmbeddedElement |
| Methods inherited from class org.datanucleus.store.rdbms.scostore.ElementContainerStore |
|---|
clear, 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 org.datanucleus.store.rdbms.scostore.BaseContainerStore |
|---|
allowsBatching, 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.scostore.CollectionStore |
|---|
clear, contains, hasOrderMapping, size, updateEmbeddedElement |
| Methods inherited from interface org.datanucleus.store.scostore.Store |
|---|
getStoreManager |
| Constructor Detail |
|---|
public RDBMSJoinListStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
CollectionTable collTable,
org.datanucleus.ClassLoaderResolver clr)
mmd - Metadata for the owning field/propertycollTable - The Join tableclr - ClassLoader resolver| Method Detail |
|---|
protected boolean internalAdd(org.datanucleus.store.ObjectProvider sm,
int start,
boolean atEnd,
Collection c,
int size)
internalAdd in class AbstractListStoresm - The state managerstart - The start location (if required)atEnd - Whether to add the element at the endc - The collection of objects to add.size - Current size of list if known. -1 if not known
public Object set(org.datanucleus.store.ObjectProvider op,
int index,
Object element,
boolean allowDependentField)
op - ObjectProvider for the ownerindex - The item indexelement - What to set it to.allowDependentField - Whether to allow dependent field deletes
public void update(org.datanucleus.store.ObjectProvider sm,
Collection coll)
update in interface org.datanucleus.store.scostore.CollectionStoreupdate in class AbstractCollectionStoresm - StateManager of the objectcoll - The collection to use
protected boolean internalRemove(org.datanucleus.store.ObjectProvider ownerSM,
Object element,
int size)
internalRemove in class AbstractListStoreelement - The elementownerSM - StateManager of the ownersize - Current size of list if known. -1 if not known
public boolean removeAll(org.datanucleus.store.ObjectProvider op,
Collection elements,
int size)
removeAll in interface org.datanucleus.store.scostore.CollectionStoreremoveAll in class AbstractListStoreop - ObjectProviderelements - Collection of elements to remove
protected void internalRemoveAt(org.datanucleus.store.ObjectProvider sm,
int index,
int size)
internalRemoveAt in class AbstractListStoresm - The State Manager for the listindex - The index of the elementsize - Current size of list (if known). -1 if not known
protected ListIterator listIterator(org.datanucleus.store.ObjectProvider op,
int startIdx,
int endIdx)
listIterator in class AbstractListStoreop - ObjectProvider for the ownerstartIdx - The start point in the list (only for indexed lists).endIdx - End index in the list (only for indexed lists).
protected SQLStatement getSQLStatementForIterator(org.datanucleus.store.ObjectProvider op,
int startIdx,
int endIdx,
org.datanucleus.store.mapped.StatementClassMapping resultMapping,
StatementParameterMapping paramMapping)
op - ObjectProvider for the owner objectstartIdx - start index to be retrieved (inclusive). Only for indexed listendIdx - end index to be retrieved (exclusive). Only for indexed listresultMapping - Mapping for the candidate result columnsparamMapping - Mapping for the input parameters
protected String getSetStmt()
UPDATE LISTTABLE SET [ELEMENTCOL = ?] [EMBEDDEDFIELD1=?, EMBEDDEDFIELD2=?, ...] WHERE OWNERCOL = ? AND INDEXCOL = ? [AND DISTINGUISHER=?]
protected String getRemoveAllStmt(Collection elements)
DELETE FROM LISTTABLE WHERE (OWNERCOL=? AND ELEMENTCOL=?) OR (OWNERCOL=? AND ELEMENTCOL=?) OR (OWNERCOL=? AND ELEMENTCOL=?)
elements - Collection of elements to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||