org.datanucleus.store.mapped.scostore
Class AbstractArrayStore
java.lang.Object
org.datanucleus.store.mapped.scostore.BaseContainerStore
org.datanucleus.store.mapped.scostore.ElementContainerStore
org.datanucleus.store.mapped.scostore.AbstractArrayStore
- All Implemented Interfaces:
- ArrayStore, Store
- Direct Known Subclasses:
- FKArrayStore, JoinArrayStore
public abstract class AbstractArrayStore
- extends ElementContainerStore
- implements ArrayStore
Abstract representation of the backing store for an array.
| Fields inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore |
clr, containerTable, elementInfo, elementIsPersistentInterface, elementMapping, elementsAreEmbedded, elementsAreSerialised, elementType, emd, iterateUsingDiscriminator, orderMapping, relationDiscriminatorMapping, relationDiscriminatorValue, specialization |
|
Method Summary |
boolean |
add(ObjectProvider sm,
java.lang.Object element,
int position)
Adds one element to the association owner vs elements |
void |
clear(ObjectProvider ownerSM)
Clear the association from owner to all elements. |
java.util.List |
getArray(ObjectProvider ownerSM)
Accessor for the array from the datastore. |
abstract java.util.Iterator |
iterator(ObjectProvider ownerSM)
Accessor for an iterator through the array elements. |
boolean |
set(ObjectProvider ownerSM,
java.lang.Object array)
Method to set the array for the specified owner to the passed value. |
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractArrayStore
protected AbstractArrayStore(StoreManager storeMgr,
ClassLoaderResolver clr,
AbstractArrayStoreSpecialization specialization)
- Constructor.
- Parameters:
storeMgr - Manager for the storeclr - ClassLoader resolver
getArray
public java.util.List getArray(ObjectProvider ownerSM)
- Accessor for the array from the datastore.
- Specified by:
getArray in interface ArrayStore
- Parameters:
ownerSM - SM for the owner
- Returns:
- The array (as a List of objects)
clear
public void clear(ObjectProvider ownerSM)
- Clear the association from owner to all elements. Observes the necessary dependent field settings
with respect to whether it should delete the element when doing so.
- Specified by:
clear in interface ArrayStore- Overrides:
clear in class ElementContainerStore
- Parameters:
ownerSM - State Manager for the container.
set
public boolean set(ObjectProvider ownerSM,
java.lang.Object array)
- Method to set the array for the specified owner to the passed value.
- Specified by:
set in interface ArrayStore
- Parameters:
ownerSM - State Manager for the ownerarray - the array
- Returns:
- Whether the array was updated successfully
add
public boolean add(ObjectProvider sm,
java.lang.Object element,
int position)
- Adds one element to the association owner vs elements
- Parameters:
sm - State Manager for the containerelement - The element to addposition - The position to add this element at
- Returns:
- Whether it was successful
iterator
public abstract java.util.Iterator iterator(ObjectProvider ownerSM)
- Accessor for an iterator through the array elements.
- Specified by:
iterator in interface ArrayStore- Specified by:
iterator in class ElementContainerStore
- Parameters:
ownerSM - State Manager for the container.
- Returns:
- The Iterator
Copyright © 2011. All Rights Reserved.