KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > jdbc > core > SqlInOutParameter


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.jdbc.core;
18
19 /**
20  * Subclass of SqlOutParameter to represent an INOUT parameter.
21  * Will always return true for "isInputValueProvided" test.
22  *
23  * <p>Output parameters - like all stored procedure parameters -
24  * must have names.
25  *
26  * @author Thomas Risberg
27  * @author Juergen Hoeller
28  * @since 2.0
29  */

30 public class SqlInOutParameter extends SqlOutParameter {
31
32     /**
33      * Create a new SqlInOutParameter.
34      * @param name name of the parameter, as used in input and output maps
35      * @param sqlType SQL type of the parameter according to java.sql.Types
36      */

37     public SqlInOutParameter(String JavaDoc name, int sqlType) {
38         super(name, sqlType);
39     }
40
41     /**
42      * Create a new SqlInOutParameter.
43      * @param name name of the parameter, as used in input and output maps
44      * @param sqlType SQL type of the parameter according to java.sql.Types
45      * @param typeName the type name of the parameter (optional)
46      */

47     public SqlInOutParameter(String JavaDoc name, int sqlType, String JavaDoc typeName) {
48         super(name, sqlType, typeName);
49     }
50
51     /**
52      * Create a new SqlInOutParameter.
53      * @param name name of the parameter, as used in input and output maps
54      * @param sqlType SQL type of the parameter according to java.sql.Types
55      * @param typeName the type name of the parameter (optional)
56      * @param sqlReturnType custom value handler for complex type (optional)
57      */

58     public SqlInOutParameter(String JavaDoc name, int sqlType, String JavaDoc typeName, SqlReturnType sqlReturnType) {
59         super(name, sqlType, typeName, sqlReturnType);
60     }
61
62     /**
63      * Create a new SqlInOutParameter.
64      * @param name name of the parameter, as used in input and output maps
65      * @param sqlType SQL type of the parameter according to java.sql.Types
66      * @param rse ResultSetExtractor to use for parsing the ResultSet
67      */

68     public SqlInOutParameter(String JavaDoc name, int sqlType, ResultSetExtractor rse) {
69         super(name, sqlType, rse);
70     }
71
72     /**
73      * Create a new SqlInOutParameter.
74      * @param name name of the parameter, as used in input and output maps
75      * @param sqlType SQL type of the parameter according to java.sql.Types
76      * @param rch RowCallbackHandler to use for parsing the ResultSet
77      */

78     public SqlInOutParameter(String JavaDoc name, int sqlType, RowCallbackHandler rch) {
79         super(name, sqlType, rch);
80     }
81
82     /**
83      * Create a new SqlInOutParameter.
84      * @param name name of the parameter, as used in input and output maps
85      * @param sqlType SQL type of the parameter according to java.sql.Types
86      * @param rm RowMapper to use for parsing the ResultSet
87      */

88     public SqlInOutParameter(String JavaDoc name, int sqlType, RowMapper rm) {
89         super(name, sqlType, rm);
90     }
91
92
93     /**
94      * This implementation always returns <code>true</code>.
95      */

96     public boolean isInputValueProvided() {
97         return true;
98     }
99
100 }
101
Popular Tags