org.datanucleus.store.rdbms.scostore
Class RDBMSFKListStore

java.lang.Object
  extended by org.datanucleus.store.mapped.scostore.BaseContainerStore
      extended by org.datanucleus.store.mapped.scostore.ElementContainerStore
          extended by org.datanucleus.store.mapped.scostore.AbstractCollectionStore
              extended by org.datanucleus.store.mapped.scostore.AbstractListStore
                  extended by org.datanucleus.store.mapped.scostore.FKListStore
                      extended by org.datanucleus.store.rdbms.scostore.RDBMSFKListStore
All Implemented Interfaces:
org.datanucleus.store.mapped.expression.CollectionStoreQueryable, org.datanucleus.store.scostore.CollectionStore, org.datanucleus.store.scostore.ListStore, org.datanucleus.store.scostore.Store

public class RDBMSFKListStore
extends org.datanucleus.store.mapped.scostore.FKListStore

RDBMS-specific implementation of an FKListStore.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
org.datanucleus.store.mapped.scostore.ElementContainerStore.ElementInfo
 
Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.scostore.AbstractListStore
indexedList
 
Fields inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
clr, containerTable, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, emd, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, specialization
 
Fields inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore
allowsNull, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr
 
Constructor Summary
RDBMSFKListStore(org.datanucleus.metadata.AbstractMemberMetaData mmd, org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.ClassLoaderResolver clr)
           
 
Method Summary
protected  SQLStatement getSQLStatementForIterator(org.datanucleus.StateManager ownerSM, int startIdx, int endIdx, org.datanucleus.store.mapped.StatementClassMapping resultMapping, org.datanucleus.store.mapped.StatementParameterMapping paramMapping)
          Method to generate an SQLStatement for iterating through elements of the list.
protected  java.util.ListIterator listIterator(org.datanucleus.StateManager ownerSM, int startIdx, int endIdx)
          Accessor for an iterator through the list elements.
 
Methods inherited from class org.datanucleus.store.mapped.scostore.FKListStore
clear, internalAdd, internalRemove, joinElementsTo, manageRemovalOfElement, removeAt, set, update, validateElementForWriting
 
Methods inherited from class org.datanucleus.store.mapped.scostore.AbstractListStore
add, add, addAll, addAll, get, getIndicesOf, indexOf, iterator, lastIndexOf, listIterator, remove, remove, removeAll, subList
 
Methods inherited from class org.datanucleus.store.mapped.scostore.AbstractCollectionStore
contains, getExistsSubquery, getSizeSubquery, updateEmbeddedElement
 
Methods inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
getContainerTable, getElementInfo, getElementInformationForClass, getElementMapping, getElementType, getEmd, getOrderMapping, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, hasOrderMapping, isElementsAreEmbedded, isElementsAreSerialised, size, validateElementForReading, validateElementForWriting, validateElementType
 
Methods inherited from class org.datanucleus.store.mapped.scostore.BaseContainerStore
allowsBatching, getDatastoreAdapter, getOwnerMapping, getOwnerMemberMetaData, getRelationType, getStateManagerForEmbeddedPCObject, 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
contains, getElementType, hasOrderMapping, size, updateEmbeddedElement
 
Methods inherited from interface org.datanucleus.store.scostore.Store
getStoreManager
 

Constructor Detail

RDBMSFKListStore

public RDBMSFKListStore(org.datanucleus.metadata.AbstractMemberMetaData mmd,
                        org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                        org.datanucleus.ClassLoaderResolver clr)
Parameters:
mmd - Metadata for owning field/property
storeMgr - Manager for the datastore
clr - ClassLoader resolver
Method Detail

listIterator

protected java.util.ListIterator listIterator(org.datanucleus.StateManager ownerSM,
                                              int startIdx,
                                              int endIdx)
Accessor for an iterator through the list elements.

Specified by:
listIterator in class org.datanucleus.store.mapped.scostore.AbstractListStore
Parameters:
ownerSM - State Manager for the container.
startIdx - The start index in the list (only for indexed lists)
endIdx - The end index in the list (only for indexed lists)
Returns:
The List Iterator

getSQLStatementForIterator

protected SQLStatement getSQLStatementForIterator(org.datanucleus.StateManager ownerSM,
                                                  int startIdx,
                                                  int endIdx,
                                                  org.datanucleus.store.mapped.StatementClassMapping resultMapping,
                                                  org.datanucleus.store.mapped.StatementParameterMapping paramMapping)
Method to generate an SQLStatement for iterating through elements of the list. Selects the element table. Populates the resultMapping and paramMapping argument objects.

Parameters:
ownerSM - StateManager for the owner object
startIdx - start index to be retrieved (inclusive). Only for indexed list
endIdx - end index to be retrieved (exclusive). Only for indexed list
resultMapping - Mapping for the candidate result columns
paramMapping - Mapping for the input parameters
Returns:
The SQLStatement


Copyright © 2009. All Rights Reserved.