@Immutable @ParametersAreNonnullByDefault public abstract class AbstractStoreAdapter extends Object implements StoreAdapter
StoreAdapter.| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractStoreAdapter(Store store,
                    org.eclipse.emf.ecore.resource.Resource.Internal resource)Constructs a new  AbstractStoreAdapteron the givenstore. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(org.eclipse.emf.ecore.InternalEObject internalObject,
   org.eclipse.emf.ecore.EStructuralFeature feature,
   int index,
   Object value) | 
| int | addAll(org.eclipse.emf.ecore.InternalEObject internalObject,
      org.eclipse.emf.ecore.EStructuralFeature feature,
      int index,
      Collection<?> values)Adds the  valuesfrom theindexin thecontentof the object's feature. | 
| void | clear(org.eclipse.emf.ecore.InternalEObject internalObject,
     org.eclipse.emf.ecore.EStructuralFeature feature) | 
| void | close()
 
 Cleanly closes this manager, clear all data in-memory and releases any system resources associated with it. | 
| boolean | contains(org.eclipse.emf.ecore.InternalEObject internalObject,
        org.eclipse.emf.ecore.EStructuralFeature feature,
        Object value) | 
| void | copyTo(StoreAdapter target) | 
| protected static Cache<Id,PersistentEObject> | createCache()Creates a new in-memory cache to store  Ids and their associatedPersistentEObject. | 
| Object | get(org.eclipse.emf.ecore.InternalEObject internalObject,
   org.eclipse.emf.ecore.EStructuralFeature feature,
   int index) | 
| List<Object> | getAll(org.eclipse.emf.ecore.InternalEObject internalObject,
      org.eclipse.emf.ecore.EStructuralFeature feature)Returns all values in the  contentof the
 object's feature. | 
| protected abstract Cache<Id,PersistentEObject> | getCache()Returns the in-memory cache holding recently loaded  PersistentEObjects. | 
| PersistentEObject | getContainer(org.eclipse.emf.ecore.InternalEObject internalObject) | 
| org.eclipse.emf.ecore.EReference | getContainingFeature(org.eclipse.emf.ecore.InternalEObject internalObject) | 
| int | hashCode(org.eclipse.emf.ecore.InternalEObject internalObject,
        org.eclipse.emf.ecore.EStructuralFeature feature) | 
| int | indexOf(org.eclipse.emf.ecore.InternalEObject internalObject,
       org.eclipse.emf.ecore.EStructuralFeature feature,
       Object value) | 
| boolean | isEmpty(org.eclipse.emf.ecore.InternalEObject internalObject,
       org.eclipse.emf.ecore.EStructuralFeature feature) | 
| boolean | isSet(org.eclipse.emf.ecore.InternalEObject internalObject,
     org.eclipse.emf.ecore.EStructuralFeature feature) | 
| int | lastIndexOf(org.eclipse.emf.ecore.InternalEObject internalObject,
           org.eclipse.emf.ecore.EStructuralFeature feature,
           Object value) | 
| Object | move(org.eclipse.emf.ecore.InternalEObject internalObject,
    org.eclipse.emf.ecore.EStructuralFeature feature,
    int targetIndex,
    int sourceIndex) | 
| Object | remove(org.eclipse.emf.ecore.InternalEObject internalObject,
      org.eclipse.emf.ecore.EStructuralFeature feature,
      int index) | 
| void | removeContainment(PersistentEObject object)Removes the containment link between  objectand its container, and deletes any previous link toobject. | 
| PersistentEObject | resolve(Id id)Retrieves the object associated to the given  id. | 
| org.eclipse.emf.ecore.EClass | resolveInstanceOf(Id id)Compute the  EClassassociated to the model element with the providedId. | 
| org.eclipse.emf.ecore.resource.Resource.Internal | resource()Returns the resource to store and access. | 
| void | resource(org.eclipse.emf.ecore.resource.Resource.Internal resource)Defines the resource to store and access. | 
| void | save()Saves all changes made on this manager since the last call. | 
| Object | set(org.eclipse.emf.ecore.InternalEObject internalObject,
   org.eclipse.emf.ecore.EStructuralFeature feature,
   int index,
   Object value) | 
