KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > client > net > NetResultSet40


1 /*
2
3    Derby - Class org.apache.derby.client.net.NetResultSet40
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.client.net;
23
24 import java.io.InputStream JavaDoc;
25 import java.io.Reader JavaDoc;
26 import java.sql.NClob JavaDoc;
27 import java.sql.RowId JavaDoc;
28 import java.sql.SQLException JavaDoc;
29 import java.sql.SQLXML JavaDoc;
30 import org.apache.derby.client.am.SQLExceptionFactory;
31 import org.apache.derby.iapi.sql.ResultSet;
32 import org.apache.derby.client.am.Cursor;
33 import org.apache.derby.client.am.ClientMessageId;
34 import org.apache.derby.client.am.SqlException;
35 import org.apache.derby.shared.common.reference.SQLState;
36
37
38 public class NetResultSet40 extends NetResultSet{
39     
40     NetResultSet40(NetAgent netAgent,
41         NetStatement netStatement,
42         Cursor cursor,
43         int qryprctyp, //protocolType, CodePoint.FIXROWPRC |
44
// CodePoint.LMTBLKPRC
45
int sqlcsrhld, // holdOption, 0xF0 for false (default) | 0xF1 for true.
46
int qryattscr, // scrollOption, 0xF0 for false (default) | 0xF1 for true.
47
int qryattsns, // sensitivity, CodePoint.QRYUNK |
48
// CodePoint.QRYINS |
49
// CodePoint.QRYSNSSTC
50
int qryattset, // rowsetCursor, 0xF0 for false (default) | 0xF1 for true.
51
long qryinsid, // instanceIdentifier, 0 (if not returned, check default) or number
52
int actualResultSetType,
53         int actualResultSetConcurrency,
54         int actualResultSetHoldability) //throws DisconnectException
55
{
56         super(netAgent, netStatement, cursor, qryprctyp, sqlcsrhld, qryattscr,
57               qryattsns, qryattset, qryinsid, actualResultSetType,
58               actualResultSetConcurrency, actualResultSetHoldability);
59     }
60     
61     public Reader JavaDoc getNCharacterStream(int columnIndex)
62         throws SQLException JavaDoc {
63         throw SQLExceptionFactory.notImplemented("getNCharacterStream(int)");
64     }
65
66     public Reader JavaDoc getNCharacterStream(String JavaDoc columnName)
67         throws SQLException JavaDoc {
68         throw SQLExceptionFactory.notImplemented("getNCharacterStream(String)");
69     }
70
71     public String JavaDoc getNString(int columnIndex)
72         throws SQLException JavaDoc {
73         throw SQLExceptionFactory.notImplemented("getNString(int)");
74     }
75
76     public String JavaDoc getNString(String JavaDoc columnName)
77         throws SQLException JavaDoc {
78         throw SQLExceptionFactory.notImplemented("getNString(String)");
79     }
80     
81     public RowId JavaDoc getRowId(int columnIndex) throws SQLException JavaDoc {
82         throw SQLExceptionFactory.notImplemented ("getRowId (int)");
83     }
84     
85     
86     public RowId JavaDoc getRowId(String JavaDoc columnName) throws SQLException JavaDoc {
87         throw SQLExceptionFactory.notImplemented ("getRowId (String)");
88     }
89     
90     public void updateRowId(int columnIndex, RowId JavaDoc x) throws SQLException JavaDoc {
91         throw SQLExceptionFactory.notImplemented ("updateRowId (int, RowId)");
92     }
93     
94     public void updateRowId(String JavaDoc columnName, RowId JavaDoc x) throws SQLException JavaDoc {
95         throw SQLExceptionFactory.notImplemented ("updateRowId (String, RowId)");
96     }
97     
98     public void updateNString(int columnIndex, String JavaDoc nString) throws SQLException JavaDoc {
99         throw SQLExceptionFactory.notImplemented ("updateNString (int, String)");
100     }
101     
102     public void updateNString(String JavaDoc columnName, String JavaDoc nString) throws SQLException JavaDoc {
103         throw SQLExceptionFactory.notImplemented ("updateNString (String, String)");
104     }
105     
106     public void updateNCharacterStream(int columnIndex, Reader JavaDoc x, long length)
107         throws SQLException JavaDoc {
108         throw SQLExceptionFactory.notImplemented(
109                 "updateNCharacterStream(int,Reader,long)");
110     }
111     
112     public void updateNCharacterStream(String JavaDoc columnName, Reader JavaDoc x, long length)
113         throws SQLException JavaDoc {
114         throw SQLExceptionFactory.notImplemented(
115                 "updateNCharacterStream(String,Reader,long)");
116     }
117     
118     public void updateNClob(int columnIndex, NClob JavaDoc nClob) throws SQLException JavaDoc {
119         throw SQLExceptionFactory.notImplemented ("updateNClob (int, NClob)");
120     }
121     
122     public void updateNClob(String JavaDoc columnName, NClob JavaDoc nClob) throws SQLException JavaDoc {
123         throw SQLExceptionFactory.notImplemented ("updateNClob (String, NClob)");
124     }
125     
126     public NClob JavaDoc getNClob(int i) throws SQLException JavaDoc {
127         throw SQLExceptionFactory.notImplemented ("getNClob (int)");
128     }
129     
130     public NClob JavaDoc getNClob(String JavaDoc colName) throws SQLException JavaDoc {
131         throw SQLExceptionFactory.notImplemented ("getNClob (String)");
132     }
133     
134     public SQLXML JavaDoc getSQLXML(int columnIndex) throws SQLException JavaDoc {
135         throw SQLExceptionFactory.notImplemented ("getSQLXML (int)");
136     }
137     
138     public SQLXML JavaDoc getSQLXML(String JavaDoc colName) throws SQLException JavaDoc {
139         throw SQLExceptionFactory.notImplemented ("getSQLXML (String)");
140     }
141     
142     public void updateSQLXML(int columnIndex, SQLXML JavaDoc xmlObject) throws SQLException JavaDoc {
143         throw SQLExceptionFactory.notImplemented ("updateSQLXML (int, SQLXML)");
144     }
145     
146     public void updateSQLXML(String JavaDoc columnName, SQLXML JavaDoc xmlObject) throws SQLException JavaDoc {
147         throw SQLExceptionFactory.notImplemented ("updateSQLXML (String, SQLXML)");
148     }
149     
150     /**
151      * Returns false unless <code>interfaces</code> is implemented
152      *
153      * @param interfaces a Class defining an interface.
154      * @return true if this implements the interface or
155      * directly or indirectly wraps an object
156      * that does.
157      * @throws java.sql.SQLException if an error occurs while determining
158      * whether this is a wrapper for an object
159      * with the given interface.
160      */

