Java Doc for AbstractJdbcInsert.java in  » J2EE » spring-framework-2.5 » org » springframework » jdbc » core » simple » 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.simple 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.jdbc.core.simple.AbstractJdbcInsert

All known Subclasses:   org.springframework.jdbc.core.simple.SimpleJdbcInsert,
AbstractJdbcInsert
abstract public class AbstractJdbcInsert (Code)
Abstract class to provide base functionality for easy inserts based on configuration options and database metadata. This class provides the base SPI for SimpleJdbcInsert .
author:
   Thomas Risberg
since:
   2.5


Field Summary
final protected  Loglogger
    

Constructor Summary
protected  AbstractJdbcInsert(DataSource dataSource)
     Constructor for sublasses to delegate to for setting the DataSource.
protected  AbstractJdbcInsert(JdbcTemplate jdbcTemplate)
     Constructor for sublasses to delegate to for setting the JdbcTemplate.

Method Summary
protected  voidcheckCompiled()
     Check whether this operation has been compiled already; lazily compile it if not already compiled.
protected  voidcheckIfConfigurationModificationIsAllowed()
     Method to check whether we are allowd to make any configuration changes at this time.
final public  voidcompile()
     Compile this JdbcInsert using provided parameters and meta data plus other settings.
protected  voidcompileInternal()
     Method to perform the actual compilation.
protected  intdoExecute(Map<String, Object> args)
    
protected  intdoExecute(SqlParameterSource parameterSource)
    
protected  NumberdoExecuteAndReturnKey(Map<String, Object> args)
    
protected  NumberdoExecuteAndReturnKey(SqlParameterSource parameterSource)
    
protected  KeyHolderdoExecuteAndReturnKeyHolder(Map<String, Object> args)
    
protected  KeyHolderdoExecuteAndReturnKeyHolder(SqlParameterSource parameterSource)
    
protected  int[]doExecuteBatch(Map<String, Object>[] batch)
    
protected  int[]doExecuteBatch(SqlParameterSource[] batch)
    
public  StringgetCatalogName()
    
public  List<String>getColumnNames()
    
public  String[]getGeneratedKeyNames()
    
public  StringgetInsertString()
    
public  int[]getInsertTypes()
    
protected  JdbcTemplategetJdbcTemplate()
    
public  StringgetSchemaName()
    
public  StringgetTableName()
    
public  booleanisCompiled()
    
protected  List<Object>matchInParameterValuesWithInsertColumns(SqlParameterSource parameterSource)
     Match the provided in parameter values with regitered parameters and parameters defined via metedata processing.
protected  List<Object>matchInParameterValuesWithInsertColumns(Map<String, Object> args)
     Match the provided in parameter values with regitered parameters and parameters defined via metedata processing.
protected  voidonCompileInternal()
     Hook method that subclasses may override to react to compilation.
public  voidsetCatalogName(String catalogName)
    
public  voidsetColumnNames(List<String> columnNames)
    
public  voidsetGeneratedKeyName(String generatedKeyName)
    
public  voidsetGeneratedKeyNames(String[] generatedKeyNames)
    
public  voidsetSchemaName(String schemaName)
    
public  voidsetTableName(String tableName)
    

Field Detail
logger
final protected Log logger(Code)
Logger available to subclasses




Constructor Detail
AbstractJdbcInsert
protected AbstractJdbcInsert(DataSource dataSource)(Code)
Constructor for sublasses to delegate to for setting the DataSource.



AbstractJdbcInsert
protected AbstractJdbcInsert(JdbcTemplate jdbcTemplate)(Code)
Constructor for sublasses to delegate to for setting the JdbcTemplate.




Method Detail
checkCompiled
protected void checkCompiled()(Code)
Check whether this operation has been compiled already; lazily compile it if not already compiled.

Automatically called by validateParameters.




checkIfConfigurationModificationIsAllowed
protected void checkIfConfigurationModificationIsAllowed()(Code)
Method to check whether we are allowd to make any configuration changes at this time. If the class has been compiled, then no further changes to the configuration are allowed.



compile
final public void compile() throws InvalidDataAccessApiUsageException(Code)
Compile this JdbcInsert using provided parameters and meta data plus other settings. This finalizes the configuration for this object and subsequent attempts to compile are ignored. This will be implicitly called the first time an un-compiled insert is executed.
throws:
  org.springframework.dao.InvalidDataAccessApiUsageException - if the object hasn'tbeen correctly initialized, for example if no DataSource has been provided



compileInternal
protected void compileInternal()(Code)
Method to perform the actual compilation. Subclasses can override this template method to perform their own compilation. Invoked after this base class's compilation is complete.



