org.apache.ojb.broker.accesslayer
Interface StatementManagerIF

All Known Implementing Classes:
StatementManager

public interface StatementManagerIF

Version:
$Id: StatementManagerIF.java,v 1.8 2003/11/28 14:40:00 arminw Exp $

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[] valueContainer, 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 cds)
          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
 

Method Detail

bindDelete

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

Parameters:
stmt -
oid -
cld - ClassDescriptor for the Object, if null will be lookup automatic
Throws:
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

Throws:
java.sql.SQLException

bindStatement

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

Throws:
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

Throws:
java.sql.SQLException

bindSelect

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

Parameters:
stmt -
oid -
cld - ClassDescriptor for the Object, if null will be lookup automatic
Throws:
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

Throws:
java.sql.SQLException

bindValues

public int bindValues(java.sql.PreparedStatement stmt,
                      ValueContainer[] valueContainer,
                      int index)
               throws java.sql.SQLException
binds the given array of values (if not null) starting from the given parameter index

Returns:
the next parameter index
Throws:
java.sql.SQLException

getDeleteStatement

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

Throws:
PersistenceBrokerSQLException

getGenericStatement

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

Throws:
PersistenceBrokerException

getInsertStatement

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

Throws:
PersistenceBrokerSQLException

getPreparedStatement

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

Throws:
PersistenceBrokerException

getSelectByPKStatement

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

Throws:
PersistenceBrokerSQLException

getUpdateStatement

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

Throws:
PersistenceBrokerSQLException

closeResources

public void closeResources(java.sql.Statement stmt,
                           java.sql.ResultSet rs)


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14