|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.jdbc2xml.sql.SqlCommandQueue
public class SqlCommandQueue
This is a queue of SQL commands, which may be rolled back or committed.
Constructor Summary | |
---|---|
SqlCommandQueue()
Default constructor. |
Method Summary | |
---|---|
java.util.Enumeration<SqlCommand> |
commands()
|
void |
commit(java.sql.Connection connection)
Perform all commands currently pushed to the stack by pushCommand(SqlCommand)
and not performed yet. |
void |
perform(java.sql.Connection connection)
Perform all commands currently pushed to the stack by pushCommand(SqlCommand)
and not performed yet. |
void |
pushCommand(SqlCommand command)
|
void |
pushCommand(java.lang.String performSql,
java.lang.String rollbackSql)
Push an instance of SimpleSqlCommand to the queue. |
void |
rollback(java.sql.Connection connection)
Roll back all commands currently pushed to the stack by pushCommand(SqlCommand)
and performed up to now. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SqlCommandQueue()
Method Detail |
---|
public void pushCommand(SqlCommand command)
command
- The command to push to the queue.public void pushCommand(java.lang.String performSql, java.lang.String rollbackSql)
SimpleSqlCommand
to the queue.
performSql
- The sql statement to perform the change.rollbackSql
- The sql statement to roll back the change.SimpleSqlCommand.SimpleSqlCommand(String, String)
public void perform(java.sql.Connection connection) throws java.sql.SQLException
pushCommand(SqlCommand)
and not performed yet.
connection
- The JDBC connection on which to perform queries.
java.sql.SQLException
- Upon database errors.SqlCommand.perform(Connection)
public void commit(java.sql.Connection connection) throws java.sql.SQLException
pushCommand(SqlCommand)
and not performed yet. Afterwards discard the whole set of database commands.
connection
- The JDBC connection on which to perform queries.
java.sql.SQLException
- Upon database errors.public void rollback(java.sql.Connection connection) throws java.sql.SQLException
pushCommand(SqlCommand)
and performed up to now. Afterwards discard the whole set of database commands.
connection
- The JDBC connection on which to perform the rollback.
java.sql.SQLException
SqlCommand.rollback(Connection)
public java.util.Enumeration<SqlCommand> commands()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |