|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectch.agent.crnickl.impl.DatabaseMethodsImpl
ch.agent.crnickl.jdbc.JDBCDatabaseMethods
public class JDBCDatabaseMethods
A JDBCDatabaseMethods object provides support for prepared statements. It is
meant as base class for actual access methods. All database accesses should
be bracketed between one of the open and the close
method.
| Constructor Summary | |
|---|---|
JDBCDatabaseMethods()
|
|
| Method Summary | |
|---|---|
PreparedStatement |
close(PreparedStatement stmt)
Close the prepared statement. |
int |
executeAndGetNewId(PreparedStatement stmt)
Execute a prepared statement of the "insertion" type and return the generated key. |
PreparedStatement |
open(String sql,
ch.agent.crnickl.api.Database database,
PreparedStatement stmt)
Return a valid prepared statement for the SQL code specified. |
PreparedStatement |
open(String sql,
ch.agent.crnickl.api.DBObject dBObject,
PreparedStatement stmt)
Return a valid prepared statement for the SQL code specified. |
PreparedStatement |
open(String sql,
ch.agent.crnickl.api.Surrogate surrogate,
PreparedStatement stmt)
Return a valid prepared statement for the SQL code specified. |
| Methods inherited from class ch.agent.crnickl.impl.DatabaseMethodsImpl |
|---|
check, check, check, check, getId, getId, getIdOrZero, makeSurrogate, makeSurrogate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JDBCDatabaseMethods()
| Method Detail |
|---|
public int executeAndGetNewId(PreparedStatement stmt)
throws ch.agent.crnickl.T2DBException,
SQLException
stmt - a prepared statement
ch.agent.crnickl.T2DBException
SQLException
public PreparedStatement open(String sql,
ch.agent.crnickl.api.Database database,
PreparedStatement stmt)
throws ch.agent.crnickl.T2DBException
sql - a string in SQL syntaxdatabase - a databasestmt - a prepared statement
ch.agent.crnickl.T2DBException
public PreparedStatement open(String sql,
ch.agent.crnickl.api.DBObject dBObject,
PreparedStatement stmt)
throws ch.agent.crnickl.T2DBException
dBObject parameter. To avoid preparing a new statement again
and again a statement can be passed as an argument. This statement will
be returned if it is not null and if its connection is equal to
connection embedded in the mentioned parameter.
sql - a string in SQL syntaxdBObject - a database objectstmt - a prepared statement
ch.agent.crnickl.T2DBException
public PreparedStatement open(String sql,
ch.agent.crnickl.api.Surrogate surrogate,
PreparedStatement stmt)
throws ch.agent.crnickl.T2DBException
surrogate parameter. To avoid preparing a new statement again
and again a statement can be passed as an argument. This statement will
be returned if it is not null and if its connection is equal to
connection embedded in the mentioned parameter.
sql - a string in SQL syntaxsurrogate - a surrogatestmt - a prepared statement
ch.agent.crnickl.T2DBException
public PreparedStatement close(PreparedStatement stmt)
throws ch.agent.crnickl.T2DBException
stmt - a prepared statement
ch.agent.crnickl.T2DBException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||