|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.jdbc2xml.sql.SimpleSqlCommand
public class SimpleSqlCommand
this is a simple SQL command, which performs SQL upadte queries using
Statement.executeUpdate(String)
.
Constructor Summary | |
---|---|
SimpleSqlCommand(String performSql,
String rollbackSql)
|
Method Summary | |
---|---|
void |
cleanupOnCommit(Connection connection)
Cleanup resources kept by this command, if the transaction is committed. |
String |
getPerformSql()
|
String |
getRollbackSql()
|
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 SimpleSqlCommand(String performSql, String rollbackSql)
performSql
- The sql statement to perform the change.rollbackSql
- The sql statement to roll back the change.Method Detail |
---|
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 String getPerformSql()
public String getRollbackSql()
public void cleanupOnCommit(Connection connection) throws SQLException
SqlCommand
cleanupOnCommit
in interface SqlCommand
SQLException
public String getTempTableName()
getTempTableName
in interface SqlCommand
public boolean isTempTableCreated()
isTempTableCreated
in interface SqlCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |