Source Code Cross Referenced for SimpleJdbcInsertOperations.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2002-2007 the original author or authors.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:
017:        package org.springframework.jdbc.core.simple;
018:
019:        import java.util.Map;
020:
021:        import org.springframework.jdbc.core.namedparam.SqlParameterSource;
022:        import org.springframework.jdbc.support.KeyHolder;
023:
024:        /**
025:         * Interface specifying the API for a Simple JDBC Insert implemented by {@link SimpleJdbcInsert}.
026:         * This interface is not often used directly, but provides the
027:         * option to enhance testability, as it can easily be mocked or stubbed.
028:         *
029:         * @author Thomas Risberg
030:         * @since 2.5
031:         */
032:        public interface SimpleJdbcInsertOperations {
033:
034:            /**
035:             * Specify the table name to be used for the insert.
036:             * @param tableName the name of the stored table
037:             * @return the instance of this SimpleJdbcInsert
038:             */
039:            SimpleJdbcInsertOperations withTableName(String tableName);
040:
041:            /**
042:             * Specify the shema name, if any, to be used for the insert.
043:             * @param schemaName the name of the schema
044:             * @return the instance of this SimpleJdbcInsert
045:             */
046:            SimpleJdbcInsertOperations withSchemaName(String schemaName);
047:
048:            /**
049:             * Specify the catalog name, if any, to be used for the insert.
050:             * @param catalogName the name of the catalog
051:             * @return the instance of this SimpleJdbcInsert
052:             */
053:            SimpleJdbcInsertOperations withCatalogName(String catalogName);
054:
055:            /**
056:             * Specify the column names that the insert statement should be limited to use.
057:             * @param columnNames one or more column names
058:             * @return the instance of this SimpleJdbcInsert
059:             */
060:            SimpleJdbcInsertOperations usingColumns(String... columnNames);
061:
062:            /**
063:             * Specify the name sof any columns that have auto generated keys.
064:             * @param columnNames one or more column names
065:             * @return the instance of this SimpleJdbcInsert
066:             */
067:            SimpleJdbcInsertOperations usingGeneratedKeyColumns(
068:                    String... columnNames);
069:
070:            /**
071:             * Execute the insert using the values passed in.
072:             * @param args Map containing column names and corresponding value
073:             * @return the number of rows affected as returned by the JDBC driver
074:             */
075:            int execute(Map<String, Object> args);
076:
077:            /**
078:             * Execute the insert using the values passed in.
079:             * @param parameterSource SqlParameterSource containing values to use for insert
080:             * @return the number of rows affected as returned by the JDBC driver
081:             */
082:            int execute(SqlParameterSource parameterSource);
083:
084:            /**
085:             * Execute the insert using the values passed in and return the generated key.  This requires that
086:             * the name of the columns with auto generated keys have been specified. This method will always
087:             * return a key or throw an exception if a key was not returned.
088:             * @param args Map containing column names and corresponding value
089:             * @return the generated key value
090:             */
091:            Number executeAndReturnKey(Map<String, Object> args);
092:
093:            /**
094:             * Execute the insert using the values passed in and return the generated key.  This requires that
095:             * the name of the columns with auto generated keys have been specified. This method will always
096:             * return a key or throw an exception if a key was not returned.
097:             * @param parameterSource SqlParameterSource containing values to use for insert
098:             * @return the generated key value.
099:             */
100:            Number executeAndReturnKey(SqlParameterSource parameterSource);
101:
102:            /**
103:             * Execute the insert using the values passed in and return the generated keys.  This requires that
104:             * the name of the columns with auto generated keys have been specified. This method will always return
105:             * a KeyHolder but the caller must verify that it actually contains the generated keys.
106:             * @param args Map containing column names and corresponding value
107:             * @return the KeyHolder containing all generated keys
108:             */
109:            KeyHolder executeAndReturnKeyHolder(Map<String, Object> args);
110:
111:            /**
112:             * Execute the insert using the values passed in and return the generated keys.  This requires that
113:             * the name of the columns with auto generated keys have been specified. This method will always return
114:             * a KeyHolder but the caller must verify that it actually contains the generated keys.
115:             * @param parameterSource SqlParameterSource containing values to use for insert
116:             * @return the KeyHolder containing all generated keys
117:             */
118:            KeyHolder executeAndReturnKeyHolder(
119:                    SqlParameterSource parameterSource);
120:
121:            /**
122:             * Execute a batch insert using the batch of values passed in.
123:             * @param batch an array of Maps containing a batch of column names and corresponding value
124:             * @return the array of number of rows affected as returned by the JDBC driver
125:             */
126:            int[] executeBatch(Map<String, Object>[] batch);
127:
128:            /**
129:             * Execute a batch insert using the batch of values passed in.
130:             * @param batch an array of SqlParameterSource containing values for the batch
131:             * @return the array of number of rows affected as returned by the JDBC driver
132:             */
133:            int[] executeBatch(SqlParameterSource[] batch);
134:
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.