|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.jdbc2xml.schema.impl.DropTableCommand
public class DropTableCommand
This class implements a rollback-enabled variant of a drop table statement.
Constructor Summary | |
---|---|
DropTableCommand(TableInfo ti)
Construct a drop table command for RDMS engines, which support renaming of tables. |
|
DropTableCommand(TableInfo ti,
Dialect dialect,
java.lang.String suffix)
Construct a drop table command for RDMS engines, which do not support renaming of tables. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DropTableCommand(TableInfo ti, Dialect dialect, java.lang.String suffix) throws java.sql.SQLException
ti
- The description of the table to be dropped.dialect
- The dialect used to build column specs.suffix
- The RDMBS-specific create table suffix.
java.sql.SQLException
- Upon unsupported foreign key options.DDLHelper.buildCreateTable(TableInfo, Dialect, String)
public DropTableCommand(TableInfo ti)
ti
- The description of the table to be dropped.Method Detail |
---|
public void cleanupOnCommit(java.sql.Connection connection) throws java.sql.SQLException
SqlCommand
cleanupOnCommit
in interface SqlCommand
java.sql.SQLException
public void perform(java.sql.Connection connection) throws java.sql.SQLException
SqlCommand
perform
in interface SqlCommand
connection
- A JDBC connection on which to perform queries.
java.sql.SQLException
- Upon database errors.public void rollback(java.sql.Connection connection) throws java.sql.SQLException
SqlCommand
rollback
in interface SqlCommand
connection
- A JDBC connection on which to perform queries.
java.sql.SQLException
- Upon database errors or when a rollback is
not supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |