org.apache.tuscany.sdo.impl
Class ChangeSummaryImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl
                  extended by org.apache.tuscany.sdo.impl.ChangeSummaryImpl
All Implemented Interfaces:
ChangeSummary, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.change.ChangeDescription, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject

public class ChangeSummaryImpl
extends org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl
implements ChangeSummary

An implementation of the model object 'EChange Summary'.

The following features are implemented:


Nested Class Summary
protected  class ChangeSummaryImpl.SDOChangeRecorder
           
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl
org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.OldContainmentInformation
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface commonj.sdo.ChangeSummary
ChangeSummary.Setting
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
protected  List cachedCreatedObjects
           
protected  Set cachedDeletedObjects
           
protected  Map cachedSDOObjectChanges
           
protected  ChangeSummaryImpl.SDOChangeRecorder changeRecorder
           
protected  DataObject dataObject
           
protected  DataGraph eDataGraph
          The cached value of the 'EData Graph' reference.
protected  boolean isStale
           
 
Fields inherited from class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl
objectChanges, objectsToAttach, objectsToDetach, oldContainmentInformation, resourceChanges
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected ChangeSummaryImpl()
           
 
Method Summary
 org.eclipse.emf.common.notify.NotificationChain basicSetEDataGraph(DataGraph newEDataGraph, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 void beginLogging()
           
 Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, Class baseClass, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, Class baseClass, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void endLogging()
           
 void eSet(int featureID, Object newValue)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
protected  List getCachedCreatedObjects()
           
protected  Set getCachedDeletedObjects()
           
 List getChangedDataObjects()
           
 DataGraph getDataGraph()
           
 DataObject getDataObject()
           
 DataGraph getEDataGraph()
           
 DataObject getOldContainer(DataObject dataObject)
          Returns the value of the container data object at the point when logging began.
protected  Map getOldContainmentInformation()
           
 Property getOldContainmentProperty(DataObject dataObject)
          Returns the value of the containment property data object property at the point when logging began.
 DataObject getOldDataObject(DataObject dataObject)
           
 Sequence getOldSequence(DataObject dataObject)
           
 ChangeSummary.Setting getOldValue(DataObject dataObject, Property property)
          Returns a setting for the specified property representing the property value of the given dataObject at the point when logging began.
 List getOldValues(DataObject dataObject)
           
 DataObject getRootObject()
           
protected static boolean isContainmentReference(Object feature)
           
 boolean isCreated(DataObject dataObject)
           
 boolean isDeleted(DataObject dataObject)
           
 boolean isLogging()
           
 boolean isModified(DataObject dataObject)
           
protected  boolean isStale()
           
 void resumeLogging()
           
 void setDataObject(DataObject newDataObject)
           
 void setEDataGraph(DataGraph newEDataGraph)
           
 void summarize()
           
protected  void uncache()
           
 void undoChanges()
           
 
Methods inherited from class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl
apply, applyAndReverse, eInverseRemove, getContainedEObjects, getObjectChanges, getObjectsToAttach, getObjectsToDetach, getObjectsToDetachGen, getOldContainer, getOldContainmentFeature, getResourceChanges, preApply
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues, toString
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

eDataGraph

protected DataGraph eDataGraph
The cached value of the 'EData Graph' reference.

See Also:
getEDataGraph()

dataObject

protected DataObject dataObject

changeRecorder

protected ChangeSummaryImpl.SDOChangeRecorder changeRecorder

cachedDeletedObjects

protected Set cachedDeletedObjects

cachedCreatedObjects

protected List cachedCreatedObjects

cachedSDOObjectChanges

protected Map cachedSDOObjectChanges

isStale

protected boolean isStale
Constructor Detail

ChangeSummaryImpl

protected ChangeSummaryImpl()

Method Detail

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl

isLogging

public boolean isLogging()

Specified by:
isLogging in interface ChangeSummary
Returns:
true if change logging is on.
See Also:
ChangeSummary.beginLogging(), ChangeSummary.endLogging()

getEDataGraph

public DataGraph getEDataGraph()


basicSetEDataGraph

public org.eclipse.emf.common.notify.NotificationChain basicSetEDataGraph(DataGraph newEDataGraph,
                                                                          org.eclipse.emf.common.notify.NotificationChain msgs)


setEDataGraph

public void setEDataGraph(DataGraph newEDataGraph)


getDataObject

public DataObject getDataObject()

setDataObject

public void setDataObject(DataObject newDataObject)

beginLogging

public void beginLogging()

Specified by:
beginLogging in interface ChangeSummary
See Also:
ChangeSummary.endLogging(), ChangeSummary.isLogging()

resumeLogging

public void resumeLogging()


eInverseAdd

public org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                   int featureID,
                                                                   Class baseClass,
                                                                   org.eclipse.emf.common.notify.NotificationChain msgs)

