|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.mapped.scostore.BaseContainerStore
org.datanucleus.store.mapped.scostore.ElementContainerStore
org.datanucleus.store.mapped.scostore.AbstractCollectionStore
org.datanucleus.store.mapped.scostore.AbstractListStore
public abstract class AbstractListStore
Abstract representation of a backing store for a List.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore |
|---|
ElementContainerStore.ElementInfo |
| Field Summary | |
|---|---|
protected boolean |
indexedList
Whether the list is indexed (like with JDO). |
| 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 | |
|---|---|
protected |
AbstractListStore(StoreManager storeMgr,
ClassLoaderResolver clr,
AbstractListStoreSpecialization specialization)
Constructor. |
| Method Summary | |
|---|---|
boolean |
add(StateManager sm,
java.lang.Object element,
int size)
Method to add an element to the List. |
void |
add(StateManager sm,
java.lang.Object element,
int index,
int size)
Method to add an element to the List. |
boolean |
addAll(StateManager sm,
java.util.Collection elements,
int size)
Method to add a collection of elements to the List. |
boolean |
addAll(StateManager sm,
java.util.Collection elements,
int index,
int size)
Method to add all elements from a Collection to the List. |
java.lang.Object |
get(StateManager sm,
int index)
Method to retrieve an element from the List. |
protected int[] |
getIndicesOf(StateManager sm,
java.util.Collection elements)
Utility to find the indices of a collection of elements. |
int |
indexOf(StateManager sm,
java.lang.Object element)
Accessor for the indexOf an object in the List. |
protected abstract boolean |
internalAdd(StateManager sm,
int startAt,
boolean atEnd,
java.util.Collection elements,
int size)
Internal method for adding an item to the List. |
protected abstract boolean |
internalRemove(StateManager sm,
java.lang.Object element,
int size)
Convenience method to remove the specified element from the List. |
java.util.Iterator |
iterator(StateManager sm)
Accessor for an iterator through the list elements. |
int |
lastIndexOf(StateManager sm,
java.lang.Object element)
Method to retrieve the last index of an object in the list. |
java.util.ListIterator |
listIterator(StateManager sm)
Accessor for an iterator through the list elements. |
protected abstract java.util.ListIterator |
listIterator(StateManager ownerSM,
int startIdx,
int endIdx)
Accessor for an iterator through the list elements. |
java.lang.Object |
remove(StateManager sm,
int index,
int size)
Method to remove an object at an index in the List. |
boolean |
remove(StateManager sm,
java.lang.Object element,
int size,
boolean allowDependentField)
Method to remove the specified element from the List. |
boolean |
removeAll(StateManager sm,
java.util.Collection elements,
int size)
Remove all elements from a collection from the association owner vs elements. |
protected abstract void |
removeAt(StateManager sm,
int index,
int size)
Internal method to remove an object at a location from the List. |
java.util.List |
subList(StateManager sm,
int startIdx,
int endIdx)
Method to retrieve a list of elements in a range. |
| Methods inherited from class org.datanucleus.store.mapped.scostore.AbstractCollectionStore |
|---|
contains, getExistsSubquery, getSizeSubquery, update, updateEmbeddedElement |
| Methods inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore |
|---|
clear, 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, 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.ListStore |
|---|
set |
| Methods inherited from interface org.datanucleus.store.scostore.CollectionStore |
|---|
clear, contains, getElementType, hasOrderMapping, size, update, updateEmbeddedElement |
| Methods inherited from interface org.datanucleus.store.scostore.Store |
|---|
getStoreManager |
| Methods inherited from interface org.datanucleus.store.mapped.expression.CollectionStoreQueryable |
|---|
joinElementsTo |
| Field Detail |
|---|
protected boolean indexedList
| Constructor Detail |
|---|
protected AbstractListStore(StoreManager storeMgr,
ClassLoaderResolver clr,
AbstractListStoreSpecialization specialization)
storeMgr - Manager for the storeclr - ClassLoader resolverspecialization - the datastore-specific specialization| Method Detail |
|---|
public java.util.Iterator iterator(StateManager sm)
iterator in interface CollectionStoreiterator in class ElementContainerStoresm - State Manager for the container.
public java.util.ListIterator listIterator(StateManager sm)
listIterator in interface ListStoresm - State Manager for the container.
protected abstract java.util.ListIterator listIterator(StateManager ownerSM,
int startIdx,
int endIdx)
ownerSM - State Manager for the container.startIdx - The start point in the list (only for indexed lists).endIdx - The end point in the list (only for indexed lists).
public boolean add(StateManager sm,
java.lang.Object element,
int size)
add in interface CollectionStoresm - The state managerelement - The element to removesize - Size of the current list (if known, -1 if not)
public void add(StateManager sm,
java.lang.Object element,
int index,
int size)
add in interface ListStoreelement - The element to add.index - The location to add atsm - The state manager.size - Current size of list (if known). -1 if not known
public boolean addAll(StateManager sm,
java.util.Collection elements,
int size)
addAll in interface CollectionStoresm - The state managerelements - The elements to removesize - Current size of the list (if known). -1 if not known
public boolean addAll(StateManager sm,
java.util.Collection elements,
int index,
int size)
addAll in interface ListStoresm - The state managerelements - The collectionindex - The location to add atsize - Current size of the list (if known). -1 if not known
protected abstract boolean internalAdd(StateManager sm,
int startAt,
boolean atEnd,
java.util.Collection elements,
int size)
sm - The state managerstartAt - The start positionatEnd - Whether to add at the endelements - The Collection of elements to add.size - Current size of List (if known). -1 if not known
public java.lang.Object get(StateManager sm,
int index)
get in interface ListStoresm - The state managerindex - The index of the element required.
public int indexOf(StateManager sm,
java.lang.Object element)
indexOf in interface ListStoresm - The state managerelement - The element.
public int lastIndexOf(StateManager sm,
java.lang.Object element)
lastIndexOf in interface ListStoresm - The state manager.element - The object
public boolean removeAll(StateManager sm,
java.util.Collection elements,
int size)
removeAll in interface CollectionStoresm - State Manager for the containerelements - Collection of elements to removesize - Current size of collection if known. -1 if not known
public boolean remove(StateManager sm,
java.lang.Object element,
int size,
boolean allowDependentField)
remove in interface CollectionStoresm - The state managerelement - The element to remove.size - Current size of list if known. -1 if not knownallowDependentField - Whether to allow any cascade deletes caused by this removal
protected abstract boolean internalRemove(StateManager sm,
java.lang.Object element,
int size)
sm - StateManager of the ownerelement - The elementsize - Current size of list if known. -1 if not known
public java.lang.Object remove(StateManager sm,
int index,
int size)
remove in interface ListStoreindex - The locationsm - The state managersize - Current size of the list (if known). -1 if not known
protected abstract void removeAt(StateManager sm,
int index,
int size)
sm - The state managerindex - The index of the element to removesize - Current list size (if known). -1 if not known
public java.util.List subList(StateManager sm,
int startIdx,
int endIdx)
subList in interface ListStoresm - The state manager.startIdx - From index (inclusive).endIdx - To index (exclusive)
protected int[] getIndicesOf(StateManager sm,
java.util.Collection elements)
sm - The state manager.elements - The elements
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||