161     public boolean isWrapperFor(Class JavaDoc<?> interfaces) throws SQLException JavaDoc {
162         try {
163             checkForClosedResultSet();
164         } catch (SqlException se) {
165             throw se.getSQLException();
166         }
167         return interfaces.isInstance(this);
168     }
169     
170     /**
171      * Returns <code>this</code> if this class implements the interface
172      *
173      * @param interfaces a Class defining an interface
174      * @return an object that implements the interface
175      * @throws java.sql.SQLExption if no object if found that implements the
176      * interface
177      */

178     public <T> T unwrap(java.lang.Class JavaDoc<T> interfaces)
179                                    throws SQLException JavaDoc {
180         try {
181             checkForClosedResultSet();
182             return interfaces.cast(this);
183         } catch (ClassCastException JavaDoc cce) {
184             throw new SqlException(null,
185                 new ClientMessageId(SQLState.UNABLE_TO_UNWRAP),
186                 interfaces).getSQLException();
187         } catch (SqlException se) {
188             throw se.getSQLException();
189         }
190     }
191     
192     /**
193      * Updates the designated column with a java.sql.Blob value. The updater
194      * methods are used to update column values in the current row or the insert
195      * row. The updater methods do not update the underlying database; instead
196      * the updateRow or insertRow methods are called to update the database.
197      *
198      * @param columnIndex -
199      * the first column is 1, the second is 2
200      * @param x -
201      * the new column value
202      * @param length -
203      * the length of the Blob datatype
204      * @exception SQLException
205      *
206      */

207     public void updateBlob(int columnIndex, InputStream JavaDoc x, long length)
208                             throws SQLException JavaDoc {
209         throw SQLExceptionFactory.notImplemented("updateBlob(int,InputStream,long)");
210     }
211
212     /**
213      * Updates the designated column with a java.sql.Blob value. The updater
214      * methods are used to update column values in the current row or the insert
215      * row. The updater methods do not update the underlying database; instead
216      * the updateRow or insertRow methods are called to update the database.
217      *
218      * @param columnName -
219      * the name of the column to be updated
220      * @param x -
221      * the new column value
222      * @param length -
223      * the length of the Blob datatype
224      * @exception SQLException
225      *
226      */