doExecute
protected int doExecute(Map<String, Object> args)(Code)
Method that provides execution of the insert using the passed in Map of parameters
Parameters:
  args - Map with parameter names and values to be used in insert number of rows affected



doExecute
protected int doExecute(SqlParameterSource parameterSource)(Code)
Method that provides execution of the insert using the passed in SqlParameterSource
Parameters:
  parameterSource - parameter names and values to be used in insert number of rows affected



doExecuteAndReturnKey
protected Number doExecuteAndReturnKey(Map<String, Object> args)(Code)
Method that provides execution of the insert using the passed in Map of parameters and returning a generated key
Parameters:
  args - Map with parameter names and values to be used in insert the key generated by the insert



doExecuteAndReturnKey
protected Number doExecuteAndReturnKey(SqlParameterSource parameterSource)(Code)
Method that provides execution of the insert using the passed in SqlParameterSource and returning a generated key
Parameters:
  parameterSource - parameter names and values to be used in insert the key generated by the insert



doExecuteAndReturnKeyHolder
protected KeyHolder doExecuteAndReturnKeyHolder(Map<String, Object> args)(Code)
Method that provides execution of the insert using the passed in Map of parameters and returning all generated keys
Parameters:
  args - Map with parameter names and values to be used in insert the KeyHolder containing keys generated by the insert



doExecuteAndReturnKeyHolder
protected KeyHolder doExecuteAndReturnKeyHolder(SqlParameterSource parameterSource)(Code)
Method that provides execution of the insert using the passed in SqlParameterSource and returning all generated keys
Parameters:
  parameterSource - parameter names and values to be used in insert the KeyHolder containing keys generated by the insert



doExecuteBatch
protected int[] doExecuteBatch(Map<String, Object>[] batch)(Code)
Method that provides execution of a batch insert using the passed in Maps of parameters
Parameters:
  batch - array of Maps with parameter names and values to be used in batch insert array of number of rows affected



doExecuteBatch
protected int[] doExecuteBatch(SqlParameterSource[] batch)(Code)
Method that provides execution of a batch insert using the passed in array of SqlParameterSource
Parameters:
  batch - array of SqlParameterSource with parameter names and values to be used in insert array of number of rows affected



getCatalogName
public String getCatalogName()(Code)
Get the name of the catalog for this insert



getColumnNames
public List<String> getColumnNames()(Code)
Get the names of the columns used



getGeneratedKeyNames
public String[] getGeneratedKeyNames()(Code)
Get the names of any generated keys



getInsertString
public String getInsertString()(Code)
Get the insert string to be used



getInsertTypes
public int[] getInsertTypes()(Code)
Get the array of java.sql.Types to be used for insert



getJdbcTemplate
protected JdbcTemplate getJdbcTemplate()(Code)
Get the JdbcTemplate that is configured to be used



getSchemaName
public String getSchemaName()(Code)
Get the name of the schema for this insert



getTableName
public String getTableName()(Code)
Get the name of the table for this insert



isCompiled
public boolean isCompiled()(Code)
Is this operation "compiled"? whether this operation is compiled, and ready to use.



matchInParameterValuesWithInsertColumns
protected List<Object> matchInParameterValuesWithInsertColumns(SqlParameterSource parameterSource)(Code)
Match the provided in parameter values with regitered parameters and parameters defined via metedata processing.
Parameters:
  parameterSource - the parameter vakues provided as a SqlParameterSource Map with parameter names and values



matchInParameterValuesWithInsertColumns
protected List<Object> matchInParameterValuesWithInsertColumns(Map<String, Object> args)(Code)
Match the provided in parameter values with regitered parameters and parameters defined via metedata processing.
Parameters:
  args - the parameter values provided in a Map Map with parameter names and values



onCompileInternal
protected void onCompileInternal()(Code)
Hook method that subclasses may override to react to compilation. This implementation does nothing.



setCatalogName
public void setCatalogName(String catalogName)(Code)
Set the name of the catalog for this insert



setColumnNames
public void setColumnNames(List<String> columnNames)(Code)
Set the names of the columns to be used



setGeneratedKeyName
public void setGeneratedKeyName(String generatedKeyName)(Code)
Specify the name of a single generated key column



setGeneratedKeyNames
public void setGeneratedKeyNames(String[] generatedKeyNames)(Code)
Set the names of any generated keys



setSchemaName
public void setSchemaName(String schemaName)(Code)
Set the name of the schema for this insert



setTableName
public void setTableName(String tableName)(Code)
Set the name of the table for this insert



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.