|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colle.sql.persistence.StatementManager
Provides convenience methods for working with prepared statements. Created: 07 Mar 2001
Constructor Summary | |
StatementManager()
|
Method Summary | |
static PreparedStatement |
getPreparedStatement(String psSQL,
Connection pxConnection)
Pools prepared statements for each database connection (or at least it will in the near future). |
static String |
makeInClause(String psStatement,
int pnCount)
Replaces the first '~' with '(?, ?, ? ...)' for use in a SQL 'where x in' clause. |
static String |
makeOrderByClause(String[] pxOrderByColumns,
boolean[] pxOrderByDirections)
Makes an order by clause based on the orders and directions specified. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StatementManager()
Method Detail |
public static PreparedStatement getPreparedStatement(String psSQL, Connection pxConnection) throws SQLException
SQLException
public static String makeInClause(String psStatement, int pnCount)
psStatement
- SQL statement containing at least one '~'pnCount
- number of '?' that will be added
public static String makeOrderByClause(String[] pxOrderByColumns, boolean[] pxOrderByDirections)
pxOrderByColumns
- columns in order of precedence to order bypxOrderByDirections
- direction for column to be order by. This
array must be at least as large as pxOrderByColumns.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |