KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > smallsql > database > StoreNoCurrentRow


1 /* =============================================================
2  * SmallSQL : a free Java DBMS library for the Java(tm) platform
3  * =============================================================
4  *
5  * (C) Copyright 2004-2006, by Volker Berlin.
6  *
7  * Project Info: http://www.smallsql.de/
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22  * USA.
23  *
24  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25  * in the United States and other countries.]
26  *
27  * ---------------
28  * StoreNoCurrentRow.java
29  * ---------------
30  * Author: Volker Berlin
31  *
32  */

33 package smallsql.database;
34
35 import java.sql.*;
36
37 /*
38  * @author Volker Berlin
39  *
40  * This store is used if the row pointer is before or after the rows.
41  */

42 public class StoreNoCurrentRow extends Store {
43
44     private SQLException noCurrentRow(){
45         return Utils.createSQLException("No current row.");
46     }
47
48
49     boolean isNull(int offset) throws SQLException {
50         throw noCurrentRow();
51     }
52
53
54     boolean getBoolean(int offset, int dataType) throws Exception JavaDoc {
55         throw noCurrentRow();
56     }
57
58
59     byte[] getBytes(int offset, int dataType) throws Exception JavaDoc {
60         throw noCurrentRow();
61     }
62
63
64     double getDouble(int offset, int dataType) throws Exception JavaDoc {
65         throw noCurrentRow();
66     }
67
68
69     float getFloat(int offset, int dataType) throws Exception JavaDoc {
70         throw noCurrentRow();
71     }
72
73
74     int getInt(int offset, int dataType) throws Exception JavaDoc {
75         throw noCurrentRow();
76     }
77
78
79     long getLong(int offset, int dataType) throws Exception JavaDoc {
80         throw noCurrentRow();
81     }
82
83
84     long getMoney(int offset, int dataType) throws Exception JavaDoc {
85         throw noCurrentRow();
86     }
87
88
89     MutableNumeric getNumeric(int offset, int dataType) throws Exception JavaDoc {
90         throw noCurrentRow();
91     }
92
93
94     Object JavaDoc getObject(int offset, int dataType) throws Exception JavaDoc {
95         throw noCurrentRow();
96     }
97
98
99     String JavaDoc getString(int offset, int dataType) throws Exception JavaDoc {
100         throw noCurrentRow();
101     }
102
103
104
105     void scanObjectOffsets(int[] offsets, int[] dataTypes) {
106         // TODO Auto-generated method stub
107

108     }
109
110
111     int getUsedSize() {
112         // TODO Auto-generated method stub
113
return 0;
114     }
115
116     long getNextPagePos(){
117         //TODO
118
return -1;
119     }
120     
121     void deleteRow(SSConnection con) throws SQLException{
122         throw noCurrentRow();
123     }
124 }
125
Popular Tags