01: /*
02:
03: Derby - Class org.apache.derby.impl.jdbc.EmbedCallableStatement30
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (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;
25:
26: import java.sql.ParameterMetaData;
27: import java.sql.SQLException;
28:
29: import org.apache.derby.impl.jdbc.Util;
30: import org.apache.derby.impl.jdbc.EmbedConnection;
31:
32: /**
33: * This class extends the EmbedCallableStatement20
34: * in order to support new methods and classes that come with JDBC 3.0.
35:
36: <P><B>Supports</B>
37: <UL>
38: <LI> JDBC 3.0 - dependency on java.sql.ParameterMetaData introduced in JDBC 3.0
39: </UL>
40:
41: *
42: * @see org.apache.derby.impl.jdbc.EmbedCallableStatement
43: *
44: */
45: public class EmbedCallableStatement30 extends EmbedCallableStatement20 {
46:
47: //////////////////////////////////////////////////////////////
48: //
49: // CONSTRUCTORS
50: //
51: //////////////////////////////////////////////////////////////
52: public EmbedCallableStatement30(EmbedConnection conn, String sql,
53: int resultSetType, int resultSetConcurrency,
54: int resultSetHoldability) throws SQLException {
55: super (conn, sql, resultSetType, resultSetConcurrency,
56: resultSetHoldability);
57: }
58:
59: /*
60: * Note: all the JDBC 3.0 Prepared statement methods are duplicated
61: * in here because this class inherits from Local20/EmbedCallableStatement, which
62: * inherits from Local/EmbedCallableStatement. This class should inherit from a
63: * local30/PreparedStatement. Since java does not allow multiple inheritance,
64: * duplicate the code here.
65: */
66:
67: /**
68: * JDBC 3.0
69: *
70: * Retrieves the number, types and properties of this PreparedStatement
71: * object's parameters.
72: *
73: * @return a ParameterMetaData object that contains information about the
74: * number, types and properties of this PreparedStatement object's parameters.
75: * @exception SQLException if a database access error occurs
76: */
77: public ParameterMetaData getParameterMetaData() throws SQLException {
78: checkStatus();
79: if (preparedStatement == null)
80: return null;
81:
82: return new EmbedParameterMetaData30(getParms(),
83: preparedStatement.getParameterTypes());
84: }
85:
86: }
|