3.2.1: 2012-12-13

net.sf.basedb.core
Class DropDynamicTableAction

java.lang.Object
  extended by net.sf.basedb.core.DropDynamicTableAction
All Implemented Interfaces:
TransactionalAction

 class DropDynamicTableAction
extends Object
implements TransactionalAction

Transactional action that can drop a table from the dynamic database after a successful commit and/or rollback.

Since:
3.1
Author:
Nicklas
Last modified
$Date: 2011-11-16 15:39:47 +0100 (Wed, 16 Nov 2011) $

Field Summary
private  boolean atCommit
           
private  boolean atRollback
           
private  String tableName
           
 
Constructor Summary
DropDynamicTableAction(String tableName, boolean atCommit, boolean atRollback)
          Create a new drop table action.
 
Method Summary
 void onAfterCommit()
          Called after a successful commit.
 void onBeforeCommit()
          This method is called before the commit is about to happen.
 void onRollback()
          Called after an unsuccessful commit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableName

private final String tableName

atCommit

private final boolean atCommit

atRollback

private final boolean atRollback
Constructor Detail

DropDynamicTableAction

DropDynamicTableAction(String tableName,
                       boolean atCommit,
                       boolean atRollback)
Create a new drop table action.

Parameters:
tableName - The name of the dynamic table that should be dropped
atCommit - If TRUE, the table should be dropped after a successful commit
atRollback - If TRUE, the table should be dropped after a rollback
Method Detail

onBeforeCommit

public void onBeforeCommit()
Description copied from interface: TransactionalAction
This method is called before the commit is about to happen. If this method throws an exception the transaction will be rolled back.

Specified by:
onBeforeCommit in interface TransactionalAction

onAfterCommit

public void onAfterCommit()
Description copied from interface: TransactionalAction
Called after a successful commit. Implementations should not throw any exceptions from this method. If they do, the message is logged, by no other action is taken.

Specified by:
onAfterCommit in interface TransactionalAction

onRollback

public void onRollback()
Description copied from interface: TransactionalAction
Called after an unsuccessful commit. Implementations should not throw any exceptions from this method. If they do, the message is logged, by no other action is taken.

Specified by:
onRollback in interface TransactionalAction

3.2.1: 2012-12-13