used for persistence operations
on a given class.
- Version:
- $Id: StatementsForClassIF.java,v 1.10 2004/04/05 12:16:25 tomdz Exp $
- Author:
- brj, Randall Burt
Method Summary |
java.sql.PreparedStatement |
getDeleteStmt(java.sql.Connection con)
returns the DELETE Statement used for clazz. |
java.sql.Statement |
getGenericStmt(java.sql.Connection con,
boolean scrollable)
returns a generic unprepared Statement used for clazz. |
java.sql.PreparedStatement |
getInsertStmt(java.sql.Connection con)
returns the INSERT Statement used for clazz. |
java.sql.PreparedStatement |
getPreparedStmt(java.sql.Connection con,
java.lang.String sql,
boolean scrollable)
returns a prepared Statement used for clazz. |
java.sql.PreparedStatement |
getSelectByPKStmt(java.sql.Connection con)
returns the SELECT Statement used for clazz. |
java.sql.PreparedStatement |
getUpdateStmt(java.sql.Connection con)
returns the UPDATE Statement used for clazz. |
boolean |
isCached(java.sql.Statement stmt)
For single VM operation to not eat up Oracle resources, we need to close
the statements unless they are cached. |
getDeleteStmt
public java.sql.PreparedStatement getDeleteStmt(java.sql.Connection con)
throws java.sql.SQLException
- returns the DELETE Statement used for clazz.
- Returns:
- java.sql.PreparedStatement
- Throws:
java.sql.SQLException
getGenericStmt
public java.sql.Statement getGenericStmt(java.sql.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
public java.sql.PreparedStatement getInsertStmt(java.sql.Connection con)
throws java.sql.SQLException
- returns the INSERT Statement used for clazz.
- Returns:
- java.sql.PreparedStatement
- Throws:
java.sql.SQLException
getPreparedStmt
public java.sql.PreparedStatement getPreparedStmt(java.sql.Connection con,
java.lang.String sql,
boolean scrollable)
throws PersistenceBrokerSQLException
- returns a prepared Statement used for clazz.
- Returns:
- java.sql.Statement
- Throws:
PersistenceBrokerSQLException
getSelectByPKStmt
public java.sql.PreparedStatement getSelectByPKStmt(java.sql.Connection con)
throws java.sql.SQLException
- returns the SELECT Statement used for clazz.
- Returns:
- java.sql.PreparedStatement
- Throws:
java.sql.SQLException
getUpdateStmt
public java.sql.PreparedStatement getUpdateStmt(java.sql.Connection con)
throws java.sql.SQLException
- returns the UPDATE Statement used for clazz.
- Returns:
- java.sql.PreparedStatement
- Throws:
java.sql.SQLException
isCached
public boolean isCached(java.sql.Statement stmt)
- For single VM operation to not eat up Oracle resources, we need to close
the statements unless they are cached.
- Returns:
- if the statement is of type select, insert, update, or delete
(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.3, 2005-04-2