Java Doc for NamedParameterUtils.java in  » J2EE » spring-framework-2.5 » org » springframework » jdbc » core » namedparam » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.5 » org.springframework.jdbc.core.namedparam 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.jdbc.core.namedparam.NamedParameterUtils

NamedParameterUtils
abstract public class NamedParameterUtils (Code)
Helper methods for named parameter parsing. Only intended for internal use within Spring's JDBC framework.
author:
   Thomas Risberg
author:
   Juergen Hoeller
since:
   2.0




Method Summary
public static  int[]buildSqlTypeArray(ParsedSql parsedSql, SqlParameterSource paramSource)
     Convert a Map of parameter types to a corresponding int array.
public static  Object[]buildValueArray(ParsedSql parsedSql, SqlParameterSource paramSource, List declaredParams)
     Convert a Map of named parameter values to a corresponding array.
Parameters:
  parsedSql - the parsed SQL statement
Parameters:
  paramSource - the source for named parameters
Parameters:
  declaredParams - the List of declared SqlParameter objects(may be null).
public static  Object[]buildValueArray(String sql, Map paramMap)
     Convert a Map of named parameter values to a corresponding array.
public static  ParsedSqlparseSqlStatement(String sql)
     Parse the SQL statement and locate any placeholders or named parameters.
public static  StringparseSqlStatementIntoString(String sql)
     Parse the SQL statement and locate any placeholders or named parameters.
public static  StringsubstituteNamedParameters(ParsedSql parsedSql, SqlParameterSource paramSource)
     Parse the SQL statement and locate any placeholders or named parameters. Named parameters are substituted for a JDBC placeholder and any select list is expanded to the required number of placeholders.
public static  StringsubstituteNamedParameters(String sql, SqlParameterSource paramSource)
     Parse the SQL statement and locate any placeholders or named parameters.



Method Detail
buildSqlTypeArray
public static int[] buildSqlTypeArray(ParsedSql parsedSql, SqlParameterSource paramSource)(Code)
Convert a Map of parameter types to a corresponding int array. This is necessary in order to reuse existing methods on JdbcTemplate. Any named parameter types are placed in the correct position in the Object array based on the parsed SQL statement info.
Parameters:
  parsedSql - the parsed SQL statement
Parameters:
  paramSource - the source for named parameters



buildValueArray
public static Object[] buildValueArray(ParsedSql parsedSql, SqlParameterSource paramSource, List declaredParams)(Code)
Convert a Map of named parameter values to a corresponding array.
Parameters:
  parsedSql - the parsed SQL statement
Parameters:
  paramSource - the source for named parameters
Parameters:
  declaredParams - the List of declared SqlParameter objects(may be null). If specified, the parameter metadata willbe built into the value array in the form of SqlParameterValue objects. the array of values



buildValueArray
public static Object[] buildValueArray(String sql, Map paramMap)(Code)
Convert a Map of named parameter values to a corresponding array.

This is a shortcut version of NamedParameterUtils.buildValueArray(ParsedSql,SqlParameterSource,java.util.List) .
Parameters:
  sql - the SQL statement
Parameters:
  paramMap - the Map of parameters the array of values




parseSqlStatement
public static ParsedSql parseSqlStatement(String sql)(Code)
Parse the SQL statement and locate any placeholders or named parameters. Named parameters are substituted for a JDBC placeholder.
Parameters:
  sql - the SQL statement the parsed statement, represented as ParsedSql instance



parseSqlStatementIntoString
public static String parseSqlStatementIntoString(String sql)(Code)
Parse the SQL statement and locate any placeholders or named parameters. Named parameters are substituted for a JDBC placeholder.

This is a shortcut version of NamedParameterUtils.parseSqlStatement(String) in combination with NamedParameterUtils.substituteNamedParameters(ParsedSql,SqlParameterSource) .
Parameters:
  sql - the SQL statement the actual (parsed) SQL statement




substituteNamedParameters
public static String substituteNamedParameters(ParsedSql parsedSql, SqlParameterSource paramSource)(Code)
Parse the SQL statement and locate any placeholders or named parameters. Named parameters are substituted for a JDBC placeholder and any select list is expanded to the required number of placeholders. Select lists may contain an array of objects and in that case the placeholders will be grouped and enclosed with parantheses. This allows for the use of "expression lists" in the SQL statement like:
select id, name, state from table where (name, age) in (('John', 35), ('Ann', 50))

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.
Parameters:
  parsedSql - the parsed represenation of the SQL statement
Parameters:
  paramSource - the source for named parameters the SQL statement with substituted parameters
See Also:   NamedParameterUtils.parseSqlStatement




substituteNamedParameters
public static String substituteNamedParameters(String sql, SqlParameterSource paramSource)(Code)
Parse the SQL statement and locate any placeholders or named parameters. Named parameters are substituted for a JDBC placeholder and any select list is expanded to the required number of placeholders.

This is a shortcut version of NamedParameterUtils.substituteNamedParameters(ParsedSql,SqlParameterSource) .
Parameters:
  sql - the SQL statement
Parameters:
  paramSource - the source for named parameters the SQL statement with substituted parameters




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.