| void | setAll(org.eclipse.emf.ecore.InternalEObject internalObject,
      org.eclipse.emf.ecore.EStructuralFeature feature,
      Collection<?> values)Sets the  valuesin thecontentof
 the object's feature. | 
| int | size(org.eclipse.emf.ecore.InternalEObject internalObject,
    org.eclipse.emf.ecore.EStructuralFeature feature) | 
| Store | store()Returns the adapted store chain. | 
| Object[] | toArray(org.eclipse.emf.ecore.InternalEObject internalObject,
       org.eclipse.emf.ecore.EStructuralFeature feature) | 
| <T> T[] | toArray(org.eclipse.emf.ecore.InternalEObject internalObject,
       org.eclipse.emf.ecore.EStructuralFeature feature,
       T[] array) | 
| void | unset(org.eclipse.emf.ecore.InternalEObject internalObject,
     org.eclipse.emf.ecore.EStructuralFeature feature) | 
| void | updateContainment(PersistentEObject object,
                 org.eclipse.emf.ecore.EReference containerReference,
                 PersistentEObject container)Creates or updates the containment link between  objectandcontainer, and deletes any previous
 link toobject. | 
| void | updateInstanceOf(PersistentEObject object)Creates the instance of the  objectin aClassBeanobject and persists it in the database. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, removeAll@Nonnull protected static Cache<Id,PersistentEObject> createCache()
Ids and their associated PersistentEObject.getCache()@Nonnull protected abstract Cache<Id,PersistentEObject> getCache()
PersistentEObjects.public void close()
SaveableCleanly closes this manager, clear all data in-memory and releases any system resources associated with it. All modifications are saved before closing.
If the manager is already closed, then invoking this method has no effect.
public void save()
Saveable@Nonnull public Store store()
StoreAdapterstore in interface StoreAdapter@Nullable public org.eclipse.emf.ecore.resource.Resource.Internal resource()
StoreAdapterresource in interface StoreAdapterpublic void resource(@Nullable org.eclipse.emf.ecore.resource.Resource.Internal resource)
StoreAdapterresource in interface StoreAdapterresource - the resource@Nonnull public final PersistentEObject resolve(Id id)
StoreAdapterid.resolve in interface StoreAdapterid - the identifier to be resolved@Nullable public final Object get(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature, @Nonnegative int index)
get in interface StoreAdapterget in interface org.eclipse.emf.ecore.InternalEObject.EStore@Nullable public final Object set(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature, @Nonnegative int index, @Nullable Object value)
set in interface StoreAdapterset in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final boolean isSet(org.eclipse.emf.ecore.InternalEObject internalObject,
                           org.eclipse.emf.ecore.EStructuralFeature feature)
isSet in interface StoreAdapterisSet in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final void unset(org.eclipse.emf.ecore.InternalEObject internalObject,
                        org.eclipse.emf.ecore.EStructuralFeature feature)
unset in interface StoreAdapterunset in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final boolean isEmpty(org.eclipse.emf.ecore.InternalEObject internalObject,
                             org.eclipse.emf.ecore.EStructuralFeature feature)
isEmpty in interface StoreAdapterisEmpty in interface org.eclipse.emf.ecore.InternalEObject.EStore@Nonnegative public final int size(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature)
size in interface StoreAdaptersize in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final boolean contains(org.eclipse.emf.ecore.InternalEObject internalObject,
                              org.eclipse.emf.ecore.EStructuralFeature feature,
                              @Nullable
                              Object value)
contains in interface StoreAdaptercontains in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final int indexOf(org.eclipse.emf.ecore.InternalEObject internalObject,
                         org.eclipse.emf.ecore.EStructuralFeature feature,
                         @Nullable
                         Object value)
indexOf in interface StoreAdapterindexOf in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final int lastIndexOf(org.eclipse.emf.ecore.InternalEObject internalObject,
                             org.eclipse.emf.ecore.EStructuralFeature feature,
                             @Nullable
                             Object value)
lastIndexOf in interface StoreAdapterlastIndexOf in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final void add(org.eclipse.emf.ecore.InternalEObject internalObject,
                      org.eclipse.emf.ecore.EStructuralFeature feature,
                      int index,
                      Object value)
