|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SQLHandler
Method Summary | |
---|---|
void |
closeAllConnections()
Closes all connections that were created and cached by this SQLHandler. |
void |
endTransactionAndCommit(DataSource dataSource)
Ends a transaction that was started using startTransaction by committing and turning auto commit back on. |
void |
endTransactionAndRollback(DataSource dataSource)
Ends a transaction that was started using startTransaction by rolling back and turning auto commit back on. |
void |
execute(String sql,
DataSource dataSource)
Executes the given statement. |
int |
executeUpdateAndCommit(String sql,
DataSource dataSource)
Executes the given statement and commits the changes to the database |
boolean |
exists(String sql,
DataSource dataSource)
Returns true if the query returned a record. |
long |
getItemAsLong(String sql,
DataSource dataSource)
Returns the long extracted from the result of the given query. |
String |
getItemAsString(String sql,
DataSource dataSource)
Returns the value extracted from the result of the given query. |
Set<String> |
getItemsAsStringSet(String sql,
DataSource dataSource)
Returns the items extracted from the result of the given query. |
void |
startTransaction(DataSource dataSource)
Starts a transaction by turning of auto commit. |
Method Detail |
---|
void execute(String sql, DataSource dataSource)
sql
- The sql string for retrieving the itemsdataSource
- The dataSource, not nullint executeUpdateAndCommit(String sql, DataSource dataSource)
sql
- The sql string for retrieving the itemsdataSource
- The dataSource, not null
long getItemAsLong(String sql, DataSource dataSource)
DbMaintainException
is thrown.
sql
- The sql string for retrieving the itemsdataSource
- The dataSource, not null
String getItemAsString(String sql, DataSource dataSource)
DbMaintainException
is thrown.
sql
- The sql string for retrieving the itemsdataSource
- The dataSource, not null
Set<String> getItemsAsStringSet(String sql, DataSource dataSource)
sql
- The sql string for retrieving the itemsdataSource
- The dataSource, not null
boolean exists(String sql, DataSource dataSource)
sql
- The sql string for checking the existencedataSource
- The dataSource, not null
void startTransaction(DataSource dataSource)
dataSource
- The data source, not nullvoid endTransactionAndCommit(DataSource dataSource)
dataSource
- The data source, not nullvoid endTransactionAndRollback(DataSource dataSource)
dataSource
- The data source, not nullvoid closeAllConnections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |