org.apache.ojb.broker.accesslayer
Interface StatementsForClassIF

All Known Implementing Classes:
StatementsForClassImpl

public interface StatementsForClassIF

A class that implements this interface serves as a cache for java.sql.Statements used for persistence operations on a given class.

Version:
$Id: StatementsForClassIF.java,v 1.1 2007-08-24 22:17:30 ewestfal Exp $
Author:
brj, Randall Burt

Method Summary
 PreparedStatement getDeleteStmt(Connection con)
          Returns the DELETE Statement used for clazz.
 Statement getGenericStmt(Connection con, boolean scrollable)
          Returns a generic unprepared Statement used for clazz.
 PreparedStatement getInsertStmt(Connection con)
          Returns the INSERT Statement used for clazz.
 PreparedStatement getPreparedStmt(Connection con, String sql, boolean scrollable, int explicitFetchSizeHint, boolean callableStmt)
          Returns a prepared Statement used for clazz.
 PreparedStatement getSelectByPKStmt(Connection con)
          Returns the SELECT Statement used for clazz.
 PreparedStatement getUpdateStmt(Connection con)
          Returns the UPDATE Statement used for clazz.
 

Method Detail

getDeleteStmt

PreparedStatement getDeleteStmt(Connection con)
                                throws SQLException
Returns the DELETE Statement used for clazz.

Returns:
java.sql.PreparedStatement
Throws:
SQLException

getGenericStmt

Statement getGenericStmt(Connection con,
                         boolean scrollable)
                         throws PersistenceBrokerSQLException
Returns a generic unprepared Statement used for clazz. Never use this method for UPDATE/INSERT/DELETE if you want to use the batch mode.

Returns:
java.sql.Statement
Throws:
PersistenceBrokerSQLException

getInsertStmt

PreparedStatement getInsertStmt(Connection con)
                                throws SQLException
Returns the INSERT Statement used for clazz.

Returns:
java.sql.PreparedStatement
Throws:
SQLException

getPreparedStmt

PreparedStatement getPreparedStmt(Connection con,
                                  String sql,
                                  boolean scrollable,
                                  int explicitFetchSizeHint,
                                  boolean callableStmt)
                                  throws PersistenceBrokerSQLException
Returns a prepared Statement used for clazz.

Returns:
java.sql.Statement
Throws:
PersistenceBrokerSQLException

getSelectByPKStmt

PreparedStatement getSelectByPKStmt(Connection con)
                                    throws SQLException
Returns the SELECT Statement used for clazz.

Returns:
java.sql.PreparedStatement
Throws:
SQLException

getUpdateStmt

PreparedStatement getUpdateStmt(Connection con)
                                throws SQLException
Returns the UPDATE Statement used for clazz.

Returns:
java.sql.PreparedStatement
Throws:
SQLException


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