|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.accesslayer.StatementManager
manages JDBC Connection and Statement resources.
Constructor Summary | |
StatementManager(PersistenceBroker pBroker)
|
Method Summary | |
void |
bindDelete(java.sql.PreparedStatement stmt,
ClassDescriptor cld,
java.lang.Object obj)
binds the objects primary key and locking values to the statement, BRJ |
void |
bindDelete(java.sql.PreparedStatement stmt,
Identity oid,
ClassDescriptor cld)
binds the Identities Primary key values to the statement |
void |
bindInsert(java.sql.PreparedStatement stmt,
ClassDescriptor cld,
java.lang.Object obj)
binds the values of the object obj to the statements parameters |
void |
bindSelect(java.sql.PreparedStatement stmt,
Identity oid,
ClassDescriptor cld)
binds the Identities Primary key values to the statement |
int |
bindStatement(java.sql.PreparedStatement stmt,
Query query,
ClassDescriptor cld,
int param)
bind a Query based Select Statement |
void |
bindUpdate(java.sql.PreparedStatement stmt,
ClassDescriptor cld,
java.lang.Object obj)
binds the values of the object obj to the statements parameters |
int |
bindValues(java.sql.PreparedStatement stmt,
ValueContainer[] values,
int index)
binds the given array of values (if not null) starting from the given parameter index |
void |
closeResources(java.sql.Statement stmt,
java.sql.ResultSet rs)
|
java.sql.PreparedStatement |
getDeleteStatement(ClassDescriptor cld)
return a prepared DELETE Statement fitting for the given ClassDescriptor |
java.sql.Statement |
getGenericStatement(ClassDescriptor cds,
boolean scrollable)
return a generic Statement for the given ClassDescriptor. |
java.sql.PreparedStatement |
getInsertStatement(ClassDescriptor cds)
return a prepared Insert Statement fitting for the given ClassDescriptor |
java.sql.PreparedStatement |
getPreparedStatement(ClassDescriptor cds,
java.lang.String sql,
boolean scrollable)
return a generic Statement for the given ClassDescriptor |
java.sql.PreparedStatement |
getSelectByPKStatement(ClassDescriptor cds)
return a prepared Select Statement for the given ClassDescriptor |
java.sql.PreparedStatement |
getUpdateStatement(ClassDescriptor cds)
return a prepared Update Statement fitting to the given ClassDescriptor |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StatementManager(PersistenceBroker pBroker)
Method Detail |
public void closeResources(java.sql.Statement stmt, java.sql.ResultSet rs)
closeResources
in interface StatementManagerIF
public void bindDelete(java.sql.PreparedStatement stmt, Identity oid, ClassDescriptor cld) throws java.sql.SQLException
bindDelete
in interface StatementManagerIF
stmt
- oid
- cld
- ClassDescriptor for the Object, if null will be lookup automatic
java.sql.SQLException
public void bindDelete(java.sql.PreparedStatement stmt, ClassDescriptor cld, java.lang.Object obj) throws java.sql.SQLException
bindDelete
in interface StatementManagerIF
java.sql.SQLException
public int bindStatement(java.sql.PreparedStatement stmt, Query query, ClassDescriptor cld, int param) throws java.sql.SQLException
bindStatement
in interface StatementManagerIF
java.sql.SQLException
public void bindInsert(java.sql.PreparedStatement stmt, ClassDescriptor cld, java.lang.Object obj) throws java.sql.SQLException
bindInsert
in interface StatementManagerIF
java.sql.SQLException
public void bindSelect(java.sql.PreparedStatement stmt, Identity oid, ClassDescriptor cld) throws java.sql.SQLException
bindSelect
in interface StatementManagerIF
stmt
- oid
- cld
- ClassDescriptor for the Object, if null will be lookup automatic
java.sql.SQLException
public void bindUpdate(java.sql.PreparedStatement stmt, ClassDescriptor cld, java.lang.Object obj) throws java.sql.SQLException
bindUpdate
in interface StatementManagerIF
java.sql.SQLException
public int bindValues(java.sql.PreparedStatement stmt, ValueContainer[] values, int index) throws java.sql.SQLException
bindValues
in interface StatementManagerIF
java.sql.SQLException
public java.sql.PreparedStatement getDeleteStatement(ClassDescriptor cld) throws PersistenceBrokerSQLException, PersistenceBrokerException
getDeleteStatement
in interface StatementManagerIF
PersistenceBrokerSQLException
PersistenceBrokerException
public java.sql.Statement getGenericStatement(ClassDescriptor cds, boolean scrollable) throws PersistenceBrokerException
getGenericStatement
in interface StatementManagerIF
PersistenceBrokerException
public java.sql.PreparedStatement getInsertStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
getInsertStatement
in interface StatementManagerIF
PersistenceBrokerSQLException
PersistenceBrokerException
public java.sql.PreparedStatement getPreparedStatement(ClassDescriptor cds, java.lang.String sql, boolean scrollable) throws PersistenceBrokerException
getPreparedStatement
in interface StatementManagerIF
PersistenceBrokerException
public java.sql.PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
getSelectByPKStatement
in interface StatementManagerIF
PersistenceBrokerSQLException
PersistenceBrokerException
public java.sql.PreparedStatement getUpdateStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
getUpdateStatement
in interface StatementManagerIF
PersistenceBrokerSQLException
PersistenceBrokerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |