## org.eclipse.emf.transaction
Class RunnableWithResult.Impl<T>

    java.lang.Object
      org.eclipse.emf.transaction.RunnableWithResult.Impl<T>

All Implemented Interfaces:
  Runnable, RunnableWithResult<T>

Direct Known Subclasses:
  PrivilegedRunnable

Enclosing interface:
  RunnableWithResult<T>

    public abstract static class RunnableWithResult.Impl<T>

extends Object
implements RunnableWithResult<T>

A convenient partial implementation of the `RunnableWithResult` interface that implements a settable `result` field and commit status.

Nested Class Summary

Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.RunnableWithResult
`RunnableWithResult.Impl<T>`

Constructor Summary
`RunnableWithResult.Impl()`

Method Summary
`T` `getResult()` Returns a result computed by my `Runnable.run()` method.
`IStatus` `getStatus()` Queries my commit status.
`protected void` `setResult(T result)` Sets my result.
`void` `setStatus(IStatus status)` Sets the commit status after completion of the `Runnable.run()` method.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.lang.Runnable
`run`

Constructor Detail

### RunnableWithResult.Impl

    public RunnableWithResult.Impl()

Method Detail

### setResult

    protected final void setResult(T result)

  Sets my result.

  Parameters:
    `result` - my result

### getStatus

    public final IStatus getStatus()

  Description copied from interface: `RunnableWithResult`
  Queries my commit status. My status is only available after I have finished running and after the editing domain has attempted to commit my transaction.

  Specified by:
    `getStatus` in interface `RunnableWithResult<T>`
  Returns:
    the status of my commit (as set by the `RunnableWithResult.setStatus(IStatus)` method)

### getResult

    public final T getResult()

  Description copied from interface: `RunnableWithResult`
  Returns a result computed by my `Runnable.run()` method.

  Specified by:
    `getResult` in interface `RunnableWithResult<T>`
  Returns:
    my result, or `null` if none

### setStatus

    public final void setStatus(IStatus status)

  Description copied from interface: `RunnableWithResult`
  Sets the commit status after completion of the `Runnable.run()` method.

  Specified by:
    `setStatus` in interface `RunnableWithResult<T>`
  Parameters:
    `status` - an OK status if commit succeeds, or an error status if it fails (in which case the transaction rolled back and the status provides details in human-readable form)

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