Source Code Cross Referenced for SimpleJdbcCallOperations.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.SqlParameter;
022:        import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
023:        import org.springframework.jdbc.core.namedparam.SqlParameterSource;
024:
025:        /**
026:         * Interface specifying the API for a Simple JDBC Call implemented by {@link SimpleJdbcCall}.
027:         * This interface is not often used directly, but provides the
028:         * option to enhance testability, as it can easily be mocked or stubbed.
029:         *
030:         * @author Thomas Risberg
031:         * @since 2.5
032:         */
033:        public interface SimpleJdbcCallOperations {
034:
035:            /**
036:             * Specify the procedure name to be used - this implies that we will be calling a stored procedure.
037:             * @param procedureName the name of the stored procedure
038:             * @return the instance of this SimpleJdbcCall
039:             */
040:            SimpleJdbcCallOperations withProcedureName(String procedureName);
041:
042:            /**
043:             * Specify the procedure name to be used - this implies that we will be calling a stored function.
044:             * @param functionName the name of the stored function
045:             * @return the instance of this SimpleJdbcCall
046:             */
047:            SimpleJdbcCallOperations withFunctionName(String functionName);
048:
049:            /**
050:             * Optionally, specify the name of the schema that contins the stored procedure.
051:             * @param schemaName the name of the schema
052:             * @return the instance of this SimpleJdbcCall
053:             */
054:            SimpleJdbcCallOperations withSchemaName(String schemaName);
055:
056:            /**
057:             * Optionally, specify the name of the catalog that contins the stored procedure.
058:             * To provide consistency with the Oracle DatabaseMetaData, this is used to specify the package name if
059:             * the procedure is declared as part of a package.
060:             * @param catalogName the catalog or package name
061:             * @return the instance of this SimpleJdbcCall
062:             */
063:            SimpleJdbcCallOperations withCatalogName(String catalogName);
064:
065:            /**
066:             * Indicates the procedure's return value should be included in the results returned.
067:             * @return the instance of this SimpleJdbcCall
068:             */
069:            SimpleJdbcCallOperations withReturnValue();
070:
071:            /**
072:             * Specify one or more parameters if desired.  These parameters will be supplemented with any
073:             * parameter information retrieved from the database meta data.
074:             * @param sqlParameters the parameters to use
075:             * @return the instance of this SimpleJdbcCall
076:             */
077:            SimpleJdbcCallOperations declareParameters(
078:                    SqlParameter... sqlParameters);
079:
080:            /** Not used yet */
081:            SimpleJdbcCallOperations useInParameterNames(
082:                    String... inParameterNames);
083:
084:            /**
085:             * Used to specify when a ResultSet is returned by the stored procedure and you want it mapped
086:             * by a RowMapper.  The results will be returned using the parameter name specified.  Multiple
087:             * ResultSets must be declared in the correct order. If the database you are using uses ref cursors
088:             * then the name specified must match the name of the parameter declared for the procedure in the
089:             * database.
090:             * @param parameterName the name of the returned results and/or the name of the ref cursor parameter
091:             * @param rowMapper the RowMapper implementation that will map the data returned for each row
092:             * */
093:            SimpleJdbcCallOperations returningResultSet(String parameterName,
094:                    ParameterizedRowMapper rowMapper);
095:
096:            /**
097:             * Turn off any processing of parameter meta data information obtained via JDBC.
098:             * @return the instance of this SimpleJdbcCall
099:             */
100:            SimpleJdbcCallOperations withoutProcedureColumnMetaDataAccess();
101:
102:            /**
103:             * Execute the stored function and return the results obtained as an Object of the specified return type.
104:             * @param returnType the type of the value to return
105:             * @param args Map containing the parameter values to be used in the call.
106:             */
107:            <T> T executeFunction(Class<T> returnType, Map args);
108:
109:            /**
110:             * Execute the stored function and return the results obtained as an Object of the specified return type.
111:             * @param returnType the type of the value to return
112:             * @param args MapSqlParameterSource containing the parameter values to be used in the call.
113:             */
114:            <T> T executeFunction(Class<T> returnType,
115:                    MapSqlParameterSource args);
116:
117:            /**
118:             * Execute the stored procedure and return the single out parameter as an Object of the specified return type.
119:             * In the case where there are multiple out parameters, the first one is returned and additional out parameters
120:             * are ignored.
121:             * @param returnType the type of the value to return
122:             * @param args Map containing the parameter values to be used in the call.
123:             */
124:            <T> T executeObject(Class<T> returnType, Map args);
125:
126:            /**
127:             * Execute the stored procedure and return the single out parameter as an Object of the specified return type.
128:             * In the case where there are multiple out parameters, the first one is returned and additional out parameters
129:             * are ignored.
130:             * @param returnType the type of the value to return
131:             * @param args MapSqlParameterSource containing the parameter values to be used in the call.
132:             */
133:            <T> T executeObject(Class<T> returnType, MapSqlParameterSource args);
134:
135:            /**
136:             * Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations..
137:             * @return map of output params.
138:             */
139:            Map<String, Object> execute();
140:
141:            /**
142:             * Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations..
143:             * @param args Map containing the parameter values to be used in the call.
144:             * @return map of output params.
145:             */
146:            Map<String, Object> execute(Map<String, Object> args);
147:
148:            /**
149:             * Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations..
150:             * @param args SqlParameterSource containing the parameter values to be used in the call.
151:             * @return map of output params.
152:             */
153:            Map<String, Object> execute(SqlParameterSource args);
154:
155:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.