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.ui.provider
Class TransactionalPropertySource


java.lang.Object
  extended by 
org.eclipse.emf.transaction.ui.provider.TransactionalPropertySource
All Implemented Interfaces:
IPropertySource, IPropertySource2

public class TransactionalPropertySource
extends Object
implements IPropertySource2

A property source wrapper that calls its delegate in transactions of the appropriate kind. Note that transactions are not actually required for methods that do not access model objects.


Constructor Summary
TransactionalPropertySource ( TransactionalEditingDomain domain, IPropertySource propertySource)
          Initializes me with the editing domain in which I create transactions, and the property source that I delegate to.
 
Method Summary
  Object getEditableValue ()
          Delegates the my wrapped property source in the appropriate transaction.
  IPropertyDescriptor[] getPropertyDescriptors ()
          Delegates the my wrapped property source in the appropriate transaction.
  Object getPropertyValue ( Object id)
          Delegates the my wrapped property source in the appropriate transaction.
 boolean isPropertyResettable ( Object id)
          Delegates the my wrapped property source in the appropriate transaction.
 boolean isPropertySet ( Object id)
          Delegates the my wrapped property source in the appropriate transaction.
 void resetPropertyValue ( Object id)
          Delegates the my wrapped property source in the appropriate transaction.
protected
<T> T
run ( RunnableWithResult<? extends T> run)
          Runs the specified runnable in the editing domain, with interrupt handling.
 void setPropertyValue ( Object id, Object value)
          Delegates directly to the wrapper property source, because it will use a command to perform the modification (which implicitly creates a read/write transaction).
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionalPropertySource

public TransactionalPropertySource(
TransactionalEditingDomain domain,
                                   
IPropertySource propertySource)
Initializes me with the editing domain in which I create transactions, and the property source that I delegate to.

Parameters:
domain - my editing domain
propertySource - my delegate
Method Detail

run

protected <T> T run(
RunnableWithResult<? extends T> run)
Runs the specified runnable in the editing domain, with interrupt handling.

Type Parameters:
T - the result type of the runnable
Parameters:
run - the runnable to run
Returns:
its result, or null on interrupt

isPropertyResettable

public boolean isPropertyResettable(
Object id)
Delegates the my wrapped property source in the appropriate transaction.

Specified by:
isPropertyResettable in interface IPropertySource2

isPropertySet

public boolean isPropertySet(
Object id)
Delegates the my wrapped property source in the appropriate transaction.

Specified by:
isPropertySet in interface IPropertySource
Specified by:
isPropertySet in interface IPropertySource2

getEditableValue

public 
Object getEditableValue()
Delegates the my wrapped property source in the appropriate transaction.

Specified by:
getEditableValue in interface IPropertySource

getPropertyDescriptors

public 
IPropertyDescriptor[] getPropertyDescriptors()
Delegates the my wrapped property source in the appropriate transaction.

Specified by:
getPropertyDescriptors in interface IPropertySource

getPropertyValue

public 
Object getPropertyValue(
Object id)
Delegates the my wrapped property source in the appropriate transaction.

Specified by:
getPropertyValue in interface IPropertySource

resetPropertyValue

public void resetPropertyValue(
Object id)
Delegates the my wrapped property source in the appropriate transaction.

Specified by:
resetPropertyValue in interface IPropertySource

setPropertyValue

public void setPropertyValue(
Object id,
                             
Object value)
Delegates directly to the wrapper property source, because it will use a command to perform the modification (which implicitly creates a read/write transaction).

Specified by:
setPropertyValue in interface IPropertySource

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