public final class SqlBindParser
extends java.lang.Object
| Constructor | Description | 
|---|---|
SqlBindParser(java.lang.String sql) | 
 Create a new SqlBindParser instance to parse the expression in 'sql'. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
static void | 
bindJdbcValues(java.sql.PreparedStatement stmt,
              java.lang.String preSQL,
              java.lang.Object[] values) | 
 Binds values to prepared SQL statement using the given
 sql string as reference for the bind variable order. 
 | 
java.lang.String | 
getBindExpr() | 
 Returns the current bind variable expression, e.g. 
 | 
static java.lang.String | 
getJdbcSql(java.lang.String preSQL) | 
 Creates a SQL statement from pre_sql, replacing bind expressions like "?1" by "?". 
 | 
java.lang.String | 
getLastExpr() | 
 Returns the expression substring beginning after the
 last processed bind variable and ending just before the
 current bind variable. 
 | 
int | 
getParamNumber() | 
 Returns the parameter number of the current bind variable,
 for example 1 a "$1" bind variable. 
 | 
boolean | 
next() | 
 Move on to the next bind variable in '_sql'. 
 | 
public SqlBindParser(java.lang.String sql)
sql - expression to be parsedpublic boolean next()
public java.lang.String getLastExpr()
public java.lang.String getBindExpr()
public int getParamNumber()
public static java.lang.String getJdbcSql(java.lang.String preSQL)
preSQL - SQL statement string with bind variables of the form "?1".public static void bindJdbcValues(java.sql.PreparedStatement stmt,
                                  java.lang.String preSQL,
                                  java.lang.Object[] values)
                           throws java.sql.SQLException
stmt - JDBC statementpreSQL - SQL statement string with bind variables of the form "?1"values - array of bind valuesjava.sql.SQLExceptionIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com