|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.jdbc4.Unwrappable org.eigenbase.util14.AbstractResultSet
public abstract class AbstractResultSet
AbstractResultSet
provides a abstract implementation for a
TYPE_FORWARD_ONLY, CONCUR_READ_ONLY ResultSet. This class is JDK 1.4
compatible.
Field Summary | |
---|---|
(package private) static TimeZone |
defaultZone
|
protected int |
fetchSize
|
(package private) static TimeZone |
gmtZone
|
protected int |
maxRows
|
protected boolean |
wasNull
|
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 | |
---|---|
AbstractResultSet()
|
Method Summary | |
---|---|
boolean |
absolute(int row)
|
void |
afterLast()
|
void |
beforeFirst()
|
void |
cancelRowUpdates()
|
void |
clearWarnings()
After this call getWarnings returns null until a new warning is reported for this ResultSet. |
void |
close()
|
void |
deleteRow()
|
int |
findColumn(String columnName)
Map a Resultset column name to a ResultSet column index. |
boolean |
first()
|
Array |
getArray(int columnIndex)
Get the value of a column in the current row as an Array object |
Array |
getArray(String columnName)
Get the value of a column in the current row as an Array object |
InputStream |
getAsciiStream(int columnIndex)
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. |
InputStream |
getAsciiStream(String columnName)
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. |
BigDecimal |
getBigDecimal(int columnIndex)
Get the value of a column in the current row as a java.lang.BigDecimal object. |
BigDecimal |
getBigDecimal(int columnIndex,
int scale)
Deprecated. |
BigDecimal |
getBigDecimal(String columnName)
Get the value of a column in the current row as a java.lang.BigDecimal object. |
BigDecimal |
getBigDecimal(String columnName,
int scale)
Deprecated. |
InputStream |
getBinaryStream(int columnIndex)
A column value can be retrieved as a stream of uninterpreted bytes and then read in chunks from the stream. |
InputStream |
getBinaryStream(String columnName)
A column value can be retrieved as a stream of uninterpreted bytes and then read in chunks from the stream. |
Blob |
getBlob(int columnIndex)
Get the value of a column in the current row as a java.sql.Blob object |
Blob |
getBlob(String columnName)
Get the value of a column in the current row as a java.sql.Blob object |
boolean |
getBoolean(int columnIndex)
Get the value of a column in the current row as a Java boolean. |
boolean |
getBoolean(String columnName)
Get the value of a column in the current row as a Java boolean. |
byte |
getByte(int columnIndex)
Get the value of a column in the current row as a Java byte. |
byte |
getByte(String columnName)
Get the value of a column in the current row as a Java byte. |
byte[] |
getBytes(int columnIndex)
Get the value of a column in the current row as a Java byte array. |
byte[] |
getBytes(String columnName)
Get the value of a column in the current row as a Java byte array. |
Reader |
getCharacterStream(int columnIndex)
A column value can be retrieved as a stream of characters and then read in chunks from the stream. |
Reader |
getCharacterStream(String columnName)
A column value can be retrieved as a stream of characters and then read in chunks from the stream. |
Clob |
getClob(int columnIndex)
Get the value of a column in the current row as a java.sql.Clob object |
Clob |
getClob(String columnName)
Get the value of a column in the current row as a java.sql.Clob object |
int |
getConcurrency()
|
String |
getCursorName()
Get the name of the SQL cursor used by this ResultSet. |
Date |
getDate(int columnIndex)
Get the value of a column in the current row as a java.sql.Date object. |
Date |
getDate(int columnIndex,
Calendar cal)
Get the value of a column in the current row as a java.sql.Date object. |
Date |
getDate(String columnName)
Get the value of a column in the current row as a java.sql.Date object. |
Date |
getDate(String columnName,
Calendar cal)
Get the value of a column in the current row as a java.sql.Date object. |
double |
getDouble(int columnIndex)
Get the value of a column in the current row as a Java double. |
double |
getDouble(String columnName)
Get the value of a column in the current row as a Java double. |
int |
getFetchDirection()
|
int |
getFetchSize()
|
float |
getFloat(int columnIndex)
Get the value of a column in the current row as a Java float. |
float |
getFloat(String columnName)
Get the value of a column in the current row as a Java float. |
int |
getHoldability()
|
int |
getInt(int columnIndex)
Get the value of a column in the current row as a Java int. |
int |
getInt(String columnName)
Get the value of a column in the current row as a Java int. |
long |
getLong(int columnIndex)
Get the value of a column in the current row as a Java long. |
long |
getLong(String columnName)
Get the value of a column in the current row as a Java long. |
Reader |
getNCharacterStream(int columnIndex)
|
Reader |
getNCharacterStream(String columnName)
|
NClob |
getNClob(int columnIndex)
|
NClob |
getNClob(String columnName)
|
String |
getNString(int columnIndex)
|
String |
getNString(String columnName)
|
Object |
getObject(int columnIndex)
Get the value of a column in the current row as a Java object. |
Object |
getObject(int columnIndex,
Map map)
Get the value of a column in the current row as a Java object. |
Object |
getObject(String columnName)
Get the value of a column in the current row as a Java object. |
Object |
getObject(String columnName,
Map map)
Get the value of a column in the current row as a Java object. |
protected abstract Object |
getRaw(int columnIndex)
Returns the raw value of a column as an object. |
protected Object |
getRaw(String columnName)
Returns the raw value of a column as an object. |
Ref |
getRef(int columnIndex)
Get the value of a column in the current row as a java.sql.Ref object |
Ref |
getRef(String columnName)
Get the value of a column in the current row as a java.sql.Ref object |
int |
getRow()
|
RowId |
getRowId(int columnIndex)
|
RowId |
getRowId(String columnName)
|
short |
getShort(int columnIndex)
Get the value of a column in the current row as a Java short. |
short |
getShort(String columnName)
Get the value of a column in the current row as a Java short. |
SQLXML |
getSQLXML(int columnIndex)
|
SQLXML |
getSQLXML(String columnName)
|
Statement |
getStatement()
|
String |
getString(int columnIndex)
Get the value of a column in the current row as a Java String. |
String |
getString(String columnName)
Get the value of a column in the current row as a Java String. |
Time |
getTime(int columnIndex)
Get the value of a column in the current row as a java.sql.Time object. |
Time |
getTime(int columnIndex,
Calendar cal)
Get the value of a column in the current row as a java.sql.Time object. |
Time |
getTime(String columnName)
Get the value of a column in the current row as a java.sql.Time object. |
Time |
getTime(String columnName,
Calendar cal)
Get the value of a column in the current row as a java.sql.Time object. |
Timestamp |
getTimestamp(int columnIndex)
|
Timestamp |
getTimestamp(int columnIndex,
Calendar cal)
Get the value of a column in the current row as a java.sql.Timestamp object. |
Timestamp |
getTimestamp(String columnName)
Get the value of a column in the current row as a java.sql.Timestamp object. |
Timestamp |
getTimestamp(String columnName,
Calendar cal)
Get the value of a column in the current row as a java.sql.Timestamp object. |
int |
getType()
|
InputStream |
getUnicodeStream(int columnIndex)
Deprecated. |
InputStream |
getUnicodeStream(String columnName)
Deprecated. |
URL |
getURL(int columnIndex)
Get the value of a column in the current row as a java.net.URL object |
URL |
getURL(String columnName)
Get the value of a column in the current row as a java.net.URL object |
SQLWarning |
getWarnings()
The first warning reported by calls on this ResultSet is returned. |
void |
insertRow()
|
boolean |
isAfterLast()
|
boolean |
isBeforeFirst()
|
boolean |
isClosed()
|
boolean |
isFirst()
|
boolean |
isLast()
|
boolean |
last()
|
void |
moveToCurrentRow()
|
void |
moveToInsertRow()
|
protected SQLException |
newConversionError(Object o,
Class clazz)
|
protected SQLException |
newConversionError(Object o,
String className)
|
protected SQLException |
newDirectionError()
|
protected SQLException |
newFetchError(Throwable e)
|
protected SQLException |
newUpdatabilityError()
|
boolean |
previous()
|
void |
refreshRow()
|
boolean |
relative(int rows)
|
boolean |
rowDeleted()
|
boolean |
rowInserted()
|
boolean |
rowUpdated()
|
void |
setFetchDirection(int direction)
|
void |
setFetchSize(int rows)
|
void |
setMaxRows(int maxRows)
|
private BigDecimal |
toBigDecimal(Object o)
|
private boolean |
toBoolean(Object o)
|
private byte |
toByte(Object o)
|
private byte[] |
toBytes(Object o)
|
private Date |
toDate(Object o,
TimeZone zone)
|
private double |
toDouble(Object o)
|
private float |
toFloat(Object o)
|
private int |
toInt(Object o)
|
private long |
toLong_(Object o)
|
private long |
toLong(Object o)
|
private short |
toShort(Object o)
|
private String |
toString(Object o)
|
private Time |
toTime(Object o,
TimeZone zone)
|
private Timestamp |
toTimestamp(Object o,
TimeZone zone)
|
void |
updateArray(int columnIndex,
Array x)
|
void |
updateArray(String columnName,
Array x)
|
void |
updateAsciiStream(int columnIndex,
InputStream inputStream)
|
void |
updateAsciiStream(int columnIndex,
InputStream x,
int length)
|
void |
updateAsciiStream(int columnIndex,
InputStream inputStream,
long len)
|
void |
updateAsciiStream(String columnName,
InputStream inputStream)
|
void |
updateAsciiStream(String columnName,
InputStream x,
int length)
|
void |
updateAsciiStream(String columnName,
InputStream inputStream,
long len)
|
void |
updateBigDecimal(int columnIndex,
BigDecimal x)
|
void |
updateBigDecimal(String columnName,
BigDecimal x)
|
void |
updateBinaryStream(int columnIndex,
InputStream inputStream)
|
void |
updateBinaryStream(int columnIndex,
InputStream x,
int length)
|
void |
updateBinaryStream(int columnIndex,
InputStream inputStream,
long len)
|
void |
updateBinaryStream(String columnName,
InputStream inputStream)
|
void |
updateBinaryStream(String columnName,
InputStream x,
int length)
|
void |
updateBinaryStream(String columnName,
InputStream inputStream,
long len)
|
void |
updateBlob(int columnIndex,
Blob x)
|
void |
updateBlob(int columnIndex,
InputStream inputStream)
|
void |
updateBlob(int columnIndex,
InputStream inputStream,
long len)
|
void |
updateBlob(String columnName,
Blob x)
|
void |
updateBlob(String columnName,
InputStream inputStream)
|
void |
updateBlob(String columnName,
InputStream inputStream,
long len)
|
void |
updateBoolean(int columnIndex,
boolean x)
|
void |
updateBoolean(String columnName,
boolean x)
|
void |
updateByte(int columnIndex,
byte x)
|
void |
updateByte(String columnName,
byte x)
|
void |
updateBytes(int columnIndex,
byte[] x)
|
void |
updateBytes(String columnName,
byte[] x)
|
void |
updateCharacterStream(int columnIndex,
Reader reader)
|
void |
updateCharacterStream(int columnIndex,
Reader x,
int length)
|
void |
updateCharacterStream(int columnIndex,
Reader reader,
long len)
|
void |
updateCharacterStream(String columnName,
Reader reader)
|
void |
updateCharacterStream(String columnName,
Reader x,
int length)
|
void |
updateCharacterStream(String columnName,
Reader reader,
long len)
|
void |
updateClob(int columnIndex,
Clob x)
|
void |
updateClob(int columnIndex,
Reader reader)
|
void |
updateClob(int columnIndex,
Reader reader,
long len)
|
void |
updateClob(String columnName,
Clob x)
|
void |
updateClob(String columnName,
Reader reader)
|
void |
updateClob(String columnName,
Reader reader,
long len)
|
void |
updateDate(int columnIndex,
Date x)
|
void |
updateDate(String columnName,
Date x)
|
void |
updateDouble(int columnIndex,
double x)
|
void |
updateDouble(String columnName,
double x)
|
void |
updateFloat(int columnIndex,
float x)
|
void |
updateFloat(String columnName,
float x)
|
void |
updateInt(int columnIndex,
int x)
|
void |
updateInt(String columnName,
int x)
|
void |
updateLong(int columnIndex,
long x)
|
void |
updateLong(String columnName,
long x)
|
void |
updateNCharacterStream(int columnIndex,
Reader reader)
|
void |
updateNCharacterStream(int columnIndex,
Reader reader,
long len)
|
void |
updateNCharacterStream(String columnName,
Reader reader)
|
void |
updateNCharacterStream(String columnName,
Reader reader,
long len)
|
void |
updateNClob(int columnIndex,
NClob nclob)
|
void |
updateNClob(int columnIndex,
Reader reader)
|
void |
updateNClob(int columnIndex,
Reader reader,
long len)
|
void |
updateNClob(String columnName,
NClob nclob)
|
void |
updateNClob(String columnName,
Reader reader)
|
void |
updateNClob(String columnName,
Reader reader,
long len)
|
void |
updateNString(int columnIndex,
String s)
|
void |
updateNString(String columnName,
String s)
|
void |
updateNull(int columnIndex)
|
void |
updateNull(String columnName)
|
void |
updateObject(int columnIndex,
Object x)
|
void |
updateObject(int columnIndex,
Object x,
int scale)
|
void |
updateObject(String columnName,
Object x)
|
void |
updateObject(String columnName,
Object x,
int scale)
|
void |
updateRef(int columnIndex,
Ref x)
|
void |
updateRef(String columnName,
Ref x)
|
void |
updateRow()
|
void |
updateRowId(int columnIndex,
RowId rowId)
|
void |
updateRowId(String columnName,
RowId rowId)
|
void |
updateShort(int columnIndex,
short x)
|
void |
updateShort(String columnName,
short x)
|
void |
updateSQLXML(int columnIndex,
SQLXML sqlxml)
|
void |
updateSQLXML(String columnName,
SQLXML sqlxml)
|
void |
updateString(int columnIndex,
String x)
|
void |
updateString(String columnName,
String x)
|
void |
updateTime(int columnIndex,
Time x)
|
void |
updateTime(String columnName,
Time x)
|
void |
updateTimestamp(int columnIndex,
Timestamp x)
|
void |
updateTimestamp(String columnName,
Timestamp x)
|
boolean |
wasNull()
A column may have the value of SQL NULL; wasNull reports whether the last column read had this special value. |
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 |
---|
getMetaData, next |
Field Detail |
---|
static final TimeZone gmtZone
static final TimeZone defaultZone
protected boolean wasNull
protected int fetchSize
protected int maxRows
Constructor Detail |
---|
public AbstractResultSet()
Method Detail |
---|
protected abstract Object getRaw(int columnIndex) throws SQLException
columnIndex
- Column index, 1-based
SQLException
protected Object getRaw(String columnName) throws SQLException
columnName
- Column name
SQLException
public int getConcurrency() throws SQLException
getConcurrency
in interface ResultSet
SQLException
public int getType() throws SQLException
getType
in interface ResultSet
SQLException
public void setFetchDirection(int direction) throws SQLException
setFetchDirection
in interface ResultSet
SQLException
public int getFetchDirection() throws SQLException
getFetchDirection
in interface ResultSet
SQLException
public int getFetchSize() throws SQLException
getFetchSize
in interface ResultSet
SQLException
public void setFetchSize(int rows) throws SQLException
setFetchSize
in interface ResultSet
SQLException
public boolean wasNull() throws SQLException
wasNull
in interface ResultSet
SQLException
public int findColumn(String columnName) throws SQLException
findColumn
in interface ResultSet
columnName
- the name of the column
SQLException
public SQLWarning getWarnings() throws SQLException
The first warning reported by calls on this ResultSet is returned. Subsequent ResultSet warnings will be chained to this SQLWarning.
The warning chain is automatically cleared each time a new row is read.
Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by statement methods (such as reading OUT parameters) will be chained on the Statement object.
getWarnings
in interface ResultSet
SQLException
public void clearWarnings() throws SQLException
clearWarnings
in interface ResultSet
SQLException
public Statement getStatement() throws SQLException
getStatement
in interface ResultSet
SQLException
public void close() throws SQLException
close
in interface ResultSet
SQLException
public String getString(int columnIndex) throws SQLException
getString
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public String getString(String columnName) throws SQLException
getString
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public byte[] getBytes(int columnIndex) throws SQLException
getBytes
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public byte[] getBytes(String columnName) throws SQLException
getBytes
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public boolean getBoolean(int columnIndex) throws SQLException
getBoolean
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public boolean getBoolean(String columnName) throws SQLException
getBoolean
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public byte getByte(int columnIndex) throws SQLException
getByte
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public byte getByte(String columnName) throws SQLException
getByte
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public short getShort(int columnIndex) throws SQLException
getShort
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public short getShort(String columnName) throws SQLException
getShort
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public int getInt(int columnIndex) throws SQLException
getInt
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public int getInt(String columnName) throws SQLException
getInt
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public long getLong(int columnIndex) throws SQLException
getLong
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public long getLong(String columnName) throws SQLException
getLong
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public float getFloat(int columnIndex) throws SQLException
getFloat
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public float getFloat(String columnName) throws SQLException
getFloat
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public double getDouble(int columnIndex) throws SQLException
getDouble
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public double getDouble(String columnName) throws SQLException
getDouble
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public BigDecimal getBigDecimal(int columnIndex) throws SQLException
getBigDecimal
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public BigDecimal getBigDecimal(String columnName) throws SQLException
getBigDecimal
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
getBigDecimal
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...scale
- the number of digits to the right of the decimal
SQLException
public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
getBigDecimal
in interface ResultSet
columnName
- is the SQL name of the columnscale
- the number of digits to the right of the decimal
SQLException
public Date getDate(int columnIndex) throws SQLException
getDate
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Date getDate(String columnName) throws SQLException
getDate
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Date getDate(int columnIndex, Calendar cal) throws SQLException
getDate
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...cal
- - the java.util.Calendar object to use in constructing the
date
SQLException
public Date getDate(String columnName, Calendar cal) throws SQLException
getDate
in interface ResultSet
columnName
- is the SQL name of the columncal
- - the java.util.Calendar object to use in constructing the
date
SQLException
public Time getTime(int columnIndex) throws SQLException
getTime
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Time getTime(String columnName) throws SQLException
getTime
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Time getTime(int columnIndex, Calendar cal) throws SQLException
getTime
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...cal
- - the java.util.Calendar object to use in constructing the
time
SQLException
public Time getTime(String columnName, Calendar cal) throws SQLException
getTime
in interface ResultSet
columnName
- is the SQL name of the columncal
- - the java.util.Calendar object to use in constructing the
time
SQLException
public Timestamp getTimestamp(int columnIndex) throws SQLException
getTimestamp
in interface ResultSet
SQLException
public Timestamp getTimestamp(String columnName) throws SQLException
getTimestamp
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
getTimestamp
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...cal
- - the java.util.Calendar object to use in constructing the
timestamp
SQLException
public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
getTimestamp
in interface ResultSet
columnName
- is the SQL name of the columncal
- - the java.util.Calendar object to use in constructing the
timestamp
SQLException
public Array getArray(int columnIndex) throws SQLException
getArray
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Array getArray(String columnName) throws SQLException
getArray
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Blob getBlob(int columnIndex) throws SQLException
getBlob
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Blob getBlob(String columnName) throws SQLException
getBlob
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Clob getClob(int columnIndex) throws SQLException
getClob
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Clob getClob(String columnName) throws SQLException
getClob
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Ref getRef(int columnIndex) throws SQLException
getRef
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Ref getRef(String columnName) throws SQLException
getRef
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public URL getURL(int columnIndex) throws SQLException
getURL
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public URL getURL(String columnName) throws SQLException
getURL
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Object getObject(int columnIndex) throws SQLException
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC spec.
This method may also be used to read database specific abstract data types.
getObject
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Object getObject(String columnName) throws SQLException
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC spec.
This method may also be used to read database specific abstract data types.
getObject
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Object getObject(int columnIndex, Map map) throws SQLException
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC spec. This method uses the specified Map object for custom mapping if appropriate.
This method may also be used to read database specific abstract data types.
getObject
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...map
- a java.util.Map object that contains the mapping from SQL type
names to classes in the Java programming language
SQLException
public Object getObject(String columnName, Map map) throws SQLException
Get the value of a column in the current row as a Java object.
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC spec. This method uses the specified Map object for custom mapping if appropriate.
This method may also be used to read database specific abstract data types.
getObject
in interface ResultSet
columnName
- is the SQL name of the columnmap
- a java.util.Map object that contains the mapping from SQL type
names to classes in the Java programming language
SQLException
public InputStream getAsciiStream(int columnIndex) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. . Also, a stream may return 0 for available() whether there is data available or not.
getAsciiStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public InputStream getAsciiStream(String columnName) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
getAsciiStream
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public InputStream getBinaryStream(int columnIndex) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.
getBinaryStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public InputStream getBinaryStream(String columnName) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
getBinaryStream
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public Reader getCharacterStream(int columnIndex) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
getCharacterStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public Reader getCharacterStream(String columnName) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
getCharacterStream
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public InputStream getUnicodeStream(int columnIndex) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. . Also, a stream may return 0 for available() whether there is data available or not.
getUnicodeStream
in interface ResultSet
columnIndex
- the first column is 1, the second is 2, ...
SQLException
public InputStream getUnicodeStream(String columnName) throws SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream.
getUnicodeStream
in interface ResultSet
columnName
- is the SQL name of the column
SQLException
public void updateShort(int columnIndex, short x) throws SQLException
updateShort
in interface ResultSet
SQLException
public void updateShort(String columnName, short x) throws SQLException
updateShort
in interface ResultSet
SQLException
public void updateNull(int columnIndex) throws SQLException
updateNull
in interface ResultSet
SQLException
public void updateNull(String columnName) throws SQLException
updateNull
in interface ResultSet
SQLException
public void updateLong(int columnIndex, long x) throws SQLException
updateLong
in interface ResultSet
SQLException
public void updateLong(String columnName, long x) throws SQLException
updateLong
in interface ResultSet
SQLException
public void updateInt(int columnIndex, int x) throws SQLException
updateInt
in interface ResultSet
SQLException
public void updateInt(String columnName, int x) throws SQLException
updateInt
in interface ResultSet
SQLException
public void updateFloat(int columnIndex, float x) throws SQLException
updateFloat
in interface ResultSet
SQLException
public void updateFloat(String columnName, float x) throws SQLException
updateFloat
in interface ResultSet
SQLException
public void updateDouble(int columnIndex, double x) throws SQLException
updateDouble
in interface ResultSet
SQLException
public void updateDouble(String columnName, double x) throws SQLException
updateDouble
in interface ResultSet
SQLException
public void updateString(int columnIndex, String x) throws SQLException
updateString
in interface ResultSet
SQLException
public void updateString(String columnName, String x) throws SQLException
updateString
in interface ResultSet
SQLException
public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
updateBigDecimal
in interface ResultSet
SQLException
public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
updateBigDecimal
in interface ResultSet
SQLException
public void updateBoolean(int columnIndex, boolean x) throws SQLException
updateBoolean
in interface ResultSet
SQLException
public void updateBoolean(String columnName, boolean x) throws SQLException
updateBoolean
in interface ResultSet
SQLException
public void updateByte(int columnIndex, byte x) throws SQLException
updateByte
in interface ResultSet
SQLException
public void updateByte(String columnName, byte x) throws SQLException
updateByte
in interface ResultSet
SQLException
public void updateBytes(int columnIndex, byte[] x) throws SQLException
updateBytes
in interface ResultSet
SQLException
public void updateBytes(String columnName, byte[] x) throws SQLException
updateBytes
in interface ResultSet
SQLException
public void updateDate(int columnIndex, Date x) throws SQLException
updateDate
in interface ResultSet
SQLException
public void updateDate(String columnName, Date x) throws SQLException
updateDate
in interface ResultSet
SQLException
public void updateTime(int columnIndex, Time x) throws SQLException
updateTime
in interface ResultSet
SQLException
public void updateTime(String columnName, Time x) throws SQLException
updateTime
in interface ResultSet
SQLException
public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
updateTimestamp
in interface ResultSet
SQLException
public void updateTimestamp(String columnName, Timestamp x) throws SQLException
updateTimestamp
in interface ResultSet
SQLException
public void updateArray(int columnIndex, Array x) throws SQLException
updateArray
in interface ResultSet
SQLException
public void updateArray(String columnName, Array x) throws SQLException
updateArray
in interface ResultSet
SQLException
public void updateRef(int columnIndex, Ref x) throws SQLException
updateRef
in interface ResultSet
SQLException
public void updateRef(String columnName, Ref x) throws SQLException
updateRef
in interface ResultSet
SQLException
public void updateBlob(int columnIndex, Blob x) throws SQLException
updateBlob
in interface ResultSet
SQLException
public void updateBlob(String columnName, Blob x) throws SQLException
updateBlob
in interface ResultSet
SQLException
public void updateClob(int columnIndex, Clob x) throws SQLException
updateClob
in interface ResultSet
SQLException
public void updateClob(String columnName, Clob x) throws SQLException
updateClob
in interface ResultSet
SQLException
public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
updateAsciiStream
in interface ResultSet
SQLException
public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
updateAsciiStream
in interface ResultSet
SQLException
public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
updateBinaryStream
in interface ResultSet
SQLException
public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
updateBinaryStream
in interface ResultSet
SQLException
public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
updateCharacterStream
in interface ResultSet
SQLException
public void updateCharacterStream(String columnName, Reader x, int length) throws SQLException
updateCharacterStream
in interface ResultSet
SQLException
public void updateObject(int columnIndex, Object x) throws SQLException
updateObject
in interface ResultSet
SQLException
public void updateObject(String columnName, Object x) throws SQLException
updateObject
in interface ResultSet
SQLException
public void updateObject(int columnIndex, Object x, int scale) throws SQLException
updateObject
in interface ResultSet
SQLException
public void updateObject(String columnName, Object x, int scale) throws SQLException
updateObject
in interface ResultSet
SQLException
public void updateRow() throws SQLException
updateRow
in interface ResultSet
SQLException
public boolean rowUpdated() throws SQLException
rowUpdated
in interface ResultSet
SQLException
public boolean rowInserted() throws SQLException
rowInserted
in interface ResultSet
SQLException
public boolean rowDeleted() throws SQLException
rowDeleted
in interface ResultSet
SQLException
public void afterLast() throws SQLException
afterLast
in interface ResultSet
SQLException
public void beforeFirst() throws SQLException
beforeFirst
in interface ResultSet
SQLException
public boolean first() throws SQLException
first
in interface ResultSet
SQLException
public boolean last() throws SQLException
last
in interface ResultSet
SQLException
public boolean previous() throws SQLException
previous
in interface ResultSet
SQLException
public void cancelRowUpdates() throws SQLException
cancelRowUpdates
in interface ResultSet
SQLException
public void deleteRow() throws SQLException
deleteRow
in interface ResultSet
SQLException
public void moveToCurrentRow() throws SQLException
moveToCurrentRow
in interface ResultSet
SQLException
public void moveToInsertRow() throws SQLException
moveToInsertRow
in interface ResultSet
SQLException
public boolean relative(int rows) throws SQLException
relative
in interface ResultSet
SQLException
public void refreshRow() throws SQLException
refreshRow
in interface ResultSet
SQLException
public void insertRow() throws SQLException
insertRow
in interface ResultSet
SQLException
public boolean absolute(int row) throws SQLException
absolute
in interface ResultSet
SQLException
public String getCursorName() throws SQLException
In SQL, a result table is retrieved through a cursor that is named. The current row of a result can be updated or deleted using a positioned update/delete statement that references the cursor name.
JDBC supports this SQL feature by providing the name of the SQL cursor used by a ResultSet. The current row of a ResultSet is also the current row of this SQL cursor.
Note: If positioned update is not supported a java.sql.SQLException is thrown
getCursorName
in interface ResultSet
SQLException
public boolean isLast() throws SQLException
isLast
in interface ResultSet
SQLException
public boolean isFirst() throws SQLException
isFirst
in interface ResultSet
SQLException
public boolean isBeforeFirst() throws SQLException
isBeforeFirst
in interface ResultSet
SQLException
public boolean isAfterLast() throws SQLException
isAfterLast
in interface ResultSet
SQLException
public int getRow() throws SQLException
getRow
in interface ResultSet
SQLException
public void setMaxRows(int maxRows)
Statement.setMaxRows(int)
protected SQLException newConversionError(Object o, String className)
protected SQLException newConversionError(Object o, Class clazz)
protected SQLException newDirectionError()
protected SQLException newUpdatabilityError()
protected SQLException newFetchError(Throwable e)
private boolean toBoolean(Object o) throws SQLException
SQLException
private byte toByte(Object o) throws SQLException
SQLException
private Date toDate(Object o, TimeZone zone) throws SQLException
SQLException
private double toDouble(Object o) throws SQLException
SQLException
private float toFloat(Object o) throws SQLException
SQLException
private BigDecimal toBigDecimal(Object o) throws SQLException
SQLException
private int toInt(Object o) throws SQLException
SQLException
private long toLong(Object o) throws SQLException
SQLException
private long toLong_(Object o) throws SQLException
SQLException
private short toShort(Object o) throws SQLException
SQLException
private String toString(Object o)
private byte[] toBytes(Object o) throws SQLException
SQLException
private Time toTime(Object o, TimeZone zone) throws SQLException
SQLException
private Timestamp toTimestamp(Object o, TimeZone zone) throws SQLException
SQLException
public void updateBinaryStream(int columnIndex, InputStream inputStream) throws SQLException
SQLException
public void updateBinaryStream(String columnName, InputStream inputStream) throws SQLException
SQLException
public void updateBinaryStream(int columnIndex, InputStream inputStream, long len) throws SQLException
SQLException
public void updateBinaryStream(String columnName, InputStream inputStream, long len) throws SQLException
SQLException
public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException
SQLException
public void updateBlob(String columnName, InputStream inputStream) throws SQLException
SQLException
public void updateBlob(int columnIndex, InputStream inputStream, long len) throws SQLException
SQLException
public void updateBlob(String columnName, InputStream inputStream, long len) throws SQLException
SQLException
public void updateAsciiStream(int columnIndex, InputStream inputStream) throws SQLException
SQLException
public void updateAsciiStream(String columnName, InputStream inputStream, long len) throws SQLException
SQLException
public void updateAsciiStream(int columnIndex, InputStream inputStream, long len) throws SQLException
SQLException
public void updateAsciiStream(String columnName, InputStream inputStream) throws SQLException
SQLException
public void updateNClob(int columnIndex, Reader reader) throws SQLException
SQLException
public void updateNClob(String columnName, Reader reader) throws SQLException
SQLException
public void updateNClob(int columnIndex, NClob nclob) throws SQLException
SQLException
public void updateNClob(String columnName, NClob nclob) throws SQLException
SQLException
public void updateNClob(int columnIndex, Reader reader, long len) throws SQLException
SQLException
public void updateNClob(String columnName, Reader reader, long len) throws SQLException
SQLException
public void updateCharacterStream(int columnIndex, Reader reader) throws SQLException
SQLException
public void updateCharacterStream(String columnName, Reader reader) throws SQLException
SQLException
public void updateCharacterStream(int columnIndex, Reader reader, long len) throws SQLException
SQLException
public void updateCharacterStream(String columnName, Reader reader, long len) throws SQLException
SQLException
public void updateClob(int columnIndex, Reader reader) throws SQLException
SQLException
public void updateClob(String columnName, Reader reader) throws SQLException
SQLException
public void updateClob(int columnIndex, Reader reader, long len) throws SQLException
SQLException
public void updateClob(String columnName, Reader reader, long len) throws SQLException
SQLException
public void updateSQLXML(int columnIndex, SQLXML sqlxml) throws SQLException
SQLException
public void updateSQLXML(String columnName, SQLXML sqlxml) throws SQLException
SQLException
public void updateNCharacterStream(int columnIndex, Reader reader) throws SQLException
SQLException
public void updateNCharacterStream(String columnName, Reader reader) throws SQLException
SQLException
public void updateNCharacterStream(int columnIndex, Reader reader, long len) throws SQLException
SQLException
public void updateNCharacterStream(String columnName, Reader reader, long len) throws SQLException
SQLException
public void updateNString(int columnIndex, String s) throws SQLException
SQLException
public void updateNString(String columnName, String s) throws SQLException
SQLException
public void updateRowId(int columnIndex, RowId rowId) throws SQLException
SQLException
public void updateRowId(String columnName, RowId rowId) throws SQLException
SQLException
public Reader getNCharacterStream(String columnName) throws SQLException
SQLException
public Reader getNCharacterStream(int columnIndex) throws SQLException
SQLException
public String getNString(String columnName) throws SQLException
SQLException
public String getNString(int columnIndex) throws SQLException
SQLException
public SQLXML getSQLXML(String columnName) throws SQLException
SQLException
public SQLXML getSQLXML(int columnIndex) throws SQLException
SQLException
public NClob getNClob(String columnName) throws SQLException
SQLException
public NClob getNClob(int columnIndex) throws SQLException
SQLException
public RowId getRowId(String columnName) throws SQLException
SQLException
public RowId getRowId(int columnIndex) throws SQLException
SQLException
public boolean isClosed() throws SQLException
SQLException
public int getHoldability() throws SQLException
SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |