|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jdbc.core.namedparam.NamedParameterUtils
public abstract class NamedParameterUtils
Helper methods for named parameter parsing. Only intended for internal use within Spring's JDBC framework.
Constructor Summary | |
---|---|
NamedParameterUtils()
|
Method Summary | |
---|---|
(package private) static int[] |
buildSqlTypeArray(ParsedSql parsedSql,
SqlParameterSource paramSource)
Convert a Map of parameter types to a corresponding int array. |
(package private) static Object[] |
buildValueArray(ParsedSql parsedSql,
SqlParameterSource paramSource)
Convert a Map of named parameter values to a corresponding array. |
static Object[] |
buildValueArray(String sql,
Map paramMap)
Convert a Map of named parameter values to a corresponding array. |
(package private) static ParsedSql |
parseSqlStatement(String sql)
Parse the SQL statement and locate any placeholders or named parameters. |
static String |
parseSqlStatementIntoString(String sql)
Parse the SQL statement and locate any placeholders or named parameters. |
static String |
substituteNamedParameters(String sql,
SqlParameterSource paramSource)
Parse the SQL statement and locate any placeholders or named parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedParameterUtils()
Method Detail |
---|
public static String parseSqlStatementIntoString(String sql)
sql
- the SQL statementstatic ParsedSql parseSqlStatement(String sql)
sql
- the SQL statement
public static String substituteNamedParameters(String sql, SqlParameterSource paramSource)
The parameter values passed in are used to determine the number of placeholder to be used for a select list. Select lists should be limited to 100 or fewer elements. A larger number of elements is not guaramteed to be supported by the database and is strictly vendor-dependent.
sql
- the SQL statementparamSource
- the source for named parameters
public static Object[] buildValueArray(String sql, Map paramMap)
This is necessary in order to reuse existing methods on JdbcTemplate. See below for additional info.
sql
- the SQL statementparamMap
- the Map of parametersstatic Object[] buildValueArray(ParsedSql parsedSql, SqlParameterSource paramSource)
parsedSql
- the parsed SQL statementparamSource
- the source for named parametersstatic int[] buildSqlTypeArray(ParsedSql parsedSql, SqlParameterSource paramSource)
parsedSql
- the parsed SQL statementparamSource
- the source for named parameters
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |