|
||||||||||
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(ISchemaEngine schemaEngine,
TableInfo ti,
Dialect dialect,
String suffix)
Construct a drop table command for RDMS engines, which do not support renaming of tables. |
|
DropTableCommand(ISchemaEngine schemaEngine,
TableInfo ti,
String renameTableCommand,
Dialect dialect)
Construct a drop table command for RDMS engines, which support renaming of tables. |
Method Summary | |
---|---|
void |
cleanupOnCommit(Connection connection)
Cleanup resources kept by this command, if the transaction is committed. |
String |
getTempTableName()
|
boolean |
isTempTableCreated()
|
void |
perform(Connection connection)
Perform an atomic SQL command. |
void |
rollback(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(ISchemaEngine schemaEngine, TableInfo ti, Dialect dialect, String suffix) throws SQLException
schemaEngine
- The SchemaEngine.ti
- The description of the table to be dropped.dialect
- The dialect used to build column specs.suffix
- The RDMBS-specific create table suffix.
SQLException
- Upon unsupported foreign key options.DDLHelper.buildCreateTable(TableInfo, Dialect, String)
public DropTableCommand(ISchemaEngine schemaEngine, TableInfo ti, String renameTableCommand, Dialect dialect)
schemaEngine
- The SchemaEngine.ti
- The description of the table to be dropped.renameTableCommand
- A dialect specific rename table command, if the
rename table operation does conform to ISO SQL.
If set to null
, the ISO SQL command
is used. For details see DDLHelper.buildRenameTable(String, String, String)
.Method Detail |
---|
public void cleanupOnCommit(Connection connection) throws SQLException
SqlCommand
cleanupOnCommit
in interface SqlCommand
SQLException
public void perform(Connection connection) throws SQLException
SqlCommand
perform
in interface SqlCommand
connection
- A JDBC connection on which to perform queries.
SQLException
- Upon database errors.public void rollback(Connection connection) throws SQLException
SqlCommand
rollback
in interface SqlCommand
connection
- A JDBC connection on which to perform queries.
SQLException
- Upon database errors or when a rollback is
not supported.public boolean isTempTableCreated()
isTempTableCreated
in interface SqlCommand
public String getTempTableName()
getTempTableName
in interface SqlCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |