org.datanucleus.store.mapped.scostore
Class AbstractCollectionStore

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
All Implemented Interfaces:
CollectionStore, Store
Direct Known Subclasses:
AbstractListStore, AbstractSetStore

public abstract class AbstractCollectionStore
extends ElementContainerStore
implements CollectionStore

Abstract representation of a store of a Collection. Contains all common parts of storing Sets and Lists.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
ElementContainerStore.ElementInfo
 
Field Summary
 
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
allowNulls, dba, LOCALISER, ownerMapping, ownerMemberMetaData, relationType, storeMgr
 
Constructor Summary
protected AbstractCollectionStore(StoreManager storeMgr, ClassLoaderResolver clr, AbstractCollectionStoreSpecialization abstractCollectionStoreSpecialization)
          Constructor.
 
Method Summary
 boolean contains(ObjectProvider sm, java.lang.Object element)
          Method to verify if the association owner vs elements contains a specific element in the association
 void update(ObjectProvider sm, java.util.Collection coll)
          Method to update the collection to be the supplied collection of elements.
 boolean updateEmbeddedElement(ObjectProvider sm, java.lang.Object element, int fieldNumber, java.lang.Object value)
          Method to update a field of an embedded element.
 
Methods inherited from class org.datanucleus.store.mapped.scostore.ElementContainerStore
clear, getContainerTable, getElementInfo, getElementInformationForClass, getElementMapping, getElementType, getEmd, getOrderMapping, getRelationDiscriminatorMapping, getRelationDiscriminatorValue, hasOrderMapping, isElementsAreEmbedded, isElementsAreSerialised, iterator, 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.CollectionStore
add, addAll, clear, getElementType, hasOrderMapping, iterator, remove, removeAll, size
 
Methods inherited from interface org.datanucleus.store.scostore.Store
getStoreManager
 

Constructor Detail

AbstractCollectionStore

protected AbstractCollectionStore(StoreManager storeMgr,
                                  ClassLoaderResolver clr,
                                  AbstractCollectionStoreSpecialization abstractCollectionStoreSpecialization)
Constructor.

Parameters:
storeMgr - Manager for the store
clr - ClassLoader resolver
Method Detail

updateEmbeddedElement

public boolean updateEmbeddedElement(ObjectProvider sm,
                                     java.lang.Object element,
                                     int fieldNumber,
                                     java.lang.Object value)
Method to update a field of an embedded element.

Specified by:
updateEmbeddedElement in interface CollectionStore
Parameters:
sm - State Manager of the owner
element - The element to update
fieldNumber - The number of the field to update
value - The value
Returns:
true if the datastore was updated

update

public void update(ObjectProvider sm,
                   java.util.Collection coll)
Method to update the collection to be the supplied collection of elements.

Specified by:
update in interface CollectionStore
Parameters:
sm - StateManager of the object
coll - The collection to use

contains

public boolean contains(ObjectProvider sm,
                        java.lang.Object element)
Method to verify if the association owner vs elements contains a specific element in the association

Specified by:
contains in interface CollectionStore
Parameters:
sm - The StateManager
element - The element
Returns:
Whether it contains the element


Copyright © 2011. All Rights Reserved.