|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDBI
Provides an interface based system to access all of the
DBI
instance methods. Much nicer for proxies.
Method Summary | |
---|---|
java.util.Map |
getGlobalParameters()
Obtain a map containing globally set named parameter values. |
java.util.Map |
getNamedStatements()
Obtain an unmodifiable map of all the named statements known to this DBI instance. |
void |
load(java.lang.String name)
Eagerly load a named query from the filesystem. |
void |
name(java.lang.String name,
java.lang.String statement)
Prepared a named sql statement |
Handle |
open()
Obtain a new Handle instance |
void |
open(HandleCallback callback)
Execute the callback with an open handle, closing, and cleaning up resources, after the callback exits or excepts |
void |
setStatementLocator(StatementLocator locator)
Specify a non-standard statement locator. |
void |
setTransactionHandler(TransactionHandler handler)
Specify a non-standard TransactionHandler which should be
used for all Handle instances created from this dbi. |
Method Detail |
---|
Handle open() throws DBIException
DBIException
void open(HandleCallback callback) throws DBIException
DBIException
- if exception is thrown from the callback, or
an exception occurs with the database
DBIError
- if an Error is thrown from the callbackjava.util.Map getNamedStatements()
void name(java.lang.String name, java.lang.String statement) throws DBIException
name
- name to issue query understatement
- sql string to use as query
DBIException
- if there is a problem preparing the statementvoid load(java.lang.String name) throws DBIException, java.io.IOException
name
and it will look for a file named [name].sql
in the classpath which
contains a single sql statement.
name
- name of query to load, such as "foo" which will be store din foo.sql
java.io.IOException
DBIException
void setTransactionHandler(TransactionHandler handler)
TransactionHandler
which should be
used for all Handle
instances created from this dbi.
The default handler, if you specify none, will explicitely manage
transactions on the underlying JDBC connection.
ConnectionTransactionHandler
,
CMTConnectionTransactionHandler
void setStatementLocator(StatementLocator locator)
locator
- used to find externalized sqljava.util.Map getGlobalParameters()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |