001package io.ebean;
002
003/**
004 * Adapter that can be extended for easier implementation of TransactionCallback.
005 * <p/>
006 * Provides 'no operation' implementation for each of the TransactionCallback methods. It is expected that this
007 * class is extended and override the methods you need to.
008 */
009public abstract class TransactionCallbackAdapter implements TransactionCallback {
010
011  /**
012   * Perform processing just prior to the transaction commit.
013   */
014  @Override
015  public void preCommit() {
016    // do nothing - override as necessary
017  }
018
019  /**
020   * Perform processing just after the transaction commit.
021   */
022  @Override
023  public void postCommit() {
024    // do nothing - override as necessary
025  }
026
027  /**
028   * Perform processing just prior to the transaction rollback.
029   */
030  @Override
031  public void preRollback() {
032    // do nothing - override as necessary
033  }
034
035  /**
036   * Perform processing just after the transaction rollback.
037   */
038  @Override
039  public void postRollback() {
040    // do nothing - override as necessary
041  }
042}