1 | /* |
2 | |
3 | Derby - Class org.apache.derby.impl.jdbc.EmbedCallableStatement30 |
4 | |
5 | Copyright 2001, 2004 The Apache Software Foundation or its licensors, as applicable. |
6 | |
7 | Licensed under the Apache License, Version 2.0 (the "License"); |
8 | you may not use this file except in compliance with the License. |
9 | You may obtain a copy of the License at |
10 | |
11 | http://www.apache.org/licenses/LICENSE-2.0 |
12 | |
13 | Unless required by applicable law or agreed to in writing, software |
14 | distributed under the License is distributed on an "AS IS" BASIS, |
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | See the License for the specific language governing permissions and |
17 | limitations under the License. |
18 | |
19 | */ |
20 | |
21 | package org.apache.derby.impl.jdbc; |
22 | |
23 | import java.math.BigDecimal; |
24 | |
25 | import java.sql.ParameterMetaData; |
26 | import java.sql.SQLException; |
27 | |
28 | |
29 | import org.apache.derby.impl.jdbc.Util; |
30 | import org.apache.derby.impl.jdbc.EmbedConnection; |
31 | |
32 | |
33 | /** |
34 | * This class extends the EmbedCallableStatement20 |
35 | * in order to support new methods and classes that come with JDBC 3.0. |
36 | |
37 | <P><B>Supports</B> |
38 | <UL> |
39 | <LI> JDBC 3.0 - dependency on java.sql.ParameterMetaData introduced in JDBC 3.0 |
40 | </UL> |
41 | |
42 | * |
43 | * @see org.apache.derby.impl.jdbc.EmbedCallableStatement |
44 | * |
45 | */ |
46 | public class EmbedCallableStatement30 extends EmbedCallableStatement20 |
47 | { |
48 | |
49 | ////////////////////////////////////////////////////////////// |
50 | // |
51 | // CONSTRUCTORS |
52 | // |
53 | ////////////////////////////////////////////////////////////// |
54 | public EmbedCallableStatement30 (EmbedConnection conn, String sql, |
55 | int resultSetType, |
56 | int resultSetConcurrency, |
57 | int resultSetHoldability) |
58 | throws SQLException |
59 | { |
60 | super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability); |
61 | } |
62 | |
63 | /* |
64 | * Note: all the JDBC 3.0 Prepared statement methods are duplicated |
65 | * in here because this class inherits from Local20/EmbedCallableStatement, which |
66 | * inherits from Local/EmbedCallableStatement. This class should inherit from a |
67 | * local30/PreparedStatement. Since java does not allow multiple inheritance, |
68 | * duplicate the code here. |
69 | */ |
70 | |
71 | /** |
72 | * JDBC 3.0 |
73 | * |
74 | * Retrieves the number, types and properties of this PreparedStatement |
75 | * object's parameters. |
76 | * |
77 | * @return a ParameterMetaData object that contains information about the |
78 | * number, types and properties of this PreparedStatement object's parameters. |
79 | * @exception SQLException if a database access error occurs |
80 | */ |
81 | public ParameterMetaData getParameterMetaData() |
82 | throws SQLException |
83 | { |
84 | checkStatus(); |
85 | if (preparedStatement == null) |
86 | return null; |
87 | |
88 | return new EmbedParameterMetaData30( |
89 | getParms(), preparedStatement.getParameterTypes()); |
90 | } |
91 | |
92 | } |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | |