// @(#)$Id: ResultSet.jml,v 1.5 2005/08/16 17:13:14 f_rioux Exp $ // // Copyright (C) 2004 Dependable Software Research Group, Concordia University. // // This file is part of the runtime library of the Java Modeling Language. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2.1, // of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with JML; see the file LesserGPL.txt. If not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA // 02110-1301 USA. package java.sql; import java.math.BigDecimal; import java.io.InputStream; import java.io.Reader; import java.net.URL; import java.util.Calendar; import java.util.Map; public interface ResultSet { /* * NOTE: This file has only been partially specified. Feel free to complete. * (http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html) */ public static final int FETCH_FORWARD; public static final int FETCH_REVERSE; public static final int FETCH_UNKNOWN; public static final int TYPE_FORWARD_ONLY; public static final int TYPE_SCROLL_INSENSITIVE; public static final int TYPE_SCROLL_SENSITIVE; public static final int CONCUR_READ_ONLY; public static final int CONCUR_UPDATABLE; public static final int HOLD_CURSORS_OVER_COMMIT; public static final int CLOSE_CURSORS_AT_COMMIT; public boolean next() throws SQLException; public void close() throws SQLException; public boolean wasNull() throws SQLException; public String getString(int columnIndex) throws SQLException; public boolean getBoolean(int columnIndex) throws SQLException; public byte getByte(int columnIndex) throws SQLException; public short getShort(int columnIndex) throws SQLException; public int getInt(int columnIndex) throws SQLException; public long getLong(int columnIndex) throws SQLException; public float getFloat(int columnIndex) throws SQLException; public double getDouble(int columnIndex) throws SQLException; public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException; public byte[] getBytes(int columnIndex) throws SQLException; public Date getDate(int columnIndex) throws SQLException; public Time getTime(int columnIndex) throws SQLException; public Timestamp getTimestamp(int columnIndex) throws SQLException; public InputStream getAsciiStream(int columnIndex) throws SQLException; public InputStream getUnicodeStream(int columnIndex) throws SQLException; public InputStream getBinaryStream(int columnIndex) throws SQLException; public String getString(String columnName) throws SQLException; public boolean getBoolean(String columnName) throws SQLException; public byte getByte(String columnName) throws SQLException; public short getShort(String columnName) throws SQLException; public int getInt(String columnName) throws SQLException; public long getLong(String columnName) throws SQLException; public float getFloat(String columnName) throws SQLException; public double getDouble(String columnName) throws SQLException; public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException; public byte[] getBytes(String columnName) throws SQLException; public Date getDate(String columnName) throws SQLException; public Time getTime(String columnName) throws SQLException; public Timestamp getTimestamp(String columnName) throws SQLException; public InputStream getAsciiStream(String columnName) throws SQLException; public InputStream getUnicodeStream(String columnName) throws SQLException; public InputStream getBinaryStream(String columnName) throws SQLException; public SQLWarning getWarnings() throws SQLException; public void clearWarnings() throws SQLException; public String getCursorName() throws SQLException; public ResultSetMetaData getMetaData() throws SQLException; public Object getObject(int columnIndex) throws SQLException; /** Can return null if value of entry is an SQL null. */ public Object getObject(String columnName) throws SQLException; public int findColumn(String columnName) throws SQLException; public Reader getCharacterStream(int columnIndex) throws SQLException; public Reader getCharacterStream(String columnName) throws SQLException; public BigDecimal getBigDecimal(int columnIndex) throws SQLException; public BigDecimal getBigDecimal(String columnName) throws SQLException; public boolean isBeforeFirst() throws SQLException; public boolean isAfterLast() throws SQLException; public boolean isFirst() throws SQLException; public boolean isLast() throws SQLException; public void beforeFirst() throws SQLException; public void afterLast() throws SQLException; public boolean first() throws SQLException; public boolean last() throws SQLException; public int getRow() throws SQLException; public boolean absolute(int row) throws SQLException; public boolean relative(int rows) throws SQLException; public boolean previous() throws SQLException; public void setFetchDirection(int direction) throws SQLException; public int getFetchDirection() throws SQLException; public void setFetchSize(int rows) throws SQLException; public int getFetchSize() throws SQLException; public int getType() throws SQLException; public int getConcurrency() throws SQLException; public boolean rowUpdated() throws SQLException; public boolean rowInserted() throws SQLException; public boolean rowDeleted() throws SQLException; public void updateNull(int columnIndex) throws SQLException; public void updateBoolean(int columnIndex, boolean x) throws SQLException; public void updateByte(int columnIndex, byte x) throws SQLException; public void updateShort(int columnIndex, short x) throws SQLException; public void updateInt(int columnIndex, int x) throws SQLException; public void updateLong(int columnIndex, long x) throws SQLException; public void updateFloat(int columnIndex, float x) throws SQLException; public void updateDouble(int columnIndex, double x) throws SQLException; public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException; public void updateString(int columnIndex, String x) throws SQLException; public void updateBytes(int columnIndex, byte[] x) throws SQLException; public void updateDate(int columnIndex, Date x) throws SQLException; public void updateTime(int columnIndex, Time x) throws SQLException; public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException; public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException; public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException; public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException; public void updateObject(int columnIndex, Object x, int scale) throws SQLException; public void updateObject(int columnIndex, Object x) throws SQLException; public void updateNull(String columnName) throws SQLException; public void updateBoolean(String columnName, boolean x) throws SQLException; public void updateByte(String columnName, byte x) throws SQLException; public void updateShort(String columnName, short x) throws SQLException; public void updateInt(String columnName, int x) throws SQLException; public void updateLong(String columnName, long x) throws SQLException; public void updateFloat(String columnName, float x) throws SQLException; public void updateDouble(String columnName, double x) throws SQLException; public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException; public void updateString(String columnName, String x) throws SQLException; public void updateBytes(String columnName, byte[] x) throws SQLException; public void updateDate(String columnName, Date x) throws SQLException; public void updateTime(String columnName, Time x) throws SQLException; public void updateTimestamp(String columnName, Timestamp x) throws SQLException; public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException; public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException; public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException; public void updateObject(String columnName, Object x, int scale) throws SQLException; public void updateObject(String columnName, Object x) throws SQLException; public void insertRow() throws SQLException; public void updateRow() throws SQLException; public void deleteRow() throws SQLException; public void refreshRow() throws SQLException; public void cancelRowUpdates() throws SQLException; public void moveToInsertRow() throws SQLException; public void moveToCurrentRow() throws SQLException; public Statement getStatement() throws SQLException; public Object getObject(int i, Map map) throws SQLException; public Ref getRef(int i) throws SQLException; public Blob getBlob(int i) throws SQLException; public Clob getClob(int i) throws SQLException; public Array getArray(int i) throws SQLException; public Object getObject(String colName, Map map) throws SQLException; public Ref getRef(String colName) throws SQLException; public Blob getBlob(String colName) throws SQLException; public Clob getClob(String colName) throws SQLException; public Array getArray(String colName) throws SQLException; public Date getDate(int columnIndex, Calendar cal) throws SQLException; public Date getDate(String columnName, Calendar cal) throws SQLException; public Time getTime(int columnIndex, Calendar cal) throws SQLException; public Time getTime(String columnName, Calendar cal) throws SQLException; public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException; public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException; public URL getURL(int columnIndex) throws SQLException; public URL getURL(String columnName) throws SQLException; public void updateRef(int columnIndex, Ref x) throws SQLException; public void updateRef(String columnName, Ref x) throws SQLException; public void updateBlob(int columnIndex, Blob x) throws SQLException; public void updateBlob(String columnName, Blob x) throws SQLException; public void updateClob(int columnIndex, Clob x) throws SQLException; public void updateClob(String columnName, Clob x) throws SQLException; public void updateArray(int columnIndex, Array x) throws SQLException; public void updateArray(String columnName, Array x) throws SQLException; }