1 | /* |
2 | |
3 | Derby - Class org.apache.derby.impl.jdbc.EmbedPreparedStatement30 |
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 org.apache.derby.impl.jdbc.EmbedConnection; |
24 | import org.apache.derby.impl.jdbc.Util; |
25 | |
26 | import org.apache.derby.iapi.sql.ResultSet; |
27 | |
28 | import java.sql.ParameterMetaData; |
29 | import java.sql.SQLException; |
30 | import java.net.URL; |
31 | |
32 | /** |
33 | * This class extends the EmbedPreparedStatement20 class |
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 | * @see org.apache.derby.impl.jdbc.EmbedPreparedStatement |
42 | * |
43 | */ |
44 | public class EmbedPreparedStatement30 extends EmbedPreparedStatement20 |
45 | { |
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, boolean forMetaData, |
58 | int resultSetType, int resultSetConcurrency, int resultSetHoldability, |
59 | int autoGeneratedKeys, int[] columnIndexes, String[] columnNames) |
60 | throws SQLException { |
61 | |
62 | super(conn, sql, forMetaData, resultSetType, resultSetConcurrency, resultSetHoldability, |
63 | autoGeneratedKeys, columnIndexes, columnNames); |
64 | } |
65 | |
66 | /** |
67 | * JDBC 3.0 |
68 | * |
69 | * Retrieves the number, types and properties of this PreparedStatement |
70 | * object's parameters. |
71 | * |
72 | * @return a ParameterMetaData object that contains information about the |
73 | * number, types and properties of this PreparedStatement object's parameters. |
74 | * @exception SQLException if a database access error occurs |
75 | */ |
76 | public ParameterMetaData getParameterMetaData() |
77 | throws SQLException |
78 | { |
79 | checkStatus(); |
80 | return new EmbedParameterMetaData30( |
81 | getParms(), preparedStatement.getParameterTypes()); |
82 | } |
83 | } |
84 | |