org.clazzes.jdbc2xml.sql
Interface SqlCommand

All Known Implementing Classes:
DropColumnCommand, DropTableCommand, SimpleSqlCommand

public interface SqlCommand

This interface defines a SQL command, which may be rolled back.

Author:
wglas

Method Summary
 void cleanupOnCommit(java.sql.Connection connection)
          Cleanup resources kept by this command, if the transaction is committed.
 void perform(java.sql.Connection connection)
          Perform an atomic SQL command.
 void rollback(java.sql.Connection connection)
          Roll back an atomic SQL command.
 

Method Detail

perform

void perform(java.sql.Connection connection)
             throws java.sql.SQLException
Perform an atomic SQL command.

Parameters:
connection - A JDBC connection on which to perform queries.
Throws:
java.sql.SQLException - Upon database errors.

rollback

void rollback(java.sql.Connection connection)
              throws java.sql.SQLException
Roll back an atomic SQL command.

Parameters:
connection - A JDBC connection on which to perform queries.
Throws:
java.sql.SQLException - Upon database errors or when a rollback is not supported.

cleanupOnCommit

void cleanupOnCommit(java.sql.Connection connection)
                     throws java.sql.SQLException
Cleanup resources kept by this command, if the transaction is committed. This might incur deleting temporary backup tables or deleting data files, which back up deleted table data.

Parameters:
connection -
Throws:
java.sql.SQLException


Copyright © 2008. All Rights Reserved.