ojb.broker.accesslayer
Class StatementManager

java.lang.Object
  |
  +--ojb.broker.accesslayer.StatementManager

public class StatementManager
extends java.lang.Object

manages JDBC Connection and Statement ressources.


Constructor Summary
StatementManager(PersistenceBrokerImpl pBroker)
          public Constructor
 
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)
          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)
          binds the Identities Primary key values to the statement
 int bindStatement(java.sql.PreparedStatement stmt, Criteria crit, 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
 java.sql.PreparedStatement getDeleteStatement(ClassDescriptor cds)
          return a prepared DELETE Statement fitting for the given ClassDescriptor
 java.sql.Statement getGenericStatement(ClassDescriptor cds)
          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)
          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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatementManager

public StatementManager(PersistenceBrokerImpl pBroker)
public Constructor

Method Detail

bindDelete

public void bindDelete(java.sql.PreparedStatement stmt,
                       Identity oid)
                throws java.sql.SQLException
binds the Identities Primary key values to the statement

java.sql.SQLException

bindDelete

public void bindDelete(java.sql.PreparedStatement stmt,
                       ClassDescriptor cld,
                       java.lang.Object obj)
                throws java.sql.SQLException
binds the objects primary key and locking values to the statement, BRJ

java.sql.SQLException

bindStatement

public int bindStatement(java.sql.PreparedStatement stmt,
                         Criteria crit,
                         ClassDescriptor cld,
                         int param)
                  throws java.sql.SQLException
bind a Query based Select Statement

java.sql.SQLException

bindInsert

public void bindInsert(java.sql.PreparedStatement stmt,
                       ClassDescriptor cld,
                       java.lang.Object obj)
                throws java.sql.SQLException
binds the values of the object obj to the statements parameters

java.sql.SQLException

bindSelect

public void bindSelect(java.sql.PreparedStatement stmt,
                       Identity oid)
                throws java.sql.SQLException
binds the Identities Primary key values to the statement

java.sql.SQLException

bindUpdate

public void bindUpdate(java.sql.PreparedStatement stmt,
                       ClassDescriptor cld,
                       java.lang.Object obj)
                throws java.sql.SQLException
binds the values of the object obj to the statements parameters

java.sql.SQLException

getDeleteStatement

public java.sql.PreparedStatement getDeleteStatement(ClassDescriptor cds)
                                              throws PersistenceBrokerSQLException
return a prepared DELETE Statement fitting for the given ClassDescriptor

PersistenceBrokerSQLException

getGenericStatement

public java.sql.Statement getGenericStatement(ClassDescriptor cds)
                                       throws PersistenceBrokerException
return a generic Statement for the given ClassDescriptor

PersistenceBrokerException

getInsertStatement

public java.sql.PreparedStatement getInsertStatement(ClassDescriptor cds)
                                              throws PersistenceBrokerSQLException
return a prepared Insert Statement fitting for the given ClassDescriptor

PersistenceBrokerSQLException

getPreparedStatement

public java.sql.PreparedStatement getPreparedStatement(ClassDescriptor cds,
                                                       java.lang.String sql)
                                                throws PersistenceBrokerException
return a generic Statement for the given ClassDescriptor

PersistenceBrokerException

getSelectByPKStatement

public java.sql.PreparedStatement getSelectByPKStatement(ClassDescriptor cds)
                                                  throws PersistenceBrokerSQLException
return a prepared Select Statement for the given ClassDescriptor

PersistenceBrokerSQLException

getUpdateStatement

public java.sql.PreparedStatement getUpdateStatement(ClassDescriptor cds)
                                              throws PersistenceBrokerSQLException
return a prepared Update Statement fitting to the given ClassDescriptor

PersistenceBrokerSQLException


Authors: Thomas Mahler and others. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.8.375, 2002-04-04