add in interface StoreAdapteradd in interface org.eclipse.emf.ecore.InternalEObject.EStore@Nullable public final Object remove(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature, @Nonnegative int index)
remove in interface StoreAdapterremove in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final Object move(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature, @Nonnegative int targetIndex, @Nonnegative int sourceIndex)
move in interface StoreAdaptermove in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final void clear(org.eclipse.emf.ecore.InternalEObject internalObject,
                        org.eclipse.emf.ecore.EStructuralFeature feature)
clear in interface StoreAdapterclear in interface org.eclipse.emf.ecore.InternalEObject.EStore@Nonnull public final Object[] toArray(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature)
toArray in interface StoreAdaptertoArray in interface org.eclipse.emf.ecore.InternalEObject.EStore@Nonnull public final <T> T[] toArray(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature, @Nullable T[] array)
toArray in interface StoreAdaptertoArray in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final int hashCode(org.eclipse.emf.ecore.InternalEObject internalObject,
                          org.eclipse.emf.ecore.EStructuralFeature feature)
hashCode in interface StoreAdapterhashCode in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final PersistentEObject getContainer(org.eclipse.emf.ecore.InternalEObject internalObject)
getContainer in interface StoreAdaptergetContainer in interface org.eclipse.emf.ecore.InternalEObject.EStorepublic final org.eclipse.emf.ecore.EReference getContainingFeature(org.eclipse.emf.ecore.InternalEObject internalObject)
getContainingFeature in interface StoreAdaptergetContainingFeature in interface org.eclipse.emf.ecore.InternalEObject.EStore@Nonnull public List<Object> getAll(org.eclipse.emf.ecore.InternalEObject internalObject, org.eclipse.emf.ecore.EStructuralFeature feature)
StoreAdaptercontent of the
 object's feature.getAll in interface StoreAdapterinternalObject - the object in questionfeature - a feature of the objectpublic void setAll(org.eclipse.emf.ecore.InternalEObject internalObject,
                   org.eclipse.emf.ecore.EStructuralFeature feature,
                   Collection<?> values)
StoreAdaptervalues in the content of
 the object's feature.
 
 If the object's feature already have values, then they will be replaced by values.
setAll in interface StoreAdapterinternalObject - the object in questionfeature - a feature of the objectvalues - the new valuespublic int addAll(org.eclipse.emf.ecore.InternalEObject internalObject,
                  org.eclipse.emf.ecore.EStructuralFeature feature,
                  int index,
                  Collection<?> values)
StoreAdaptervalues from the index in the content of the object's feature.addAll in interface StoreAdapterinternalObject - the object in questionfeature - a many-valued feature of the objectindex - the first index from which to start the addition within the content. If negative, then the
                       addition will begin from the end of the existing contentvalues - the value to addpublic void updateContainment(PersistentEObject object, org.eclipse.emf.ecore.EReference containerReference, PersistentEObject container)
StoreAdapterobject and container, and deletes any previous
 link to object. The object is added to the containment list of the container.
 The method checks if an existing container is stored and update it if needed.
updateContainment in interface StoreAdapterobject - the object to add in the containment list of the containercontainerReference - the containment reference, from the container to the objectcontainer - the containerpublic void removeContainment(PersistentEObject object)
StoreAdapterobject and its container, and deletes any previous link to object.removeContainment in interface StoreAdapterobject - the object to remove from the containment list of its actual container@Nonnull public org.eclipse.emf.ecore.EClass resolveInstanceOf(Id id)
StoreAdapterEClass associated to the model element with the provided Id.resolveInstanceOf in interface StoreAdapterid - the Id of the model element to compute the EClass fromEClass representing the meta-class of the elementpublic void updateInstanceOf(PersistentEObject object)
StoreAdapterobject in a ClassBean object and persists it in the database.
 
 Note: The type is not updated if object was previously mapped to another type.
updateInstanceOf in interface StoreAdapterobject - the object to store the instance-of information frompublic void copyTo(StoreAdapter target)
copyTo in interface Copiable<StoreAdapter>Copyright © 2013–2019 Atlanmod. All rights reserved.