KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Derby - Class org.apache.derby.impl.jdbc.EmbedPreparedStatement30
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 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 JavaDoc;
30 import java.sql.SQLException JavaDoc;
31 import java.net.URL JavaDoc;
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
//
50
// CONSTRUCTORS
51
//
52
//////////////////////////////////////////////////////////////
53
/*
54         Constructor assumes caller will setup context stack
55         and restore it.
56         @exception SQLException on error
57      */

58     public EmbedPreparedStatement30 (EmbedConnection conn, String JavaDoc sql, boolean forMetaData,
59                                       int resultSetType, int resultSetConcurrency, int resultSetHoldability,
60                                       int autoGeneratedKeys, int[] columnIndexes, String JavaDoc[] columnNames)
61         throws SQLException JavaDoc {
62
63         super(conn, sql, forMetaData, resultSetType, resultSetConcurrency, resultSetHoldability,
64         autoGeneratedKeys, columnIndexes, columnNames);
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 JavaDoc getParameterMetaData()
78     throws SQLException JavaDoc
79     {
80       checkStatus();
81       return new EmbedParameterMetaData30(
82                 getParms(), preparedStatement.getParameterTypes());
83     }
84 }
85
86
Popular Tags