KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  
3    Derby - Class org.apache.derby.impl.jdbc.EmbedResultSet40
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.iapi.sql.ResultSet;
25
26 import java.io.Reader JavaDoc;
27 import java.sql.NClob JavaDoc;
28 import java.sql.RowId JavaDoc;
29 import java.sql.SQLException JavaDoc;
30 import java.sql.SQLXML JavaDoc;
31 import java.sql.Statement JavaDoc;
32
33 import org.apache.derby.iapi.reference.SQLState;
34
35 /**
36  * JDBC 4 specific methods that cannot be implemented in superclasses and
37  * unimplemented JDBC 4 methods.
38  * In general, the implementations should be pushed to the superclasses. This
39  * is not possible if the methods use objects or features not available in the
40  * Java version associated with the earlier JDBC version, since Derby classes
41  * are compiled with the lowest possible Java version.
42  */

43 public class EmbedResultSet40 extends org.apache.derby.impl.jdbc.EmbedResultSet20{
44     
45     /** Creates a new instance of EmbedResultSet40 */
46     public EmbedResultSet40(org.apache.derby.impl.jdbc.EmbedConnection conn,
47         ResultSet resultsToWrap,
48         boolean forMetaData,
49         org.apache.derby.impl.jdbc.EmbedStatement stmt,
50         boolean isAtomic)
51         throws SQLException JavaDoc {
52         
53         super(conn, resultsToWrap, forMetaData, stmt, isAtomic);
54     }
55     
56     public RowId JavaDoc getRowId(int columnIndex) throws SQLException JavaDoc {
57         throw Util.notImplemented();
58     }
59     
60     
61     public RowId JavaDoc getRowId(String JavaDoc columnName) throws SQLException JavaDoc {
62         throw Util.notImplemented();
63     }
64
65     public void updateNCharacterStream(int columnIndex, Reader JavaDoc x)
66             throws SQLException JavaDoc {
67         throw Util.notImplemented();
68     }
69
70     public void updateNCharacterStream(int columnIndex, Reader JavaDoc x, long length)
71         throws SQLException JavaDoc {
72         throw Util.notImplemented();
73     }
74
75     public void updateNCharacterStream(String JavaDoc columnName, Reader JavaDoc x)
76             throws SQLException JavaDoc {
77         throw Util.notImplemented();
78     }
79
80     public void updateNCharacterStream(String JavaDoc columnName, Reader JavaDoc x, long length)
81         throws SQLException JavaDoc {
82         throw Util.notImplemented();
83     }
84
85     public void updateNString(int columnIndex, String JavaDoc nString) throws SQLException JavaDoc {
86         throw Util.notImplemented();
87     }
88     
89     public void updateNString(String JavaDoc columnName, String JavaDoc nString) throws SQLException JavaDoc {
90         throw Util.notImplemented();
91     }
92     
93     public void updateNClob(int columnIndex, NClob JavaDoc nClob) throws SQLException JavaDoc {
94         throw Util.notImplemented();
95     }
96
97     public void updateNClob(int columnIndex, Reader JavaDoc reader)
98             throws SQLException JavaDoc {
99         throw Util.notImplemented();
100     }
101     
102     public void updateNClob(String JavaDoc columnName, NClob JavaDoc nClob) throws SQLException JavaDoc {
103         throw Util.notImplemented();
104     }
105
106     public void updateNClob(String JavaDoc columnName, Reader JavaDoc reader)
107             throws SQLException JavaDoc {
108         throw Util.notImplemented();
109     }
110
111     public Reader JavaDoc getNCharacterStream(int columnIndex) throws SQLException JavaDoc {
112         throw Util.notImplemented();
113     }
114     
115     public Reader JavaDoc getNCharacterStream(String JavaDoc columnName) throws SQLException JavaDoc {
116         throw Util.notImplemented();
117     }
118
119     public NClob JavaDoc getNClob(int i) throws SQLException JavaDoc {
120         throw Util.notImplemented();
121     }
122     
123     public NClob JavaDoc getNClob(String JavaDoc colName) throws SQLException JavaDoc {
124         throw Util.notImplemented();
125     }
126     
127     public String JavaDoc getNString(int columnIndex) throws SQLException JavaDoc {
128         throw Util.notImplemented();
129     }
130     
131     public String JavaDoc getNString(String JavaDoc columnName) throws SQLException JavaDoc {
132         throw Util.notImplemented();
133     }
134
135     public void updateRowId(int columnIndex, RowId JavaDoc x) throws SQLException JavaDoc {
136         throw Util.notImplemented();
137     }
138
139     public void updateRowId(String JavaDoc columnName, RowId JavaDoc x) throws SQLException JavaDoc {
140         throw Util.notImplemented();
141     }
142
143     public SQLXML JavaDoc getSQLXML(int columnIndex) throws SQLException JavaDoc {
144         throw Util.notImplemented();
145     }
146     
147     public SQLXML JavaDoc getSQLXML(String JavaDoc colName) throws SQLException JavaDoc {
148         throw Util.notImplemented();
149     }
150     
151     public void updateSQLXML(int columnIndex, SQLXML JavaDoc xmlObject) throws SQLException JavaDoc {
152         throw Util.notImplemented();
153     }
154     
155     public void updateSQLXML(String JavaDoc columnName, SQLXML JavaDoc xmlObject) throws SQLException JavaDoc {
156         throw Util.notImplemented();
157     }
158     
159     /**
160      * Returns false unless <code>interfaces</code> is implemented
161      *
162      * @param interfaces a Class defining an interface.
163      * @return true if this implements the interface or
164      * directly or indirectly wraps an object
165      * that does.
166      * @throws java.sql.SQLException if an error occurs while determining
167      * whether this is a wrapper for an object
168      * with the given interface.
169      */

170     public boolean isWrapperFor(Class JavaDoc<?> interfaces) throws SQLException JavaDoc {
171         checkIfClosed("isWrapperFor");
172         return interfaces.isInstance(this);
173     }
174     
175     /**
176      * Returns <code>this</code> if this class implements the interface
177      *
178      * @param interfaces a Class defining an interface
179      * @return an object that implements the interface
180      * @throws java.sql.SQLExption if no object if found that implements the
181      * interface
182      */

183     public <T> T unwrap(java.lang.Class JavaDoc<T> interfaces)
184                             throws SQLException JavaDoc{
185         checkIfClosed("unwrap");
186         //Derby does not implement non-standard methods on
187
//JDBC objects
188
//hence return this if this class implements the interface
189
//or throw an SQLException
190
try {
191             return interfaces.cast(this);
192         } catch (ClassCastException JavaDoc cce) {
193             throw newSQLException(SQLState.UNABLE_TO_UNWRAP,interfaces);
194         }
195     }
196     
197     /**
198      *
199      * Updates the designated column using the given Reader object,
200      * which is the given number of characters long.
201      *
202      * @param columnIndex -
203      * the first column is 1, the second is 2
204      * @param x -
205      * the new column value
206      * @param length -
207      * the length of the stream
208      *
209      * @exception SQLException
210      * Feature not implemented for now.
211      */

212     public void updateNClob(int columnIndex, Reader JavaDoc x, long length)
213     throws SQLException JavaDoc {
214         throw Util.notImplemented();
215     }
216
217     /**
218      * Updates the designated column using the given Reader object,
219      * which is the given number of characters long.
220      *
221      * @param columnName -
222      * the Name of the column to be updated
223      * @param x -
224      * the new column value
225      * @param length -
226      * the length of the stream
227      *
228      * @exception SQLException
229      * Feature not implemented for now.
230      *
231      */

232     public void updateNClob(String JavaDoc columnName, Reader JavaDoc x, long length)
233     throws SQLException JavaDoc{
234         throw Util.notImplemented();
235     }
236 }
237
Popular Tags