001: /* =============================================================
002: * SmallSQL : a free Java DBMS library for the Java(tm) platform
003: * =============================================================
004: *
005: * (C) Copyright 2004-2007, by Volker Berlin.
006: *
007: * Project Info: http://www.smallsql.de/
008: *
009: * This library is free software; you can redistribute it and/or modify it
010: * under the terms of the GNU Lesser General Public License as published by
011: * the Free Software Foundation; either version 2.1 of the License, or
012: * (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful, but
015: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
016: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
017: * License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
022: * USA.
023: *
024: * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
025: * in the United States and other countries.]
026: *
027: * ---------------
028: * StoreNoCurrentRow.java
029: * ---------------
030: * Author: Volker Berlin
031: *
032: */
033: package smallsql.database;
034:
035: import java.sql.*;
036: import smallsql.database.language.Language;
037:
038: /*
039: * @author Volker Berlin
040: *
041: * This store is used if the row pointer is before or after the rows.
042: */
043: public class StoreNoCurrentRow extends Store {
044:
045: private SQLException noCurrentRow() {
046: return SmallSQLException.create(Language.ROW_NOCURRENT);
047: }
048:
049: boolean isNull(int offset) throws SQLException {
050: throw noCurrentRow();
051: }
052:
053: boolean getBoolean(int offset, int dataType) throws Exception {
054: throw noCurrentRow();
055: }
056:
057: byte[] getBytes(int offset, int dataType) throws Exception {
058: throw noCurrentRow();
059: }
060:
061: double getDouble(int offset, int dataType) throws Exception {
062: throw noCurrentRow();
063: }
064:
065: float getFloat(int offset, int dataType) throws Exception {
066: throw noCurrentRow();
067: }
068:
069: int getInt(int offset, int dataType) throws Exception {
070: throw noCurrentRow();
071: }
072:
073: long getLong(int offset, int dataType) throws Exception {
074: throw noCurrentRow();
075: }
076:
077: long getMoney(int offset, int dataType) throws Exception {
078: throw noCurrentRow();
079: }
080:
081: MutableNumeric getNumeric(int offset, int dataType)
082: throws Exception {
083: throw noCurrentRow();
084: }
085:
086: Object getObject(int offset, int dataType) throws Exception {
087: throw noCurrentRow();
088: }
089:
090: String getString(int offset, int dataType) throws Exception {
091: throw noCurrentRow();
092: }
093:
094: void scanObjectOffsets(int[] offsets, int[] dataTypes) {
095: // TODO Auto-generated method stub
096:
097: }
098:
099: int getUsedSize() {
100: // TODO Auto-generated method stub
101: return 0;
102: }
103:
104: long getNextPagePos() {
105: //TODO
106: return -1;
107: }
108:
109: void deleteRow(SSConnection con) throws SQLException {
110: throw noCurrentRow();
111: }
112: }
|