Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.emf.transaction
Interface TransactionChangeDescription

All Superinterfaces:
ChangeDescription, EObject, Notifier
All Known Implementing Classes:
CommandChangeDescription, CompositeChangeDescription

public interface TransactionChangeDescription
extends ChangeDescription

A specialized change description that may not be able to apply itself, especially in the case where it includes non-EMF changes that are not reversible.

When a transaction rolls back, the assumption is that all changes that it performed can be undone, even any non-EMF changes that are captured in its TransactionChangeDescription. This assumption is necessary because the semantics of rollback guarantee that rollback cannot fail: rollback must restore the system to the state it was in before the transaction started. Thus, any change description (possibly nested in a composite) that cannot be applied will be ignored and a best effort made to apply all other changes.

However, the same should not hold for undo/redo of the changes performed by a transaction after it has committed. If the transaction's change description is stored on some kind of "command stack" as an encapsulation of an undoable change, then the possibility that a change description cannot be applied should be respected by disabling undo/redo.


Method Summary
 boolean canApply ()
          Queries whether I can apply my changes.
 boolean isEmpty ()
          Queries whether I have no changes.
 
Methods inherited from interface org.eclipse.emf.ecore.change. ChangeDescription
apply, applyAndReverse, getObjectChanges, getObjectsToAttach, getObjectsToDetach, getResourceChanges
 
Methods inherited from interface org.eclipse.emf.ecore. EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify. Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

canApply

boolean canApply()
Queries whether I can apply my changes. If I can, then it is assumed that I could reverse them also.

Returns:
true if my changes can be applied; false otherwise (i.e., they are not invertible)

isEmpty

boolean isEmpty()
Queries whether I have no changes.

Returns:
true if I have no changes (applying me would have no effect on anything); false, otherwise

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire