01: /*
02:
03: Derby - Class org.apache.derby.impl.jdbc.EmbedPreparedStatement30
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 org.apache.derby.impl.jdbc.EmbedConnection;
25: import org.apache.derby.impl.jdbc.Util;
26:
27: import org.apache.derby.iapi.sql.ResultSet;
28:
29: import java.sql.ParameterMetaData;
30: import java.sql.SQLException;
31: import java.net.URL;
32:
33: /**
34: * This class extends the EmbedPreparedStatement20 class
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: * @see org.apache.derby.impl.jdbc.EmbedPreparedStatement
43: *
44: */
45: public class EmbedPreparedStatement30 extends EmbedPreparedStatement20 {
46:
47: //////////////////////////////////////////////////////////////
48: //
49: // CONSTRUCTORS
50: //
51: //////////////////////////////////////////////////////////////
52: /*
53: Constructor assumes caller will setup context stack
54: and restore it.
55: @exception SQLException on error
56: */
57: public EmbedPreparedStatement30(EmbedConnection conn, String sql,
58: boolean forMetaData, int resultSetType,
59: int resultSetConcurrency, int resultSetHoldability,
60: int autoGeneratedKeys, int[] columnIndexes,
61: String[] columnNames) throws SQLException {
62:
63: super (conn, sql, forMetaData, resultSetType,
64: resultSetConcurrency, resultSetHoldability,
65: autoGeneratedKeys, columnIndexes, columnNames);
66: }
67:
68: /**
69: * JDBC 3.0
70: *
71: * Retrieves the number, types and properties of this PreparedStatement
72: * object's parameters.
73: *
74: * @return a ParameterMetaData object that contains information about the
75: * number, types and properties of this PreparedStatement object's parameters.
76: * @exception SQLException if a database access error occurs
77: */
78: public ParameterMetaData getParameterMetaData() throws SQLException {
79: checkStatus();
80: return new EmbedParameterMetaData30(getParms(),
81: preparedStatement.getParameterTypes());
82: }
83: }
|