Specified by:
eInverseAdd in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eInverseAdd in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      Class baseClass,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Specified by:
eInverseRemove in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eInverseRemove in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eGet

public Object eGet(int featureID,
                   boolean resolve,
                   boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl

eSet

public void eSet(int featureID,
                 Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl

uncache

protected void uncache()

endLogging

public void endLogging()

Specified by:
endLogging in interface ChangeSummary
See Also:
ChangeSummary.beginLogging(), ChangeSummary.isLogging()

isCreated

public boolean isCreated(DataObject dataObject)

Specified by:
isCreated in interface ChangeSummary
Parameters:
dataObject - the data object in question.
Returns:
true if the specified data object was created.
See Also:
ChangeSummary.getChangedDataObjects()

isDeleted

public boolean isDeleted(DataObject dataObject)

Specified by:
isDeleted in interface ChangeSummary
Parameters:
dataObject - the data object in question.
Returns:
true if the specified data object was deleted.
See Also:
ChangeSummary.getChangedDataObjects()

getCachedDeletedObjects

protected Set getCachedDeletedObjects()

getCachedCreatedObjects

protected List getCachedCreatedObjects()

getChangedDataObjects

public List getChangedDataObjects()

Specified by:
getChangedDataObjects in interface ChangeSummary
Returns:
a list of changed data objects.
See Also:
ChangeSummary.isCreated(DataObject), ChangeSummary.isDeleted(DataObject), ChangeSummary.isModified(DataObject)

getOldValues

public List getOldValues(DataObject dataObject)

Specified by:
getOldValues in interface ChangeSummary
Parameters:
dataObject - the object in question.
Returns:
a list of settings.
See Also:
ChangeSummary.getChangedDataObjects()

isModified

public boolean isModified(DataObject dataObject)

Specified by:
isModified in interface ChangeSummary
Parameters:
dataObject - the data object in question.
Returns:
true if the specified data object was modified.
See Also:
ChangeSummary.getChangedDataObjects()

summarize

public void summarize()


getOldValue

public ChangeSummary.Setting getOldValue(DataObject dataObject,
                                         Property property)
Description copied from interface: ChangeSummary
Returns a setting for the specified property representing the property value of the given dataObject at the point when logging began.

Returns null if the property was not modified and has not been deleted.

Specified by:
getOldValue in interface ChangeSummary
Parameters:
dataObject - the object in question.
property - the property of the object.
Returns:
the Setting for the specified property.
See Also:
ChangeSummary.getChangedDataObjects()

getOldContainer

public DataObject getOldContainer(DataObject dataObject)
Description copied from interface: ChangeSummary
Returns the value of the container data object at the point when logging began.

Specified by:
getOldContainer in interface ChangeSummary
Parameters:
dataObject - the object in question.
Returns:
the old container data object.

getOldContainmentProperty

public Property getOldContainmentProperty(DataObject dataObject)
Description copied from interface: ChangeSummary
Returns the value of the containment property data object property at the point when logging began.

Specified by:
getOldContainmentProperty in interface ChangeSummary
Parameters:
dataObject - the object in question.
Returns:
the old containment property.

getOldSequence

public Sequence getOldSequence(DataObject dataObject)

Specified by:
getOldSequence in interface ChangeSummary
Parameters:
dataObject - the object in question.
Returns:
the old containment property.

undoChanges

public void undoChanges()

Specified by:
undoChanges in interface ChangeSummary
See Also:
ChangeSummary.beginLogging(), ChangeSummary.endLogging(), ChangeSummary.isLogging()

getDataGraph

public DataGraph getDataGraph()

Specified by:
getDataGraph in interface ChangeSummary
Returns:
the data graph.
See Also:
DataGraph.getChangeSummary()

getOldContainmentInformation

protected Map getOldContainmentInformation()
Overrides:
getOldContainmentInformation in class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl

isStale

protected boolean isStale()

getRootObject

public DataObject getRootObject()

Specified by:
getRootObject in interface ChangeSummary
Returns:
the ChangeSummary root DataObject

isContainmentReference

protected static boolean isContainmentReference(Object feature)

getOldDataObject

public DataObject getOldDataObject(DataObject dataObject)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.