001: /* Copyright (c) 2001-2005, The HSQL Development Group
002: * All rights reserved.
003: *
004: * Redistribution and use in source and binary forms, with or without
005: * modification, are permitted provided that the following conditions are met:
006: *
007: * Redistributions of source code must retain the above copyright notice, this
008: * list of conditions and the following disclaimer.
009: *
010: * Redistributions in binary form must reproduce the above copyright notice,
011: * this list of conditions and the following disclaimer in the documentation
012: * and/or other materials provided with the distribution.
013: *
014: * Neither the name of the HSQL Development Group nor the names of its
015: * contributors may be used to endorse or promote products derived from this
016: * software without specific prior written permission.
017: *
018: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
019: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
020: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
021: * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
022: * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
023: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
024: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
025: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
026: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
027: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
028: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
029: */
030:
031: package org.hsqldb.jdbc;
032:
033: import java.sql.ResultSet;
034: import java.sql.SQLException;
035:
036: /**
037: * Provides a site for conditional compilation of stub classes supporting
038: * the JDBC 2 imterface implementation under the JDBC 1 runtime. <p>
039: */
040: class jdbcStubs {
041: }
042:
043: //#ifdef JAVA2
044: //#else
045: /*
046: // surrogate for java.util.Map interface
047: interface Map {
048:
049: int size();
050:
051: boolean isEmpty();
052:
053: boolean containsKey(Object key);
054:
055: boolean containsValue(Object value);
056:
057: Object get(Object key);
058:
059: Object put(Object key, Object value);
060:
061: Object remove(Object key);
062:
063: void putAll(Map t);
064:
065: void clear();
066:
067: // public Set keySet();
068:
069: // public Collection values();
070:
071: // public Set entrySet();
072:
073: interface Entry {
074:
075: Object getKey();
076:
077: Object getValue();
078:
079: Object setValue(Object value);
080:
081: boolean equals(Object o);
082:
083: int hashCode();
084: }
085:
086: boolean equals(Object o);
087:
088: int hashCode();
089: }
090:
091: // surrogates for java.SQL type interfaces
092: interface Array {
093:
094: String getBaseTypeName() throws SQLException;
095:
096: int getBaseType() throws SQLException;
097:
098: Object getArray() throws SQLException;
099:
100: Object getArray(Map map) throws SQLException;
101:
102: Object getArray(long index, int count) throws SQLException;
103:
104: Object getArray(long index, int count, Map map) throws SQLException;
105:
106: ResultSet getResultSet() throws SQLException;
107:
108: ResultSet getResultSet(Map map) throws SQLException;
109:
110: ResultSet getResultSet(long index, int count) throws SQLException;
111:
112: ResultSet getResultSet(long index, int count,
113: Map map) throws SQLException;
114: }
115:
116: interface Blob {
117:
118: long length() throws SQLException;
119:
120: byte[] getBytes(long pos, int length) throws SQLException;
121:
122: java.io.InputStream getBinaryStream() throws SQLException;
123:
124: long position(byte pattern[], long start) throws SQLException;
125:
126: long position(Blob pattern, long start) throws SQLException;
127: }
128:
129: interface Clob {
130:
131: long length() throws SQLException;
132:
133: String getSubString(long pos, int length) throws SQLException;
134:
135: java.io.Reader getCharacterStream() throws SQLException;
136:
137: java.io.InputStream getAsciiStream() throws SQLException;
138:
139: long position(String searchstr, long start) throws SQLException;
140:
141: long position(Clob searchstr, long start) throws SQLException;
142: }
143:
144: interface Ref {
145: String getBaseTypeName() throws SQLException;
146: }
147: */
148:
149: //#endif JAVA2
|