227
228     public void updateBlob(String JavaDoc columnName, InputStream JavaDoc x, long length)
229                            throws SQLException JavaDoc {
230         throw SQLExceptionFactory.notImplemented("updateBlob(String,inputStream,long)");
231     }
232
233     /**
234      * Updates the designated column with a java.sql.Clob value. The updater
235      * methods are used to update column values in the current row or the insert
236      * row. The updater methods do not update the underlying database; instead
237      * the updateRow or insertRow methods are called to update the database.
238      *
239      * @param columnIndex -
240      * the first column is 1, the second is 2
241      * @param x -
242      * the new column value
243      * @exception SQLException
244      * Feature not implemented for now.
245      */

246     public void updateClob(int columnIndex, Reader JavaDoc x, long length)
247                 throws SQLException JavaDoc {
248         throw SQLExceptionFactory.notImplemented("updateClob(int,Reader,long)");
249     }
250
251     /**
252      * Updates the designated column with a java.sql.Clob value. The updater
253      * methods are used to update column values in the current row or the insert
254      * row. The updater methods do not update the underlying database; instead
255      * the updateRow or insertRow methods are called to update the database.
256      *
257      * @param columnName -
258      * the name of the Clob column
259      * @param x -
260      * the new column value
261      * @exception SQLException
262      * Feature not implemented for now.
263      */

264
265      public void updateClob(String JavaDoc columnName, InputStream JavaDoc x, long length)
266                            throws SQLException JavaDoc {
267          throw SQLExceptionFactory.notImplemented("updateClob(String,InputStream,long)");
268      }
269
270      /**
271      * Updates the designated column with a java.sql.Clob value. The updater
272      * methods are used to update column values in the current row or the insert
273      * row. The updater methods do not update the underlying database; instead
274      * the updateRow or insertRow methods are called to update the database.
275      *
276      * @param columnName -
277      * the name of the Clob column
278      * @param x -
279      * the new column value
280      * @exception SQLException
281      * Feature not implemented for now.
282      */

283
284      public void updateClob(String JavaDoc columnName, Reader JavaDoc x, long length)
285                            throws SQLException JavaDoc {
286          throw SQLExceptionFactory.notImplemented("updateClob(String,Reader,long)");
287      }
288
289      /**
290      * Updates the designated column with a java.sql.NClob value. The updater
291      * methods are used to update column values in the current row or the insert
292      * row. The updater methods do not update the underlying database; instead
293      * the updateRow or insertRow methods are called to update the database.
294      *
295      * @param columnIndex -
296      * the first column is 1, the second is 2
297      * @param x -
298      * the new column value
299      * @exception SQLException
300      * Feature not implemented for now.
301      */

302     public void updateNClob(int columnIndex, Reader JavaDoc x, long length)
303                 throws SQLException JavaDoc {
304         throw SQLExceptionFactory.notImplemented("updateNClob(int,Reader,long)");
305     }
306
307     /**
308      * Updates the designated column with a java.sql.NClob value. The updater
309      * methods are used to update column values in the current row or the insert
310      * row. The updater methods do not update the underlying database; instead
311      * the updateRow or insertRow methods are called to update the database.
312      *
313      * @param columnName -
314      * the name of the Clob column
315      * @param x -
316      * the new column value
317      * @exception SQLException
318      * Feature not implemented for now.
319      */

320
321      public void updateNClob(String JavaDoc columnName, InputStream JavaDoc x, long length)
322                            throws SQLException JavaDoc {
323          throw SQLExceptionFactory.notImplemented("updateNClob(String,InputStream,long)");
324      }
325
326      /**
327      * Updates the designated column with a java.sql.NClob value. The updater
328      * methods are used to update column values in the current row or the insert
329      * row. The updater methods do not update the underlying database; instead
330      * the updateRow or insertRow methods are called to update the database.
331      *
332      * @param columnName -
333      * the name of the Clob column
334      * @param x -
335      * the new column value
336      * @exception SQLException
337      * Feature not implemented for now.
338      */

339
340      public void updateNClob(String JavaDoc columnName, Reader JavaDoc x, long length)
341                            throws SQLException JavaDoc {
342          throw SQLExceptionFactory.notImplemented("updateNClob(String,Reader,long)");
343      }
344 }
345
Popular Tags