org.apache.ojb.broker.accesslayer
Interface StatementManagerIF

All Known Implementing Classes:
StatementManager

public interface StatementManagerIF

Version:
$Id: StatementManagerIF.java,v 1.1 2007-08-24 22:17:30 ewestfal Exp $

Field Summary
static int FETCH_SIZE_NOT_APPLICABLE
          fetchSize hint marking that setting fetch size for current statement is N/A.
static int FETCH_SIZE_NOT_EXPLICITLY_SET
          fetchSize hint marking that there is no statement-level explicit override.
 
Method Summary
 void bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj)
          binds the objects primary key and locking values to the statement, BRJ
 void bindDelete(PreparedStatement stmt, Identity oid, ClassDescriptor cld)
          Binds the Identities Primary key values to the statement.
 void bindInsert(PreparedStatement stmt, ClassDescriptor cld, Object obj)
          binds the values of the object obj to the statements parameters
 void bindSelect(PreparedStatement stmt, Identity oid, ClassDescriptor cld, boolean callableStmt)
          binds the Identities Primary key values to the statement
 int bindStatement(PreparedStatement stmt, Query query, ClassDescriptor cld, int param)
          bind a Query based Select Statement
 void bindUpdate(PreparedStatement stmt, ClassDescriptor cld, Object obj)
          binds the values of the object obj to the statements parameters
 int bindValues(PreparedStatement stmt, ValueContainer[] valueContainer, int index)
          binds the given array of values (if not null) starting from the given parameter index
 void closeResources(Statement stmt, ResultSet rs)
           
 PreparedStatement getDeleteStatement(ClassDescriptor cds)
          return a prepared DELETE Statement fitting for the given ClassDescriptor
 Statement getGenericStatement(ClassDescriptor cds, boolean scrollable)
          return a generic Statement for the given ClassDescriptor
 PreparedStatement getInsertStatement(ClassDescriptor cds)
          return a prepared Insert Statement fitting for the given ClassDescriptor
 PreparedStatement getPreparedStatement(ClassDescriptor cds, String sql, boolean scrollable, int explicitFetchSizeHint, boolean callableStmt)
          Return a PreparedStatement for selecting against the given ClassDescriptor.
 PreparedStatement getSelectByPKStatement(ClassDescriptor cds)
          return a prepared Select Statement for the given ClassDescriptor
 PreparedStatement getUpdateStatement(ClassDescriptor cds)
          return a prepared Update Statement fitting to the given ClassDescriptor
 

Field Detail

FETCH_SIZE_NOT_APPLICABLE

static final int FETCH_SIZE_NOT_APPLICABLE
fetchSize hint marking that setting fetch size for current statement is N/A.

See Also:
Constant Field Values

FETCH_SIZE_NOT_EXPLICITLY_SET

static final int FETCH_SIZE_NOT_EXPLICITLY_SET
fetchSize hint marking that there is no statement-level explicit override.

See Also:
Constant Field Values
Method Detail

bindDelete

void bindDelete(PreparedStatement stmt,
                Identity oid,
                ClassDescriptor cld)
                throws 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:
SQLException

bindDelete

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

Throws:
SQLException

bindStatement

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

Throws:
SQLException

bindInsert

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

Throws:
SQLException

bindSelect

void bindSelect(PreparedStatement stmt,
                Identity oid,
                ClassDescriptor cld,
                boolean callableStmt)
                throws SQLException
binds the Identities Primary key values to the statement

Parameters:
stmt -
oid -
cld - ClassDescriptor for the Object, if null will be lookup automatic
callableStmt - Indicate if the specified PreparedStatement is a CallableStatement supporting stored procedures.
Throws:
SQLException

bindUpdate

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

Throws:
SQLException

bindValues

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

Returns:
the next parameter index
Throws:
SQLException

getDeleteStatement

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

Throws:
PersistenceBrokerSQLException

getGenericStatement

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

Throws:
PersistenceBrokerException

getInsertStatement

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

Throws:
PersistenceBrokerSQLException

getPreparedStatement

PreparedStatement getPreparedStatement(ClassDescriptor cds,
                                       String sql,
                                       boolean scrollable,
                                       int explicitFetchSizeHint,
                                       boolean callableStmt)
                                       throws PersistenceBrokerException
Return a PreparedStatement for selecting against the given ClassDescriptor.

Throws:
PersistenceBrokerException

getSelectByPKStatement

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

Throws:
PersistenceBrokerSQLException

getUpdateStatement

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

Throws:
PersistenceBrokerSQLException

closeResources

void closeResources(Statement stmt,
                    ResultSet rs)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.