KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > jdbc > EmbedCallableStatement30


1 /*
2
3    Derby - Class org.apache.derby.impl.jdbc.EmbedCallableStatement30
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.impl.jdbc;
23
24 import java.math.BigDecimal JavaDoc;
25
26 import java.sql.ParameterMetaData JavaDoc;
27 import java.sql.SQLException JavaDoc;
28
29
30 import org.apache.derby.impl.jdbc.Util;
31 import org.apache.derby.impl.jdbc.EmbedConnection;
32
33
34 /**
35  * This class extends the EmbedCallableStatement20
36  * in order to support new methods and classes that come with JDBC 3.0.
37
38   <P><B>Supports</B>
39    <UL>
40    <LI> JDBC 3.0 - dependency on java.sql.ParameterMetaData introduced in JDBC 3.0
41    </UL>
42
43   *
44  * @see org.apache.derby.impl.jdbc.EmbedCallableStatement
45  *
46  */

47 public class EmbedCallableStatement30 extends EmbedCallableStatement20
48 {
49
50     //////////////////////////////////////////////////////////////
51
//
52
// CONSTRUCTORS
53
//
54
//////////////////////////////////////////////////////////////
55
public EmbedCallableStatement30 (EmbedConnection conn, String JavaDoc sql,
56                                    int resultSetType,
57                                    int resultSetConcurrency,
58                                    int resultSetHoldability)
59         throws SQLException JavaDoc
60     {
61         super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability);
62     }
63
64     /*
65      * Note: all the JDBC 3.0 Prepared statement methods are duplicated
66      * in here because this class inherits from Local20/EmbedCallableStatement, which
67      * inherits from Local/EmbedCallableStatement. This class should inherit from a
68      * local30/PreparedStatement. Since java does not allow multiple inheritance,
69      * duplicate the code here.
70      */

71
72     /**
73     * JDBC 3.0
74     *
75     * Retrieves the number, types and properties of this PreparedStatement
76     * object's parameters.
77     *
78     * @return a ParameterMetaData object that contains information about the
79     * number, types and properties of this PreparedStatement object's parameters.
80     * @exception SQLException if a database access error occurs
81     */

82     public ParameterMetaData JavaDoc getParameterMetaData()
83     throws SQLException JavaDoc
84     {
85         checkStatus();
86         if (preparedStatement == null)
87             return null;
88         
89         return new EmbedParameterMetaData30(
90                 getParms(), preparedStatement.getParameterTypes());
91     }
92
93 }
94
95
96
97
98
99
100
101
102
103
104
105
Popular Tags