    1   package groovy.txn;
    2
    3   import groovy.lang.Closure;
    4
    5   /***
    6    * @author James Strachan
    7    * @version $Revision: 1.2 $
    8    */
    9   public class TransactionBean {
    10      private Closure run;
    11      private Closure onError;
    12      private Closure onSuccess;
    13
    14      public Closure run() {
    15          return run;
    16      }
    17
    18      public Closure onError() {
    19          return onError;
    20      }
    21
    22      public Closure onSuccess() {
    23          return onSuccess;
    24      }
    25
    26      public void run(Closure run) {
    27          this.run = run;
    28      }
    29
    30      public void onError(Closure onError) {
    31          this.onError = onError;
    32      }
    33
    34      public void onSuccess(Closure onSuccess) {
    35          this.onSuccess = onSuccess;
    36      }
    37  }