RSE
Release 3.3

org.eclipse.rse.core.model
Class RSEModelOperation

java.lang.Object
  extended by org.eclipse.rse.core.model.RSEModelOperation

public abstract class RSEModelOperation
extends Object

Provides a transaction boundary for RSE model operations. All operations that modify model objects should be done within an RSEModelOperation. These operations may be nested. Changes made to the model will be persisted when the outermost operation of a particular thread is exited.

The usage idiom is to create an anonymous subclass of this class just prior to use, overriding the execute() method, and then invoke the run() method.

 RSEModelOperation m = new RSEModelOperation() {
     public void execute() {
         ... do work here ...
     }
 };
 m.run();
 

under development - provisional

Since:
RSE 2.0

Constructor Summary
RSEModelOperation()
          Create a new operation scoped to the current thread.
 
Method Summary
static void check()
          Checks the current thread to see if there is a model transaction in progress.
abstract  void execute()
          Perform the work of this operation.
 void run()
          Runs this operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSEModelOperation

public RSEModelOperation()
Create a new operation scoped to the current thread.

Method Detail

check

public static void check()
Checks the current thread to see if there is a model transaction in progress. Should be used inside model objects prior to a change to a persistent property.


execute

public abstract void execute()
Perform the work of this operation. This is where the work of modifying several model properties or objects can be done.


run

public void run()
Runs this operation. This will cause the execute() method to be invoked inside a transaction boundary.


RSE
Release 3.3

Copyright (c) IBM Corporation and others 2000, 2011. All Rights Reserved.