- java.lang.Object
-
- org.postgresql.pljava.jdbc.AbstractResultSet
-
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,Wrapper
- Direct Known Subclasses:
ObjectResultSet
public abstract class AbstractResultSet extends Object implements ResultSet
TheAbstractResultSet
serves as a base class for implementations of theResultSet
interface. All calls using columnNames are translated into the corresponding call with index position computed using a call tofindColumn
.- Author:
- Thomas Hallgren
-
-
Field Summary
-
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
-
-
Constructor Summary
Constructors Constructor Description AbstractResultSet()
-
Method Summary
Modifier and Type Method Description Array
getArray(String columnName)
InputStream
getAsciiStream(String columnName)
BigDecimal
getBigDecimal(String columnName)
BigDecimal
getBigDecimal(String columnName, int scale)
InputStream
getBinaryStream(String columnName)
Blob
getBlob(String columnName)
boolean
getBoolean(String columnName)
byte
getByte(String columnName)
byte[]
getBytes(String columnName)
Reader
getCharacterStream(String columnName)
Clob
getClob(String columnName)
String
getCursorName()
Returns null if not overridden in a subclass.Date
getDate(String columnName)
Date
getDate(String columnName, Calendar cal)
double
getDouble(String columnName)
float
getFloat(String columnName)
int
getInt(String columnName)
long
getLong(String columnName)
Reader
getNCharacterStream(int columnIndex)
Reader
getNCharacterStream(String columnLabel)
NClob
getNClob(int columnIndex)
NClob
getNClob(String columnLabel)
String
getNString(int columnIndex)
String
getNString(String columnLabel)
Object
getObject(String columnName)
<T> T
getObject(String columnName, Class<T> type)
Object
getObject(String columnName, Map<String,Class<?>> map)
Ref
getRef(String columnName)
RowId
getRowId(int columnIndex)
RowId
getRowId(String columnLabel)
short
getShort(String columnName)
SQLXML
getSQLXML(int columnIndex)
SQLXML
getSQLXML(String columnLabel)
Statement
getStatement()
Returns null if not overridden in a subclass.String
getString(String columnName)
Time
getTime(String columnName)
Time
getTime(String columnName, Calendar cal)
Timestamp
getTimestamp(String columnName)
Timestamp
getTimestamp(String columnName, Calendar cal)
InputStream
getUnicodeStream(String columnName)
URL
getURL(String columnName)
boolean
isWrapperFor(Class<?> iface)
<T> T
unwrap(Class<T> iface)
void
updateArray(String columnName, Array x)
void
updateAsciiStream(int columnIndex, InputStream x)
void
updateAsciiStream(int columnIndex, InputStream x, long length)
void
updateAsciiStream(String columnLabel, InputStream x)
void
updateAsciiStream(String columnName, InputStream x, int length)
void
updateAsciiStream(String columnLabel, InputStream x, long length)
void
updateBigDecimal(String columnName, BigDecimal x)
void
updateBinaryStream(int columnIndex, InputStream x)
void
updateBinaryStream(int columnIndex, InputStream x, long length)
void
updateBinaryStream(String columnLabel, InputStream x)
void
updateBinaryStream(String columnName, InputStream x, int length)
void
updateBinaryStream(String columnLabel, InputStream x, long length)
void
updateBlob(int columnIndex, InputStream inputStream)
void
updateBlob(int columnIndex, InputStream inputStream, long length)
void
updateBlob(String columnLabel, InputStream inputStream)
void
updateBlob(String columnLabel, InputStream inputStream, long length)
void
updateBlob(String columnName, Blob x)
void
updateBoolean(String columnName, boolean x)
void
updateByte(String columnName, byte x)
void
updateBytes(String columnName, byte[] x)
void
updateCharacterStream(int columnIndex, Reader x)
void
updateCharacterStream(int columnIndex, Reader x, long length)
void
updateCharacterStream(String ColumnLabel, Reader x)
void
updateCharacterStream(String columnName, Reader x, int length)
void
updateCharacterStream(String ColumnLabel, Reader x, long length)
void
updateClob(int columnIndex, Reader reader)
void
updateClob(int columnIndex, Reader reader, long length)
void
updateClob(String columnLabel, Reader reader)
void
updateClob(String columnLabel, Reader reader, long length)
void
updateClob(String columnName, Clob x)
void
updateDate(String columnName, Date x)
void
updateDouble(String columnName, double x)
void
updateFloat(String columnName, float x)
void
updateInt(String columnName, int x)
void
updateLong(String columnName, long x)
void
updateNCharacterStream(int columnIndex, Reader reader)
void
updateNCharacterStream(int columnIndex, Reader reader, long length)
void
updateNCharacterStream(String columnLabel, Reader reader)
void
updateNCharacterStream(String columnLabel, Reader reader, long length)
void
updateNClob(int columnIndex, Reader reader)
void
updateNClob(int columnIndex, Reader reader, long length)
void
updateNClob(int columnIndex, NClob nClob)
void
updateNClob(String columnLabel, Reader reader)
void
updateNClob(String columnLabel, Reader reader, long length)
void
updateNClob(String columnLabel, NClob nClob)
void
updateNString(int columnIndex, String nString)
void
updateNString(String columnLabel, String nString)
void
updateNull(String columnName)
void
updateObject(String columnName, Object x)
void
updateObject(String columnName, Object x, int scale)
void
updateRef(String columnName, Ref x)
void
updateRowId(int columnIndex, RowId x)
void
updateRowId(String columnLabel, RowId x)
void
updateShort(String columnName, short x)
void
updateSQLXML(int columnIndex, SQLXML xmlObject)
void
updateSQLXML(String columnLabel, SQLXML xmlObject)
void
updateString(String columnName, String x)
void
updateTime(String columnName, Time x)
void
updateTimestamp(String columnName, Timestamp x)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getConcurrency, getDate, getDate, getDouble, getFetchDirection, getFetchSize, getFloat, getHoldability, getInt, getLong, getMetaData, getObject, getObject, getObject, getRef, getRow, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, getType, getUnicodeStream, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRow, updateShort, updateString, updateTime, updateTimestamp, wasNull
-
-
-
-
Method Detail
-
getArray
public Array getArray(String columnName) throws SQLException
- Specified by:
getArray
in interfaceResultSet
- Throws:
SQLException
-
getAsciiStream
public InputStream getAsciiStream(String columnName) throws SQLException
- Specified by:
getAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
public BigDecimal getBigDecimal(String columnName) throws SQLException
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBigDecimal
public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
- Specified by:
getBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(String columnName) throws SQLException
- Specified by:
getBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
getBlob
public Blob getBlob(String columnName) throws SQLException
- Specified by:
getBlob
in interfaceResultSet
- Throws:
SQLException
-
getBoolean
public boolean getBoolean(String columnName) throws SQLException
- Specified by:
getBoolean
in interfaceResultSet
- Throws:
SQLException
-
getByte
public byte getByte(String columnName) throws SQLException
- Specified by:
getByte
in interfaceResultSet
- Throws:
SQLException
-
getBytes
public byte[] getBytes(String columnName) throws SQLException
- Specified by:
getBytes
in interfaceResultSet
- Throws:
SQLException
-
getCharacterStream
public Reader getCharacterStream(String columnName) throws SQLException
- Specified by:
getCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getClob
public Clob getClob(String columnName) throws SQLException
- Specified by:
getClob
in interfaceResultSet
- Throws:
SQLException
-
getDate
public Date getDate(String columnName) throws SQLException
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDate
public Date getDate(String columnName, Calendar cal) throws SQLException
- Specified by:
getDate
in interfaceResultSet
- Throws:
SQLException
-
getDouble
public double getDouble(String columnName) throws SQLException
- Specified by:
getDouble
in interfaceResultSet
- Throws:
SQLException
-
getFloat
public float getFloat(String columnName) throws SQLException
- Specified by:
getFloat
in interfaceResultSet
- Throws:
SQLException
-
getInt
public int getInt(String columnName) throws SQLException
- Specified by:
getInt
in interfaceResultSet
- Throws:
SQLException
-
getLong
public long getLong(String columnName) throws SQLException
- Specified by:
getLong
in interfaceResultSet
- Throws:
SQLException
-
getObject
public Object getObject(String columnName) throws SQLException
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getObject
public Object getObject(String columnName, Map<String,Class<?>> map) throws SQLException
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
getRef
public Ref getRef(String columnName) throws SQLException
- Specified by:
getRef
in interfaceResultSet
- Throws:
SQLException
-
getShort
public short getShort(String columnName) throws SQLException
- Specified by:
getShort
in interfaceResultSet
- Throws:
SQLException
-
getString
public String getString(String columnName) throws SQLException
- Specified by:
getString
in interfaceResultSet
- Throws:
SQLException
-
getTime
public Time getTime(String columnName) throws SQLException
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTime
public Time getTime(String columnName, Calendar cal) throws SQLException
- Specified by:
getTime
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
public Timestamp getTimestamp(String columnName) throws SQLException
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getTimestamp
public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
- Specified by:
getTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getUnicodeStream
public InputStream getUnicodeStream(String columnName) throws SQLException
- Specified by:
getUnicodeStream
in interfaceResultSet
- Throws:
SQLException
-
getURL
public URL getURL(String columnName) throws SQLException
- Specified by:
getURL
in interfaceResultSet
- Throws:
SQLException
-
updateArray
public void updateArray(String columnName, Array x) throws SQLException
- Specified by:
updateArray
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateBigDecimal
public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
- Specified by:
updateBigDecimal
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
public void updateBlob(String columnName, Blob x) throws SQLException
- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBoolean
public void updateBoolean(String columnName, boolean x) throws SQLException
- Specified by:
updateBoolean
in interfaceResultSet
- Throws:
SQLException
-
updateByte
public void updateByte(String columnName, byte x) throws SQLException
- Specified by:
updateByte
in interfaceResultSet
- Throws:
SQLException
-
updateBytes
public void updateBytes(String columnName, byte[] x) throws SQLException
- Specified by:
updateBytes
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(String columnName, Reader x, int length) throws SQLException
- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateClob
public void updateClob(String columnName, Clob x) throws SQLException
- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateDate
public void updateDate(String columnName, Date x) throws SQLException
- Specified by:
updateDate
in interfaceResultSet
- Throws:
SQLException
-
updateDouble
public void updateDouble(String columnName, double x) throws SQLException
- Specified by:
updateDouble
in interfaceResultSet
- Throws:
SQLException
-
updateFloat
public void updateFloat(String columnName, float x) throws SQLException
- Specified by:
updateFloat
in interfaceResultSet
- Throws:
SQLException
-
updateInt
public void updateInt(String columnName, int x) throws SQLException
- Specified by:
updateInt
in interfaceResultSet
- Throws:
SQLException
-
updateLong
public void updateLong(String columnName, long x) throws SQLException
- Specified by:
updateLong
in interfaceResultSet
- Throws:
SQLException
-
updateNull
public void updateNull(String columnName) throws SQLException
- Specified by:
updateNull
in interfaceResultSet
- Throws:
SQLException
-
updateObject
public void updateObject(String columnName, Object x) throws SQLException
- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateObject
public void updateObject(String columnName, Object x, int scale) throws SQLException
- Specified by:
updateObject
in interfaceResultSet
- Throws:
SQLException
-
updateRef
public void updateRef(String columnName, Ref x) throws SQLException
- Specified by:
updateRef
in interfaceResultSet
- Throws:
SQLException
-
updateShort
public void updateShort(String columnName, short x) throws SQLException
- Specified by:
updateShort
in interfaceResultSet
- Throws:
SQLException
-
updateString
public void updateString(String columnName, String x) throws SQLException
- Specified by:
updateString
in interfaceResultSet
- Throws:
SQLException
-
updateTime
public void updateTime(String columnName, Time x) throws SQLException
- Specified by:
updateTime
in interfaceResultSet
- Throws:
SQLException
-
updateTimestamp
public void updateTimestamp(String columnName, Timestamp x) throws SQLException
- Specified by:
updateTimestamp
in interfaceResultSet
- Throws:
SQLException
-
getCursorName
public String getCursorName() throws SQLException
Returns null if not overridden in a subclass.- Specified by:
getCursorName
in interfaceResultSet
- Throws:
SQLException
-
getStatement
public Statement getStatement() throws SQLException
Returns null if not overridden in a subclass.- Specified by:
getStatement
in interfaceResultSet
- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperFor
in interfaceWrapper
- Throws:
SQLException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrap
in interfaceWrapper
- Throws:
SQLException
-
getSQLXML
public SQLXML getSQLXML(int columnIndex) throws SQLException
- Specified by:
getSQLXML
in interfaceResultSet
- Throws:
SQLException
-
getSQLXML
public SQLXML getSQLXML(String columnLabel) throws SQLException
- Specified by:
getSQLXML
in interfaceResultSet
- Throws:
SQLException
-
updateSQLXML
public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
- Specified by:
updateSQLXML
in interfaceResultSet
- Throws:
SQLException
-
updateSQLXML
public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException
- Specified by:
updateSQLXML
in interfaceResultSet
- Throws:
SQLException
-
getNCharacterStream
public Reader getNCharacterStream(String columnLabel) throws SQLException
- Specified by:
getNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getNCharacterStream
public Reader getNCharacterStream(int columnIndex) throws SQLException
- Specified by:
getNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
getNClob
public NClob getNClob(String columnLabel) throws SQLException
- Specified by:
getNClob
in interfaceResultSet
- Throws:
SQLException
-
getNClob
public NClob getNClob(int columnIndex) throws SQLException
- Specified by:
getNClob
in interfaceResultSet
- Throws:
SQLException
-
getNString
public String getNString(String columnLabel) throws SQLException
- Specified by:
getNString
in interfaceResultSet
- Throws:
SQLException
-
getNString
public String getNString(int columnIndex) throws SQLException
- Specified by:
getNString
in interfaceResultSet
- Throws:
SQLException
-
getRowId
public RowId getRowId(String columnLabel) throws SQLException
- Specified by:
getRowId
in interfaceResultSet
- Throws:
SQLException
-
getRowId
public RowId getRowId(int columnIndex) throws SQLException
- Specified by:
getRowId
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException
- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException
- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
- Specified by:
updateAsciiStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException
- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
- Specified by:
updateBinaryStream
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException
- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException
- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException
- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateBlob
public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException
- Specified by:
updateBlob
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(String ColumnLabel, Reader x) throws SQLException
- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(String ColumnLabel, Reader x, long length) throws SQLException
- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader x) throws SQLException
- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException
- Specified by:
updateCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateClob
public void updateClob(String columnLabel, Reader reader) throws SQLException
- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
public void updateClob(String columnLabel, Reader reader, long length) throws SQLException
- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
public void updateClob(int columnIndex, Reader reader) throws SQLException
- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateClob
public void updateClob(int columnIndex, Reader reader, long length) throws SQLException
- Specified by:
updateClob
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
public void updateNCharacterStream(int columnIndex, Reader reader) throws SQLException
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNCharacterStream
public void updateNCharacterStream(int columnIndex, Reader reader, long length) throws SQLException
- Specified by:
updateNCharacterStream
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
public void updateNClob(String columnLabel, NClob nClob) throws SQLException
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
public void updateNClob(String columnLabel, Reader reader) throws SQLException
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
public void updateNClob(int columnIndex, NClob nClob) throws SQLException
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
public void updateNClob(int columnIndex, Reader reader) throws SQLException
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNClob
public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException
- Specified by:
updateNClob
in interfaceResultSet
- Throws:
SQLException
-
updateNString
public void updateNString(String columnLabel, String nString) throws SQLException
- Specified by:
updateNString
in interfaceResultSet
- Throws:
SQLException
-
updateNString
public void updateNString(int columnIndex, String nString) throws SQLException
- Specified by:
updateNString
in interfaceResultSet
- Throws:
SQLException
-
updateRowId
public void updateRowId(String columnLabel, RowId x) throws SQLException
- Specified by:
updateRowId
in interfaceResultSet
- Throws:
SQLException
-
updateRowId
public void updateRowId(int columnIndex, RowId x) throws SQLException
- Specified by:
updateRowId
in interfaceResultSet
- Throws:
SQLException
-
getObject
public <T> T getObject(String columnName, Class<T> type) throws SQLException
- Specified by:
getObject
in interfaceResultSet
- Throws:
SQLException
-
-