public class DefaultPersistentEObject extends MinimalEStoreEObjectImpl implements PersistentEObject
PersistentEObject
.
This class extends MinimalEStoreEObjectImpl
that delegates EStructuralFeature
accesses
to an underlying EStore
that interacts with the database used to store the model.
DefaultPersistentEObject
s is backend-agnostic, and is as an EMF-level element wrapper in all
existing database implementations.
MinimalEObjectImpl.Container
BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl
BasicNotifierImpl.EAdapterList<E extends Object & Adapter>, BasicNotifierImpl.EObservableAdapterList
InternalEObject.EStore
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
EOPPOSITE_FEATURE_BASE
NIL
Modifier | Constructor and Description |
---|---|
|
DefaultPersistentEObject()
|
protected |
DefaultPersistentEObject(Id id)
Constructs a new
DefaultPersistentEObject with the given id . |
Modifier and Type | Method and Description |
---|---|
Object |
dynamicGet(int dynamicFeatureId)
Returns the value of the feature.
|
void |
dynamicSet(int dynamicFeatureId,
Object value)
Sets the value of the feature to the new value.
|
void |
dynamicUnset(int dynamicFeatureId)
Unsets the value of the feature.
|
protected void |
eBasicSetContainer(InternalEObject eContainer) |
protected void |
eBasicSetContainerFeatureID(int eContainerFeatureId) |
EObject |
eContainer()
Returns the containing object, or
null . |
int |
eContainerFeatureID()
Returns the container feature ID as computed from the container feature
provided by the store. |
EList<EObject> |
eContents()
Returns a list view of the content objects; it is unmodifiable.
|
InternalEObject |
eInternalContainer()
Returns the container as
provided by the store. |
protected boolean |
eIsCaching() |
boolean |
equals(Object o) |
Resource |
eResource()
Returns the containing resource, or
null . |
InternalEObject.EStore |
eStore()
Returns the store associated with this object.
|
int |
hashCode() |
Id |
id()
Returns the identifier of this
PersistentEObject . |
void |
id(Id id)
Defines the identifier of this
PersistentEObject . |
boolean |
isMapped()
Returns whether this
PersistentEObject is mapped to an entity stored in a database. |
Resource.Internal |
resource()
Returns the resource that contains this
PersistentEObject . |
void |
resource(Resource.Internal resource)
Defines the resource that contains this
PersistentEObject . |
void |
setMapped(boolean mapped)
Defines whether this
PersistentEObject is mapped to an entity stored in a database. |
String |
toString() |
createFeatureMap, createList, eBasicContainerFeatureID, eBasicInternalContainer, eDerivedStructuralFeatureID, eDynamicIsSet, eStaticFeatureCount
eAdapters, eBasicAdapterArray, eBasicAdapterListeners, eBasicAdapters, eBasicHasAdapters, eBasicProperties, eBasicSetAdapterArray, eBasicSetAdapterListeners, eBasicSetContainer, eBasicSetSettings, eBasicSettings, eClass, eCrossReferences, eDeliver, eDirectResource, eDynamicClass, eHasSettings, eIsProxy, eProperties, eProxyURI, eSetClass, eSetDeliver, eSetDirectResource, eSetProxyURI, eSettings
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDynamicBasicRemoveFromContainer, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eInvocationDelegate, eInvoke, eInvoke, eIsSet, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eRemoveVirtualValue, eResolveProxy, eSet, eSet, eSetResource, eSetStore, eSetting, eSettingDelegate, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticClass, eStaticOperationCount, eUnset, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
eNotificationRequired, eNotify
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
from
eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eDerivedOperationID, eDerivedStructuralFeatureID, eDirectResource, eGet, eGet, eInternalResource, eInverseAdd, eInverseRemove, eInvoke, eIsSet, eNotificationRequired, eObjectForURIFragmentSegment, eProxyURI, eResolveProxy, eSet, eSetClass, eSetProxyURI, eSetResource, eSetStore, eSetting, eUnset, eURIFragmentSegment
eAllContents, eClass, eContainingFeature, eContainmentFeature, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eSet, eUnset
eAdapters, eDeliver, eNotify, eSetDeliver
@Nonnull public Id id()
PersistentEObject
PersistentEObject
.id
in interface PersistentEObject
public void id(@Nonnull Id id)
PersistentEObject
PersistentEObject
.id
in interface PersistentEObject
id
- the identifierpublic boolean isMapped()
PersistentEObject
PersistentEObject
is mapped to an entity stored in a database.isMapped
in interface PersistentEObject
true
if this PersistentEObject
is mapped to an entity stored in a databasepublic void setMapped(boolean mapped)
PersistentEObject
PersistentEObject
is mapped to an entity stored in a database.setMapped
in interface PersistentEObject
mapped
- true
if this PersistentEObject
is mapped, otherwise false
@Nullable public Resource.Internal resource()
PersistentEObject
PersistentEObject
.resource
in interface PersistentEObject
public void resource(Resource.Internal resource)
PersistentEObject
PersistentEObject
.resource
in interface PersistentEObject
resource
- the containing resourcepublic EObject eContainer()
org.eclipse.emf.ecore.EObject
null
.
An object is contained by another object
if it appears in the contents
of that object.
The object will be contained by a containment feature
of the containing object.
eContainer
in interface EObject
eContainer
in class BasicEObjectImpl
EObject.eResource()
,
EcoreUtil.remove(EObject)
,
EObject.eContainmentFeature()
,
EObject.eContainingFeature()
,
EcoreUtil.getRootContainer(EObject)
,
EObject.eContents()
public Resource eResource()
org.eclipse.emf.ecore.EObject
null
.
An object is contained in a resource
if it, or one of it's containers
,
appears in the contents
of that resource.
An object must be contained by a resource in order to be serialized
.
eResource
in interface EObject
eResource
in class BasicEObjectImpl
EcoreUtil.remove(EObject)
,
EObject.eContainer()
public String toString()
toString
in class BasicEObjectImpl
protected void eBasicSetContainer(InternalEObject eContainer)
eBasicSetContainer
in class MinimalEObjectImpl
protected void eBasicSetContainerFeatureID(int eContainerFeatureId)
eBasicSetContainerFeatureID
in class MinimalEObjectImpl
public EList<EObject> eContents()
org.eclipse.emf.ecore.EObject
This will be the list of EObject
s determined by the
contents
of the containment features
of this object's meta class
.
Objects can, indirectly
, be removed
and will change to reflect container
changes.
The implicit tree
of contents is also directly available.
eContents
in interface EObject
eContents
in class MinimalEObjectImpl
EObject.eContainer()
,
EClass.getEAllContainments()
,
EObject.eGet(EStructuralFeature)
,
EcoreUtil.remove(EObject)
,
EObject.eAllContents()
public InternalEObject.EStore eStore()
org.eclipse.emf.ecore.InternalEObject
eStore
in interface InternalEObject
eStore
in class MinimalEStoreEObjectImpl
protected boolean eIsCaching()
eIsCaching
in class MinimalEStoreEObjectImpl
public Object dynamicGet(int dynamicFeatureId)
org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder
dynamicGet
in interface EStructuralFeature.Internal.DynamicValueHolder
dynamicGet
in class MinimalEStoreEObjectImpl
dynamicFeatureId
- the feature's index in the cached dynamic values.public void dynamicSet(int dynamicFeatureId, Object value)
org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder
dynamicSet
in interface EStructuralFeature.Internal.DynamicValueHolder
dynamicSet
in class MinimalEStoreEObjectImpl
dynamicFeatureId
- the feature's index in the cached dynamic values.value
- the new value for the feature.public void dynamicUnset(int dynamicFeatureId)
org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder
dynamicUnset
in interface EStructuralFeature.Internal.DynamicValueHolder
dynamicUnset
in class MinimalEStoreEObjectImpl
dynamicFeatureId
- the feature's index in the cached dynamic values.public InternalEObject eInternalContainer()
provided
by the store.
Returns the container of this PersistentEObject
.
Do not return the same value as standard EMF implementation if the container has not been accessed with the
public method eContainer()
before.
eInternalContainer
in interface InternalEObject
eInternalContainer
in class MinimalEStoreEObjectImpl
EObject.eContainer()
,
InternalEObject.eDirectResource()
public int eContainerFeatureID()
org.eclipse.emf.ecore.impl.MinimalEStoreEObjectImpl
provided
by the store.eContainerFeatureID
in interface InternalEObject
eContainerFeatureID
in class MinimalEStoreEObjectImpl
EObject.eContainmentFeature()
,
InternalEObject.EOPPOSITE_FEATURE_BASE
Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.