public class StatementManager extends java.lang.Object implements StatementManagerIF
FETCH_SIZE_NOT_APPLICABLE, FETCH_SIZE_NOT_EXPLICITLY_SET| Constructor and Description |
|---|
StatementManager(PersistenceBroker pBroker) |
| Modifier and Type | Method and Description |
|---|---|
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,
boolean callableStmt)
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,
int explicitFetchSizeHint,
boolean callableStmt)
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
|
public StatementManager(PersistenceBroker pBroker)
public void closeResources(java.sql.Statement stmt,
java.sql.ResultSet rs)
closeResources in interface StatementManagerIFpublic void bindDelete(java.sql.PreparedStatement stmt,
Identity oid,
ClassDescriptor cld)
throws java.sql.SQLException
bindDelete in interface StatementManagerIFcld - ClassDescriptor for the Object, if null will be lookup automaticjava.sql.SQLExceptionpublic void bindDelete(java.sql.PreparedStatement stmt,
ClassDescriptor cld,
java.lang.Object obj)
throws java.sql.SQLException
bindDelete in interface StatementManagerIFjava.sql.SQLExceptionpublic int bindStatement(java.sql.PreparedStatement stmt,
Query query,
ClassDescriptor cld,
int param)
throws java.sql.SQLException
bindStatement in interface StatementManagerIFjava.sql.SQLExceptionpublic void bindInsert(java.sql.PreparedStatement stmt,
ClassDescriptor cld,
java.lang.Object obj)
throws java.sql.SQLException
bindInsert in interface StatementManagerIFjava.sql.SQLExceptionpublic void bindSelect(java.sql.PreparedStatement stmt,
Identity oid,
ClassDescriptor cld,
boolean callableStmt)
throws java.sql.SQLException
bindSelect in interface StatementManagerIFcld - ClassDescriptor for the Object, if null will be lookup automaticcallableStmt - Indicate if the specified PreparedStatement
is a CallableStatement supporting stored procedures.java.sql.SQLExceptionpublic void bindUpdate(java.sql.PreparedStatement stmt,
ClassDescriptor cld,
java.lang.Object obj)
throws java.sql.SQLException
bindUpdate in interface StatementManagerIFjava.sql.SQLExceptionpublic int bindValues(java.sql.PreparedStatement stmt,
ValueContainer[] values,
int index)
throws java.sql.SQLException
bindValues in interface StatementManagerIFjava.sql.SQLExceptionpublic java.sql.PreparedStatement getDeleteStatement(ClassDescriptor cld) throws PersistenceBrokerSQLException, PersistenceBrokerException
getDeleteStatement in interface StatementManagerIFPersistenceBrokerSQLExceptionPersistenceBrokerExceptionpublic java.sql.Statement getGenericStatement(ClassDescriptor cds, boolean scrollable) throws PersistenceBrokerException
getGenericStatement in interface StatementManagerIFPersistenceBrokerExceptionpublic java.sql.PreparedStatement getInsertStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
getInsertStatement in interface StatementManagerIFPersistenceBrokerSQLExceptionPersistenceBrokerExceptionpublic java.sql.PreparedStatement getPreparedStatement(ClassDescriptor cds, java.lang.String sql, boolean scrollable, int explicitFetchSizeHint, boolean callableStmt) throws PersistenceBrokerException
getPreparedStatement in interface StatementManagerIFPersistenceBrokerExceptionpublic java.sql.PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
getSelectByPKStatement in interface StatementManagerIFPersistenceBrokerSQLExceptionPersistenceBrokerExceptionpublic java.sql.PreparedStatement getUpdateStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
getUpdateStatement in interface StatementManagerIFPersistenceBrokerSQLExceptionPersistenceBrokerException(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30