|
EAF 7.4 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DBConnection
This interface defines a database connection.
Method Summary | |
---|---|
void |
allocate()
Method called when this connection object is allocated from the connection allocator. |
void |
close()
Close this connection. |
void |
commit()
Commit a transaction. |
boolean |
execute(java.lang.String sql)
Execute a SQL statement that does not return a resultset. |
java.sql.ResultSet |
executeQuery(java.sql.PreparedStatement preparedStmt,
java.lang.String msg)
Execute a prepared query statement. |
java.sql.ResultSet |
executeQuery(java.lang.String sql)
Execute a SQL query statement. |
int |
executeUpdate(java.sql.PreparedStatement preparedStmt,
java.lang.String msg)
Execute a prepared update statement. |
int |
executeUpdate(java.lang.String sql)
Execute a SQL update statement. |
java.sql.Connection |
getConnection()
Get the underlying Connection object. |
java.lang.String |
getDatabaseName()
|
int |
getGeneration()
Get the generation number specified when the connection was created. |
java.lang.String |
getUrl()
Get the database URL. |
java.lang.String |
getUser()
Get the database user name. |
boolean |
handleException(java.sql.SQLException sqlExcept)
Check if a connection is valid after an SQL exception is thrown. |
void |
incrRequestCount()
Increment the count of the number of requests against this connection. |
boolean |
isMarkedForDrop()
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
Creates a CallableStatement object for calling database stored procedures. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Get a prepared statement given an SQL string. |
void |
release()
Return this connection to its allocator. |
void |
reset()
Closes down all query-specific resources. |
void |
rollback()
Rollback a transaction. |
void |
setAutoCommit(boolean on)
Autocommit on/off. |
void |
validate()
Validates this connection. |
void |
warningCheck(java.sql.ResultSet resultSet)
Check for warnings in a result set. |
Method Detail |
---|
void validate() throws java.sql.SQLException
java.sql.SQLException
- If it is not valid.void reset() throws java.sql.SQLException
java.sql.SQLException
- If a database error occurs.java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
sql
- The SQL statement to prepared.
java.sql.SQLException
- If a SQL error occured compiling the
statement.java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
sql
- The SQL statement to be called.
java.sql.SQLException
- If a database access error occurs
statement.java.sql.ResultSet executeQuery(java.sql.PreparedStatement preparedStmt, java.lang.String msg) throws java.sql.SQLException
reset()
should be called.
preparedStmt
- The statement to execute.msg
- for logging/debug purposes
java.sql.SQLException
- If a SQL error occured executing the
statement.java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
reset()
should be called.
sql
- The SQL query statement
java.sql.SQLException
- If a SQL error occured executing the
statement.int executeUpdate(java.lang.String sql) throws java.sql.SQLException
reset()
should be called.
sql
- The SQL query statement
java.sql.SQLException
- If a SQL error occured executing the update.int executeUpdate(java.sql.PreparedStatement preparedStmt, java.lang.String msg) throws java.sql.SQLException
reset()
should be called.
preparedStmt
- The statement to execute.msg
- for logging/debug purposes
java.sql.SQLException
- If a SQL error occured executing the
statement.boolean execute(java.lang.String sql) throws java.sql.SQLException
reset()
should be called.
sql
- The SQL query statement
java.sql.SQLException
- If a SQL error occured executing the
statement.void warningCheck(java.sql.ResultSet resultSet) throws java.sql.SQLException
resultSet
- The result set to check for warnings.
java.sql.SQLException
- If a SQL error occured compiling the
statement.void release()
boolean handleException(java.sql.SQLException sqlExcept)
sqlExcept
- the SQL exception that occured.
void commit() throws java.sql.SQLException
java.sql.SQLException
- If a database access error occurs.void setAutoCommit(boolean on) throws java.sql.SQLException
on
- false to disable auto commit mode. True to enable.
java.sql.SQLException
- if a database access error occurs.void rollback() throws java.sql.SQLException
java.sql.SQLException
- if a database access error occurs.void allocate() throws java.sql.SQLException
java.sql.SQLException
- if reset
had no been called on the previous operation.void close()
int getGeneration()
void incrRequestCount()
java.lang.String getUrl()
java.lang.String getUser()
java.sql.Connection getConnection()
Connection
object.
Use with extreme caution.
boolean isMarkedForDrop()
java.lang.String getDatabaseName()
|
EAF 7.4 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |