|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.sql.rowset.BaseRowSet com.sun.sql.rowset.BaseRowSetX com.sun.sql.rowset.JdbcRowSetXImpl
The standard implementation of the JdbcRowSetX
interface. See the interface
defintion for full behavior and implementation requirements.
Field Summary |
Fields inherited from class javax.sql.rowset.BaseRowSet |
ASCII_STREAM_PARAM, asciiStream, BINARY_STREAM_PARAM, binaryStream, charStream, UNICODE_STREAM_PARAM, unicodeStream |
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 | |
JdbcRowSetXImpl()
Constructs a default JdbcRowSetXImpl object instance. |
|
JdbcRowSetXImpl(java.sql.Connection con)
Constructs a JdbcRowSetX object given a
valid Connection object instance. |
|
JdbcRowSetXImpl(java.sql.ResultSet res)
Constructs a JdbcRowSetX object using a given valid
ResultSet object instance. |
|
JdbcRowSetXImpl(java.lang.String url,
java.lang.String user,
java.lang.String password)
Constructs a JdbcRowSetX object using the standard
JDBC URL and username and password parameters. |
Method Summary | |
boolean |
absolute(int row)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
void |
afterLast()
|
void |
beforeFirst()
|
void |
cancelRowUpdates()
|
void |
clearWarnings()
|
void |
close()
|
void |
closePreparedStatement()
Closes the internal PreparedStatement and
ResultSet objects. |
void |
closeResultSet()
Closes the internal ResultSet object. |
void |
commit()
Each JdbcRowSet contains a Connection object from
the ResultSet or JDBC properties passed to it's constructors. |
protected java.sql.Connection |
connect()
|
void |
deleteRow()
|
void |
execute()
|
int |
findColumn(java.lang.String columnName)
|
boolean |
first()
|
java.sql.Array |
getArray(int columnIndex)
|
java.sql.Array |
getArray(java.lang.String colName)
|
java.io.InputStream |
getAsciiStream(int columnIndex)
|
java.io.InputStream |
getAsciiStream(java.lang.String columnName)
|
boolean |
getAutoCommit()
Each JdbcRowSet contains a Connection object from
the original ResultSet or JDBC properties passed to it. |
java.math.BigDecimal |
getBigDecimal(int columnIndex)
|
java.math.BigDecimal |
getBigDecimal(int columnIndex,
int scale)
|
java.math.BigDecimal |
getBigDecimal(java.lang.String columnName)
|
java.math.BigDecimal |
getBigDecimal(java.lang.String columnName,
int scale)
|
java.io.InputStream |
getBinaryStream(int columnIndex)
|
java.io.InputStream |
getBinaryStream(java.lang.String columnName)
|
java.sql.Blob |
getBlob(int columnIndex)
|
java.sql.Blob |
getBlob(java.lang.String colName)
|
boolean |
getBoolean(int columnIndex)
|
boolean |
getBoolean(java.lang.String columnName)
|
byte |
getByte(int columnIndex)
|
byte |
getByte(java.lang.String columnName)
|
byte[] |
getBytes(int columnIndex)
|
byte[] |
getBytes(java.lang.String columnName)
|
java.io.Reader |
getCharacterStream(int columnIndex)
|
java.io.Reader |
getCharacterStream(java.lang.String columnName)
|
java.sql.Clob |
getClob(int columnIndex)
|
java.sql.Clob |
getClob(java.lang.String colName)
|
int |
getConcurrency()
Returns the concurrency for this RowSet object. |
java.lang.String |
getCursorName()
|
java.sql.DatabaseMetaData |
getDatabaseMetaData()
Retrieves a DatabaseMetaData object that contains
metadata about the database to which this
JdbcRowSetX object references. |
java.sql.Date |
getDate(int columnIndex)
|
java.sql.Date |
getDate(int columnIndex,
java.util.Calendar cal)
|
java.sql.Date |
getDate(java.lang.String columnName)
|
java.sql.Date |
getDate(java.lang.String columnName,
java.util.Calendar cal)
|
double |
getDouble(int columnIndex)
|
double |
getDouble(java.lang.String columnName)
|
int |
getFetchDirection()
Retrieves this RowSet object's current setting for the
fetch direction. |
int |
getFetchSize()
Returns the fetch size for this RowSet object. |
float |
getFloat(int columnIndex)
|
float |
getFloat(java.lang.String columnName)
|
int |
getHoldability()
Retrieves the current holdability of this JdbcRowSetX
object |
int |
getInt(int columnIndex)
|
int |
getInt(java.lang.String columnName)
|
long |
getLong(int columnIndex)
|
long |
getLong(java.lang.String columnName)
|
int[] |
getMatchColumnIndexes()
Retrieves the column id as int array that was set using
setMatchColumn(int []) for this rowset. |
java.lang.String[] |
getMatchColumnNames()
Retrieves the column name as String array
that was set using setMatchColumn(String [])
for this rowset. |
java.sql.ResultSetMetaData |
getMetaData()
Retrieves the number, types and properties of this rowset's ResultSet object's columns. |
java.lang.Object |
getObject(int columnIndex)
|
java.lang.Object |
getObject(int columnIndex,
java.util.Map map)
|
java.lang.Object |
getObject(java.lang.String columnName)
|
java.lang.Object |
getObject(java.lang.String colName,
java.util.Map map)
|
java.sql.ParameterMetaData |
getParameterMetaData()
Retrieves the number, types and properties of this JdbcRowSetX object's parameters. |
protected java.sql.PreparedStatement |
getPreparedStatement()
|
java.sql.Ref |
getRef(int columnIndex)
|
java.sql.Ref |
getRef(java.lang.String colName)
|
int |
getRow()
|
RowSetWarning |
getRowSetWarnings()
Retrieves the first warning reported by calls on this JdbcRowSet
object. |
short |
getShort(int columnIndex)
|
short |
getShort(java.lang.String columnName)
|
java.sql.Statement |
getStatement()
|
java.lang.String |
getString(int columnIndex)
|
java.lang.String |
getString(java.lang.String columnName)
|
java.sql.Time |
getTime(int columnIndex)
|
java.sql.Time |
getTime(int columnIndex,
java.util.Calendar cal)
|
java.sql.Time |
getTime(java.lang.String columnName)
|
java.sql.Time |
getTime(java.lang.String columnName,
java.util.Calendar cal)
|
java.sql.Timestamp |
getTimestamp(int columnIndex)
|
java.sql.Timestamp |
getTimestamp(int columnIndex,
java.util.Calendar cal)
|
java.sql.Timestamp |
getTimestamp(java.lang.String columnName)
|
java.sql.Timestamp |
getTimestamp(java.lang.String columnName,
java.util.Calendar cal)
|
int |
getType()
Returns the type of this RowSet object. |
java.io.InputStream |
getUnicodeStream(int columnIndex)
|
java.io.InputStream |
getUnicodeStream(java.lang.String columnName)
|
java.net.URL |
getURL(int columnIndex)
|
java.net.URL |
getURL(java.lang.String columnName)
|
java.sql.SQLWarning |
getWarnings()
|
void |
insertRow()
|
boolean |
isAfterLast()
|
boolean |
isBeforeFirst()
|
boolean |
isExecuted()
Returns true if this rowset is in an executed state |
boolean |
isFirst()
|
boolean |
isLast()
|
boolean |
last()
|
void |
moveToCurrentRow()
|
void |
moveToInsertRow()
|
boolean |
next()
|
boolean |
previous()
|
void |
refreshRow()
|
boolean |
relative(int rows)
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
Removes the given Savepoint object from the current
transaction. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
rollback()
Each JdbcRowSet contains a Connection object from
the original ResultSet or JDBC properties passed to it. |
void |
rollback(java.sql.Savepoint s)
Each JdbcRowSet contains a Connection object from
the original ResultSet or JDBC properties passed to it. |
boolean |
rowDeleted()
|
boolean |
rowInserted()
|
boolean |
rowUpdated()
|
void |
setAutoCommit(boolean autoCommit)
Each JdbcRowSet contains a Connection object from
the original ResultSet or JDBC properties passed to it. |
void |
setCommand(java.lang.String command)
Sets this RowSet object's command property to
the given String object and clears the parameters, if any,
that were set for the previous command. |
void |
setConcurrency(int concurrency)
Sets the concurrency for this RowSet object to
the specified concurrency. |
void |
setDataSourceName(java.lang.String dataSourceName)
Sets the DataSource name property for this RowSet
object to the given logical name and sets this RowSet object's
Url property to null . |
void |
setFetchDirection(int direction)
Gives the driver a performance hint as to the direction in which the rows in this RowSet object will be
processed. |
void |
setFetchSize(int rows)
Sets the fetch size for this RowSet object to the given number of
rows. |
void |
setHoldability(int holdability)
Changes the holdability of this JdbcRowSetX object
to the given holdability. |
void |
setMatchColumn(int columnIdx)
Sets the designated parameter to the given int
object. |
void |
setMatchColumn(int[] columnIdxes)
Sets the designated parameter to the given int array. |
void |
setMatchColumn(java.lang.String columnName)
Sets the designated parameter to the given String
object. |
void |
setMatchColumn(java.lang.String[] columnNames)
Sets the designated parameter to the given String array. |
void |
setMaxRows(int maxRows)
Sets the maximum number of rows that this RowSet object may contain to
the given number. |
void |
setPassword(java.lang.String password)
Sets the password used to create a database connection for this RowSet object to the given String
object. |
java.sql.Savepoint |
setSavepoint()
Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it. |
java.sql.Savepoint |
setSavepoint(java.lang.String name)
Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it. |
void |
setTransactionIsolation(int transactionIsolation)
Sets the transaction isolation property for this JDBC RowSet object to the given
constant. |
void |
setType(int type)
Sets the type for this RowSet object to the specified type. |
void |
setUrl(java.lang.String url)
Sets the Url property for this RowSet object
to the given String object and sets the dataSource name
property to null . |
void |
setUsername(java.lang.String username)
Sets the username property for this RowSet object
to the given user name. |
void |
unsetMatchColumn(int columnIdx)
Unsets the designated parameter to the given int
object. |
void |
unsetMatchColumn(int[] columnIdxes)
Unsets the designated parameter to the given int array. |
void |
unsetMatchColumn(java.lang.String columnName)
Unsets the designated parameter to the given String
object. |
void |
unsetMatchColumn(java.lang.String[] columnIdxes)
Unsets the designated parameter to the given String array. |
void |
updateArray(int columnIndex,
java.sql.Array a)
|
void |
updateArray(java.lang.String columnName,
java.sql.Array a)
|
void |
updateAsciiStream(int columnIndex,
java.io.InputStream x,
int length)
|
void |
updateAsciiStream(java.lang.String columnName,
java.io.InputStream x,
int length)
|
void |
updateBigDecimal(int columnIndex,
java.math.BigDecimal x)
|
void |
updateBigDecimal(java.lang.String columnName,
java.math.BigDecimal x)
|
void |
updateBinaryStream(int columnIndex,
java.io.InputStream x,
int length)
|
void |
updateBinaryStream(java.lang.String columnName,
java.io.InputStream x,
int length)
|
void |
updateBlob(int columnIndex,
java.sql.Blob b)
|
void |
updateBlob(java.lang.String columnName,
java.sql.Blob b)
|
void |
updateBoolean(int columnIndex,
boolean x)
|
void |
updateBoolean(java.lang.String columnName,
boolean x)
|
void |
updateByte(int columnIndex,
byte x)
|
void |
updateByte(java.lang.String columnName,
byte x)
|
void |
updateBytes(int columnIndex,
byte[] x)
|
void |
updateBytes(java.lang.String columnName,
byte[] x)
|
void |
updateCharacterStream(int columnIndex,
java.io.Reader x,
int length)
|
void |
updateCharacterStream(java.lang.String columnName,
java.io.Reader reader,
int length)
|
void |
updateClob(int columnIndex,
java.sql.Clob c)
|
void |
updateClob(java.lang.String columnName,
java.sql.Clob c)
|
void |
updateDate(int columnIndex,
java.sql.Date x)
|
void |
updateDate(java.lang.String columnName,
java.sql.Date x)
|
void |
updateDouble(int columnIndex,
double x)
|
void |
updateDouble(java.lang.String columnName,
double x)
|
void |
updateFloat(int columnIndex,
float x)
|
void |
updateFloat(java.lang.String columnName,
float x)
|
void |
updateInt(int columnIndex,
int x)
|
void |
updateInt(java.lang.String columnName,
int x)
|
void |
updateLong(int columnIndex,
long x)
|
void |
updateLong(java.lang.String columnName,
long x)
|
void |
updateNull(int columnIndex)
|
void |
updateNull(java.lang.String columnName)
|
void |
updateObject(int columnIndex,
java.lang.Object x)
|
void |
updateObject(int columnIndex,
java.lang.Object x,
int scale)
|
void |
updateObject(java.lang.String columnName,
java.lang.Object x)
|
void |
updateObject(java.lang.String columnName,
java.lang.Object x,
int scale)
|
void |
updateRef(int columnIndex,
java.sql.Ref ref)
|
void |
updateRef(java.lang.String columnName,
java.sql.Ref ref)
|
void |
updateRow()
|
void |
updateShort(int columnIndex,
short x)
|
void |
updateShort(java.lang.String columnName,
short x)
|
void |
updateString(int columnIndex,
java.lang.String x)
|
void |
updateString(java.lang.String columnName,
java.lang.String x)
|
void |
updateTime(int columnIndex,
java.sql.Time x)
|
void |
updateTime(java.lang.String columnName,
java.sql.Time x)
|
void |
updateTimestamp(int columnIndex,
java.sql.Timestamp x)
|
void |
updateTimestamp(java.lang.String columnName,
java.sql.Timestamp x)
|
boolean |
wasNull()
|
Methods inherited from class com.sun.sql.rowset.BaseRowSetX |
getMaxRows |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.rowset.JdbcRowSet |
getShowDeleted, setShowDeleted |
Methods inherited from interface javax.sql.RowSet |
addRowSetListener, clearParameters, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setEscapeProcessing, setFloat, setInt, setLong, setMaxFieldSize, setNull, setNull, setObject, setObject, setObject, setQueryTimeout, setReadOnly, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setTypeMap |
Constructor Detail |
public JdbcRowSetXImpl()
JdbcRowSetXImpl
object instance.
java.sql.SQLException
- if a database error occurspublic JdbcRowSetXImpl(java.sql.Connection con) throws java.sql.SQLException
JdbcRowSetX
object given a
valid Connection
object instance.
con
- - a JDBC Connection
instance
java.sql.SQLException
- if a database error occurspublic JdbcRowSetXImpl(java.lang.String url, java.lang.String user, java.lang.String password) throws java.sql.SQLException
JdbcRowSetX
object using the standard
JDBC URL and username and password parameters.
url
- - a database url of the form jdbc:subprotocol:subnameuser
- - the database user on whose behalf the connection
is being made.password
- - the user's password.
java.sql.SQLException
- if a database error occurspublic JdbcRowSetXImpl(java.sql.ResultSet res) throws java.sql.SQLException
JdbcRowSetX
object using a given valid
ResultSet
object instance.
res
- the ResultSet
object.
java.sql.SQLException
- if a database error occursMethod Detail |
public boolean isExecuted() throws java.sql.SQLException
JdbcRowSetX
true
if this rowset is in an executed state
isExecuted
in interface JdbcRowSetX
boolean
true
if, in its presnt state,
calls that act on the internal ResultSet
(e.g., next()
)
will not throw a SQLException
for the reason: "rowset not executed")
else returns false
java.sql.SQLException
- if a database access error occurspublic void execute() throws java.sql.SQLException
execute
in interface javax.sql.RowSet
java.sql.SQLException
protected java.sql.Connection connect() throws java.sql.SQLException
java.sql.SQLException
public void setCommand(java.lang.String command) throws java.sql.SQLException
BaseRowSetX
RowSet
object's command
property to
the given String
object and clears the parameters, if any,
that were set for the previous command.
The command
property may not be needed if the RowSet
object gets its data from a source that does not support commands,
such as a spreadsheet or other tabular file.
Thus, this property is optional and may be null
.
setCommand
in interface javax.sql.RowSet
setCommand
in class BaseRowSetX
command
- a String
object containing an SQL query
that will be set as this RowSet
object's command
property; may be null
but may not be an empty string
java.sql.SQLException
- if an empty string is provided as the command valueBaseRowSet.getCommand()
public void setDataSourceName(java.lang.String dataSourceName) throws java.sql.SQLException
BaseRowSetX
DataSource
name property for this RowSet
object to the given logical name and sets this RowSet
object's
Url property to null
. The name must have been bound to a
DataSource
object in a JNDI naming service so that an
application can do a lookup using that name to retrieve the
DataSource
object bound to it. The DataSource
object can then be used to establish a connection to the data source it
represents.
Users should set either the Url property or the dataSourceName property. If both properties are set, the driver will use the property set most recently.
setDataSourceName
in interface javax.sql.RowSet
setDataSourceName
in class BaseRowSetX
dataSourceName
- a String
object with the name that can be supplied
to a naming service based on JNDI technology to retrieve the
DataSource
object that can be used to get a connection;
may be null
but must not be an empty string
java.sql.SQLException
- if there is a problem setting the
dataSourceName
property or name is an empty stringBaseRowSet.getDataSourceName()
public void setUrl(java.lang.String url) throws java.sql.SQLException
BaseRowSetX
RowSet
object
to the given String
object and sets the dataSource name
property to null
. The Url property is a
JDBC URL that is used when
the connection is created using a JDBC technology-enabled driver
("JDBC driver") and the DriverManager
.
The correct JDBC URL for the specific driver to be used can be found
in the driver documentation. Although there are guidelines for for how
a JDBC URL is formed,
a driver vendor can specify any String
object except
one with a length of 0
(an empty string).
Setting the Url property is optional if connections are established using
a DataSource
object instead of the DriverManager
.
The driver will use either the URL property or the
dataSourceName property to create a connection, whichever was
specified most recently. If an application uses a JDBC URL, it
must load a JDBC driver that accepts the JDBC URL before it uses the
RowSet
object to connect to a database. The RowSet
object will use the URL internally to create a database connection in order
to read or write data.
setUrl
in interface javax.sql.RowSet
setUrl
in class BaseRowSetX
url
- a String
object that contains the JDBC URL
that will be used to establish the connection to a database for this
RowSet
object; may be null
but must not
be an empty string
java.sql.SQLException
- if an error occurs setting the Url property or the
parameter supplied is a string with a length of 0
(an
empty string)BaseRowSet.getUrl()
public void setUsername(java.lang.String username)
BaseRowSet
RowSet
object
to the given user name. Because it
is not serialized, the username property is set at run time before
calling the method execute
.
setUsername
in interface javax.sql.RowSet
setUsername
in class BaseRowSet
username
- the String
object containing the user name that
is supplied to the data source to create a connection. It may be null.BaseRowSet.getUsername()
public void setPassword(java.lang.String password)
BaseRowSet
RowSet
object to the given String
object. Because the password property is not
serialized, it is set at run time before calling the method
execute
.
setPassword
in interface javax.sql.RowSet
setPassword
in class BaseRowSet
password
- the String
object that represents the password
that is supplied to the database to create a connection. It may be
null.BaseRowSet.getPassword()
public void setType(int type) throws java.sql.SQLException
BaseRowSet
RowSet
object to the specified type.
The default type is ResultSet.TYPE_SCROLL_INSENSITIVE
.
setType
in interface javax.sql.RowSet
setType
in class BaseRowSet
type
- one of the following constants:
ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or
ResultSet.TYPE_SCROLL_SENSITIVE
java.sql.SQLException
- if the parameter supplied is not one of the
following constants:
ResultSet.TYPE_FORWARD_ONLY
or
ResultSet.TYPE_SCROLL_INSENSITIVE
ResultSet.TYPE_SCROLL_SENSITIVE
BaseRowSet.getConcurrency()
,
BaseRowSet.getType()
public void setConcurrency(int concurrency) throws java.sql.SQLException
BaseRowSet
RowSet
object to
the specified concurrency. The default concurrency for any RowSet
object (connected or disconnected) is ResultSet.CONCUR_UPDATABLE
,
but this method may be called at any time to change the concurrency.
setConcurrency
in interface javax.sql.RowSet
setConcurrency
in class BaseRowSet
concurrency
- one of the following constants:
ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
java.sql.SQLException
- if the parameter supplied is not one of the
following constants:
ResultSet.CONCUR_UPDATABLE
or
ResultSet.CONCUR_READ_ONLY
BaseRowSet.getConcurrency()
,
BaseRowSet.isReadOnly()
public void setTransactionIsolation(int transactionIsolation) throws java.sql.SQLException
BaseRowSet
RowSet
object to the given
constant. The DBMS will use this transaction isolation level for
transactions if it can.
For RowSet
implementations such as
the CachedRowSet
that operate in a disconnected environment,
the SyncProvider
object being used
offers complementary locking and data integrity options. The
options described below are pertinent only to connected RowSet
objects (JdbcRowSet
objects).
setTransactionIsolation
in interface javax.sql.RowSet
setTransactionIsolation
in class BaseRowSet
transactionIsolation
- one of the following constants, listed in ascending order:
Connection.TRANSACTION_NONE
,
Connection.TRANSACTION_READ_UNCOMMITTED
,
Connection.TRANSACTION_READ_COMMITTED
,
Connection.TRANSACTION_REPEATABLE_READ
, or
Connection.TRANSACTION_SERIALIZABLE
java.sql.SQLException
- if the given parameter is not one of the Connection
constantsSyncFactory
,
SyncProvider
,
BaseRowSet.getTransactionIsolation()
public void setMaxRows(int maxRows) throws java.sql.SQLException
BaseRowSetX
RowSet
object may contain to
the given number. If this limit is exceeded, the excess rows are
silently dropped.
setMaxRows
in interface javax.sql.RowSet
setMaxRows
in class BaseRowSetX
maxRows
- an int
indicating the current maximum number
of rows; zero means that there is no limit
java.sql.SQLException
- if an error occurs internally setting the
maximum limit on the number of rows that a JDBC RowSet
object
can contain; or if max is less than 0
; or
if max is less than the fetchSize
of the
RowSet
protected java.sql.PreparedStatement getPreparedStatement() throws java.sql.SQLException
java.sql.SQLException
public boolean next() throws java.sql.SQLException
next
in interface java.sql.ResultSet
java.sql.SQLException
public void close()
close
in interface java.sql.ResultSet
public void closePreparedStatement()
JdbcRowSetX
PreparedStatement
and
ResultSet
objects.
closePreparedStatement
in interface JdbcRowSetX
public void closeResultSet()
JdbcRowSetX
ResultSet
object.
closeResultSet
in interface JdbcRowSetX
public boolean wasNull() throws java.sql.SQLException
wasNull
in interface java.sql.ResultSet
java.sql.SQLException
public java.lang.String getString(int columnIndex) throws java.sql.SQLException
getString
in interface java.sql.ResultSet
java.sql.SQLException
public boolean getBoolean(int columnIndex) throws java.sql.SQLException
getBoolean
in interface java.sql.ResultSet
java.sql.SQLException
public byte getByte(int columnIndex) throws java.sql.SQLException
getByte
in interface java.sql.ResultSet
java.sql.SQLException
public short getShort(int columnIndex) throws java.sql.SQLException
getShort
in interface java.sql.ResultSet
java.sql.SQLException
public int getInt(int columnIndex) throws java.sql.SQLException
getInt
in interface java.sql.ResultSet
java.sql.SQLException
public long getLong(int columnIndex) throws java.sql.SQLException
getLong
in interface java.sql.ResultSet
java.sql.SQLException
public float getFloat(int columnIndex) throws java.sql.SQLException
getFloat
in interface java.sql.ResultSet
java.sql.SQLException
public double getDouble(int columnIndex) throws java.sql.SQLException
getDouble
in interface java.sql.ResultSet
java.sql.SQLException
public java.math.BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
java.sql.SQLException
public byte[] getBytes(int columnIndex) throws java.sql.SQLException
getBytes
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Date getDate(int columnIndex) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Time getTime(int columnIndex) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException
getAsciiStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException
getUnicodeStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException
getBinaryStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.lang.String getString(java.lang.String columnName) throws java.sql.SQLException
getString
in interface java.sql.ResultSet
java.sql.SQLException
public boolean getBoolean(java.lang.String columnName) throws java.sql.SQLException
getBoolean
in interface java.sql.ResultSet
java.sql.SQLException
public byte getByte(java.lang.String columnName) throws java.sql.SQLException
getByte
in interface java.sql.ResultSet
java.sql.SQLException
public short getShort(java.lang.String columnName) throws java.sql.SQLException
getShort
in interface java.sql.ResultSet
java.sql.SQLException
public int getInt(java.lang.String columnName) throws java.sql.SQLException
getInt
in interface java.sql.ResultSet
java.sql.SQLException
public long getLong(java.lang.String columnName) throws java.sql.SQLException
getLong
in interface java.sql.ResultSet
java.sql.SQLException
public float getFloat(java.lang.String columnName) throws java.sql.SQLException
getFloat
in interface java.sql.ResultSet
java.sql.SQLException
public double getDouble(java.lang.String columnName) throws java.sql.SQLException
getDouble
in interface java.sql.ResultSet
java.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.lang.String columnName, int scale) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
java.sql.SQLException
public byte[] getBytes(java.lang.String columnName) throws java.sql.SQLException
getBytes
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Date getDate(java.lang.String columnName) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Time getTime(java.lang.String columnName) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String columnName) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException
getAsciiStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.InputStream getUnicodeStream(java.lang.String columnName) throws java.sql.SQLException
getUnicodeStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException
getBinaryStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.ResultSet
java.sql.SQLException
public void clearWarnings()
clearWarnings
in interface java.sql.ResultSet
public java.lang.String getCursorName() throws java.sql.SQLException
getCursorName
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
ResultSet
object's columns.
getMetaData
in interface java.sql.ResultSet
ResultSet
object's columns
java.sql.SQLException
- if a database access error occurspublic java.lang.Object getObject(int columnIndex) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
java.sql.SQLException
public java.lang.Object getObject(java.lang.String columnName) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
java.sql.SQLException
public int findColumn(java.lang.String columnName) throws java.sql.SQLException
findColumn
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.Reader getCharacterStream(int columnIndex) throws java.sql.SQLException
getCharacterStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.io.Reader getCharacterStream(java.lang.String columnName) throws java.sql.SQLException
getCharacterStream
in interface java.sql.ResultSet
java.sql.SQLException
public java.math.BigDecimal getBigDecimal(int columnIndex) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
java.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.lang.String columnName) throws java.sql.SQLException
getBigDecimal
in interface java.sql.ResultSet
java.sql.SQLException
public boolean isBeforeFirst() throws java.sql.SQLException
isBeforeFirst
in interface java.sql.ResultSet
java.sql.SQLException
public boolean isAfterLast() throws java.sql.SQLException
isAfterLast
in interface java.sql.ResultSet
java.sql.SQLException
public boolean isFirst() throws java.sql.SQLException
isFirst
in interface java.sql.ResultSet
java.sql.SQLException
public boolean isLast() throws java.sql.SQLException
isLast
in interface java.sql.ResultSet
java.sql.SQLException
public void beforeFirst() throws java.sql.SQLException
beforeFirst
in interface java.sql.ResultSet
java.sql.SQLException
public void afterLast() throws java.sql.SQLException
afterLast
in interface java.sql.ResultSet
java.sql.SQLException
public boolean first() throws java.sql.SQLException
first
in interface java.sql.ResultSet
java.sql.SQLException
public boolean last() throws java.sql.SQLException
last
in interface java.sql.ResultSet
java.sql.SQLException
public int getRow() throws java.sql.SQLException
getRow
in interface java.sql.ResultSet
java.sql.SQLException
public boolean absolute(int row) throws java.sql.SQLException
absolute
in interface java.sql.ResultSet
java.sql.SQLException
public boolean relative(int rows) throws java.sql.SQLException
relative
in interface java.sql.ResultSet
java.sql.SQLException
public boolean previous() throws java.sql.SQLException
previous
in interface java.sql.ResultSet
java.sql.SQLException
public void setFetchDirection(int direction) throws java.sql.SQLException
BaseRowSetX
RowSet
object will be
processed. The driver may ignore this hint.
A RowSet
object inherits the default properties of the
ResultSet
object from which it got its data. That
ResultSet
object's default fetch direction is set by
the Statement
object that created it.
This method applies to a RowSet
object only while it is
connected to a database using a JDBC driver.
A RowSet
object may use this method at any time to change
its setting for the fetch direction.
setFetchDirection
in interface java.sql.ResultSet
setFetchDirection
in class BaseRowSetX
direction
- one of ResultSet.FETCH_FORWARD
,
ResultSet.FETCH_REVERSE
, or
ResultSet.FETCH_UNKNOWN
java.sql.SQLException
- if (1) the RowSet
type is
TYPE_FORWARD_ONLY
and the given fetch direction is not
FETCH_FORWARD
or (2) the given fetch direction is not
one of the following:
ResultSet.FETCH_FORWARD,
ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWNBaseRowSetX.getFetchDirection()
public int getFetchDirection() throws java.sql.SQLException
BaseRowSetX
RowSet
object's current setting for the
fetch direction. The default type is ResultSet.FETCH_FORWARD
getFetchDirection
in interface java.sql.ResultSet
getFetchDirection
in class BaseRowSetX
ResultSet.FETCH_FORWARD
,
ResultSet.FETCH_REVERSE
, or
ResultSet.FETCH_UNKNOWN
java.sql.SQLException
- if an error occurs in determining the
current fetch direction for fetching rowsBaseRowSetX.setFetchDirection(int)
public void setFetchSize(int rows) throws java.sql.SQLException
BaseRowSetX
RowSet
object to the given number of
rows. The fetch size gives a JDBC technology-enabled driver ("JDBC driver")
a hint as to the
number of rows that should be fetched from the database when more rows
are needed for this RowSet
object. If the fetch size specified
is zero, the driver ignores the value and is free to make its own best guess
as to what the fetch size should be.
A RowSet
object inherits the default properties of the
ResultSet
object from which it got its data. That
ResultSet
object's default fetch size is set by
the Statement
object that created it.
This method applies to a RowSet
object only while it is
connected to a database using a JDBC driver.
For connected RowSet
implementations such as
JdbcRowSet
, this method has a direct and immediate effect
on the underlying JDBC driver.
A RowSet
object may use this method at any time to change
its setting for the fetch size.
For RowSet
implementations such as
CachedRowSet
, which operate in a disconnected environment,
the SyncProvider
object being used
may leverage the fetch size to poll the data source and
retrieve a number of rows that do not exceed the fetch size and that may
form a subset of the actual rows returned by the original query. This is
an implementation variance determined by the specific SyncProvider
object employed by the disconnected RowSet
object.
setFetchSize
in interface java.sql.ResultSet
setFetchSize
in class BaseRowSetX
rows
- the number of rows to fetch; 0
to let the
driver decide what the best fetch size is; must not be less
than 0
or more than the maximum number of rows
allowed for this RowSet
object (the number returned
by a call to the method BaseRowSetX.getMaxRows()
)
java.sql.SQLException
- if the specified fetch size is less than 0
or more than the limit for the maximum number of rowsBaseRowSetX.getFetchSize()
public int getFetchSize() throws java.sql.SQLException
BaseRowSetX
RowSet
object. The default
value is zero.
getFetchSize
in interface java.sql.ResultSet
getFetchSize
in class BaseRowSetX
RowSet
object
needs more rows from the database
java.sql.SQLException
- if an error occurs determining the number of rows in the
current fetch sizeBaseRowSetX.setFetchSize(int)
public int getType() throws java.sql.SQLException
BaseRowSet
RowSet
object. The type is initially
determined by the statement that created the RowSet
object.
The RowSet
object can call the method
setType
at any time to change its
type. The default is TYPE_SCROLL_INSENSITIVE
.
getType
in interface java.sql.ResultSet
getType
in class BaseRowSet
RowSet
object, which must be one of the following:
ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or
ResultSet.TYPE_SCROLL_SENSITIVE
java.sql.SQLException
- if an error occurs getting the type of
of this RowSet
objectBaseRowSet.setType(int)
public int getConcurrency() throws java.sql.SQLException
BaseRowSet
RowSet
object.
The default is CONCUR_UPDATABLE
for both connected and
disconnected RowSet
objects.
An application can call the method setConcurrency
at any time
to change a RowSet
object's concurrency.
getConcurrency
in interface java.sql.ResultSet
getConcurrency
in class BaseRowSet
RowSet
object, which must be one of the following:
ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
java.sql.SQLException
- if an error occurs getting the concurrency
of this RowSet
objectBaseRowSet.setConcurrency(int)
,
BaseRowSet.isReadOnly()
public boolean rowUpdated() throws java.sql.SQLException
rowUpdated
in interface java.sql.ResultSet
java.sql.SQLException
public boolean rowInserted() throws java.sql.SQLException
rowInserted
in interface java.sql.ResultSet
java.sql.SQLException
public boolean rowDeleted() throws java.sql.SQLException
rowDeleted
in interface java.sql.ResultSet
java.sql.SQLException
public void updateNull(int columnIndex) throws java.sql.SQLException
updateNull
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLException
updateBoolean
in interface java.sql.ResultSet
java.sql.SQLException
public void updateByte(int columnIndex, byte x) throws java.sql.SQLException
updateByte
in interface java.sql.ResultSet
java.sql.SQLException
public void updateShort(int columnIndex, short x) throws java.sql.SQLException
updateShort
in interface java.sql.ResultSet
java.sql.SQLException
public void updateInt(int columnIndex, int x) throws java.sql.SQLException
updateInt
in interface java.sql.ResultSet
java.sql.SQLException
public void updateLong(int columnIndex, long x) throws java.sql.SQLException
updateLong
in interface java.sql.ResultSet
java.sql.SQLException
public void updateFloat(int columnIndex, float x) throws java.sql.SQLException
updateFloat
in interface java.sql.ResultSet
java.sql.SQLException
public void updateDouble(int columnIndex, double x) throws java.sql.SQLException
updateDouble
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.SQLException
updateBigDecimal
in interface java.sql.ResultSet
java.sql.SQLException
public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLException
updateString
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBytes(int columnIndex, byte[] x) throws java.sql.SQLException
updateBytes
in interface java.sql.ResultSet
java.sql.SQLException
public void updateDate(int columnIndex, java.sql.Date x) throws java.sql.SQLException
updateDate
in interface java.sql.ResultSet
java.sql.SQLException
public void updateTime(int columnIndex, java.sql.Time x) throws java.sql.SQLException
updateTime
in interface java.sql.ResultSet
java.sql.SQLException
public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLException
updateTimestamp
in interface java.sql.ResultSet
java.sql.SQLException
public void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException
updateAsciiStream
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException
updateBinaryStream
in interface java.sql.ResultSet
java.sql.SQLException
public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.SQLException
updateCharacterStream
in interface java.sql.ResultSet
java.sql.SQLException
public void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.SQLException
updateObject
in interface java.sql.ResultSet
java.sql.SQLException
public void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLException
updateObject
in interface java.sql.ResultSet
java.sql.SQLException
public void updateNull(java.lang.String columnName) throws java.sql.SQLException
updateNull
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBoolean(java.lang.String columnName, boolean x) throws java.sql.SQLException
updateBoolean
in interface java.sql.ResultSet
java.sql.SQLException
public void updateByte(java.lang.String columnName, byte x) throws java.sql.SQLException
updateByte
in interface java.sql.ResultSet
java.sql.SQLException
public void updateShort(java.lang.String columnName, short x) throws java.sql.SQLException
updateShort
in interface java.sql.ResultSet
java.sql.SQLException
public void updateInt(java.lang.String columnName, int x) throws java.sql.SQLException
updateInt
in interface java.sql.ResultSet
java.sql.SQLException
public void updateLong(java.lang.String columnName, long x) throws java.sql.SQLException
updateLong
in interface java.sql.ResultSet
java.sql.SQLException
public void updateFloat(java.lang.String columnName, float x) throws java.sql.SQLException
updateFloat
in interface java.sql.ResultSet
java.sql.SQLException
public void updateDouble(java.lang.String columnName, double x) throws java.sql.SQLException
updateDouble
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x) throws java.sql.SQLException
updateBigDecimal
in interface java.sql.ResultSet
java.sql.SQLException
public void updateString(java.lang.String columnName, java.lang.String x) throws java.sql.SQLException
updateString
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBytes(java.lang.String columnName, byte[] x) throws java.sql.SQLException
updateBytes
in interface java.sql.ResultSet
java.sql.SQLException
public void updateDate(java.lang.String columnName, java.sql.Date x) throws java.sql.SQLException
updateDate
in interface java.sql.ResultSet
java.sql.SQLException
public void updateTime(java.lang.String columnName, java.sql.Time x) throws java.sql.SQLException
updateTime
in interface java.sql.ResultSet
java.sql.SQLException
public void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x) throws java.sql.SQLException
updateTimestamp
in interface java.sql.ResultSet
java.sql.SQLException
public void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException
updateAsciiStream
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length) throws java.sql.SQLException
updateBinaryStream
in interface java.sql.ResultSet
java.sql.SQLException
public void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length) throws java.sql.SQLException
updateCharacterStream
in interface java.sql.ResultSet
java.sql.SQLException
public void updateObject(java.lang.String columnName, java.lang.Object x, int scale) throws java.sql.SQLException
updateObject
in interface java.sql.ResultSet
java.sql.SQLException
public void updateObject(java.lang.String columnName, java.lang.Object x) throws java.sql.SQLException
updateObject
in interface java.sql.ResultSet
java.sql.SQLException
public void insertRow() throws java.sql.SQLException
insertRow
in interface java.sql.ResultSet
java.sql.SQLException
public void updateRow() throws java.sql.SQLException
updateRow
in interface java.sql.ResultSet
java.sql.SQLException
public void deleteRow() throws java.sql.SQLException
deleteRow
in interface java.sql.ResultSet
java.sql.SQLException
public void refreshRow() throws java.sql.SQLException
refreshRow
in interface java.sql.ResultSet
java.sql.SQLException
public void cancelRowUpdates() throws java.sql.SQLException
cancelRowUpdates
in interface java.sql.ResultSet
java.sql.SQLException
public void moveToInsertRow() throws java.sql.SQLException
moveToInsertRow
in interface java.sql.ResultSet
java.sql.SQLException
public void moveToCurrentRow() throws java.sql.SQLException
moveToCurrentRow
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Statement getStatement() throws java.sql.SQLException
getStatement
in interface java.sql.ResultSet
java.sql.SQLException
public java.lang.Object getObject(int columnIndex, java.util.Map map) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Ref getRef(int columnIndex) throws java.sql.SQLException
getRef
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Blob getBlob(int columnIndex) throws java.sql.SQLException
getBlob
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Clob getClob(int columnIndex) throws java.sql.SQLException
getClob
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Array getArray(int columnIndex) throws java.sql.SQLException
getArray
in interface java.sql.ResultSet
java.sql.SQLException
public java.lang.Object getObject(java.lang.String colName, java.util.Map map) throws java.sql.SQLException
getObject
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Ref getRef(java.lang.String colName) throws java.sql.SQLException
getRef
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Blob getBlob(java.lang.String colName) throws java.sql.SQLException
getBlob
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Clob getClob(java.lang.String colName) throws java.sql.SQLException
getClob
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Array getArray(java.lang.String colName) throws java.sql.SQLException
getArray
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Date getDate(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Date getDate(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException
getDate
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Time getTime(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Time getTime(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException
getTime
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Timestamp getTimestamp(int columnIndex, java.util.Calendar cal) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
java.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal) throws java.sql.SQLException
getTimestamp
in interface java.sql.ResultSet
java.sql.SQLException
public void updateRef(int columnIndex, java.sql.Ref ref) throws java.sql.SQLException
updateRef
in interface java.sql.ResultSet
java.sql.SQLException
public void updateRef(java.lang.String columnName, java.sql.Ref ref) throws java.sql.SQLException
updateRef
in interface java.sql.ResultSet
java.sql.SQLException
public void updateClob(int columnIndex, java.sql.Clob c) throws java.sql.SQLException
updateClob
in interface java.sql.ResultSet
java.sql.SQLException
public void updateClob(java.lang.String columnName, java.sql.Clob c) throws java.sql.SQLException
updateClob
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBlob(int columnIndex, java.sql.Blob b) throws java.sql.SQLException
updateBlob
in interface java.sql.ResultSet
java.sql.SQLException
public void updateBlob(java.lang.String columnName, java.sql.Blob b) throws java.sql.SQLException
updateBlob
in interface java.sql.ResultSet
java.sql.SQLException
public void updateArray(int columnIndex, java.sql.Array a) throws java.sql.SQLException
updateArray
in interface java.sql.ResultSet
java.sql.SQLException
public void updateArray(java.lang.String columnName, java.sql.Array a) throws java.sql.SQLException
updateArray
in interface java.sql.ResultSet
java.sql.SQLException
public java.net.URL getURL(int columnIndex) throws java.sql.SQLException
getURL
in interface java.sql.ResultSet
java.sql.SQLException
public java.net.URL getURL(java.lang.String columnName) throws java.sql.SQLException
getURL
in interface java.sql.ResultSet
java.sql.SQLException
public RowSetWarning getRowSetWarnings() throws java.sql.SQLException
JdbcRowSet
JdbcRowSet
object.
If a second warning was reported on this JdbcRowSet
object,
it will be chained to the first warning and can be retrieved by
calling the method RowSetWarning.getNextWarning
on the
first warning. Subsequent warnings on this JdbcRowSet
object will be chained to the RowSetWarning
objects
returned by the method RowSetWarning.getNextWarning
.
The warning chain is automatically cleared each time a new row is read.
This method may not be called on a RowSet
object
that has been closed;
doing so will cause an SQLException
to be thrown.
Because it is always connected to its data source, a JdbcRowSet
object can rely on the presence of active
Statement
, Connection
, and ResultSet
instances. This means that applications can obtain additional
SQLWarning
notifications by calling the getNextWarning
methods that
they provide.
Disconnected Rowset
objects, such as a
CachedRowSet
object, do not have access to
these getNextWarning
methods.
getRowSetWarnings
in interface JdbcRowSet
RowSetWarning
object reported on this JdbcRowSet
object
or null
if there are none
java.sql.SQLException
- if this method is called on a closed
JdbcRowSet
objectRowSetWarning
public void unsetMatchColumn(int[] columnIdxes) throws java.sql.SQLException
setMatchColumn
as the column which will form the basis of the join.
The parameter value unset by this method should be same as was set.
unsetMatchColumn
in interface Joinable
columnIdxes
- the index into this rowset
object's internal representation of parameter values
java.sql.SQLException
- if an error occurs or the
parameter index is out of bounds or if the columnIdx is
not the same as set using setMatchColumn(int [])
Joinable.setMatchColumn(int)
public void unsetMatchColumn(java.lang.String[] columnIdxes) throws java.sql.SQLException
setMatchColumn
as the column which will form the basis of the join.
The parameter value unset by this method should be same as was set.
unsetMatchColumn
in interface Joinable
columnIdxes
- the index into this rowset
object's internal representation of parameter values
java.sql.SQLException
- if an error occurs or the
parameter index is out of bounds or if the columnName is
not the same as set using setMatchColumn(String [])
Joinable.setMatchColumn(int)
public java.lang.String[] getMatchColumnNames() throws java.sql.SQLException
String
array
that was set using setMatchColumn(String [])
for this rowset.
getMatchColumnNames
in interface Joinable
String
array object that contains the column names
for the rowset which has this the match columns
java.sql.SQLException
- if an error occurs or column name is not setJoinable.setMatchColumn(int)
,
Joinable.unsetMatchColumn(int)
public int[] getMatchColumnIndexes() throws java.sql.SQLException
int
array that was set using
setMatchColumn(int [])
for this rowset.
getMatchColumnIndexes
in interface Joinable
int
array object that contains the column ids
for the rowset which has this as the match columns.
java.sql.SQLException
- if an error occurs or column index is not setJoinable.setMatchColumn(int)
,
Joinable.unsetMatchColumn(int)
public void setMatchColumn(int[] columnIdxes) throws java.sql.SQLException
JoinRowSet
as the column which will form the basis of the
join.
The parameter value set by this method is stored internally and
will be supplied as the appropriate parameter in this rowset's
command when the method getMatchColumnIndexes
is called.
setMatchColumn
in interface Joinable
columnIdxes
- the indexes into this rowset
object's internal representation of parameter values; the
first parameter is 0, the second is 1, and so on; must be
0
or greater
java.sql.SQLException
- if an error occurs or the
parameter index is out of boundsJoinable.setMatchColumn(int[])
,
Joinable.unsetMatchColumn(int[])
public void setMatchColumn(java.lang.String[] columnNames) throws java.sql.SQLException
JoinRowSet
as the column which will form the basis of the
join.
The parameter value set by this method is stored internally and
will be supplied as the appropriate parameter in this rowset's
command when the method getMatchColumn
is called.
setMatchColumn
in interface Joinable
columnNames
- the name of the column into this rowset
object's internal representation of parameter values
java.sql.SQLException
- if an error occurs or the
parameter index is out of boundsJoinable.unsetMatchColumn(int)
,
Joinable.setMatchColumn(int[])
public void setMatchColumn(int columnIdx) throws java.sql.SQLException
int
object. This forms the basis of the join for the
JoinRowSet
as the column which will form the basis of the
join.
The parameter value set by this method is stored internally and
will be supplied as the appropriate parameter in this rowset's
command when the method getMatchColumn
is called.
setMatchColumn
in interface Joinable
columnIdx
- the index into this rowset
object's internal representation of parameter values; the
first parameter is 0, the second is 1, and so on; must be
0
or greater
java.sql.SQLException
- if an error occurs or the
parameter index is out of boundsJoinable.setMatchColumn(int[])
,
Joinable.unsetMatchColumn(int)
public void setMatchColumn(java.lang.String columnName) throws java.sql.SQLException
String
object. This forms the basis of the join for the
JoinRowSet
as the column which will form the basis of the
join.
The parameter value set by this method is stored internally and
will be supplied as the appropriate parameter in this rowset's
command when the method getMatchColumn
is called.
setMatchColumn
in interface Joinable
columnName
- the name of the column into this rowset
object's internal representation of parameter values
java.sql.SQLException
- if an error occurs or the
parameter index is out of boundsJoinable.unsetMatchColumn(int)
,
Joinable.setMatchColumn(int[])
public void unsetMatchColumn(int columnIdx) throws java.sql.SQLException
int
object. This was set using setMatchColumn
as the column which will form the basis of the join.
The parameter value unset by this method should be same as was set.
unsetMatchColumn
in interface Joinable
columnIdx
- the index into this rowset
object's internal representation of parameter values
java.sql.SQLException
- if an error occurs or the
parameter index is out of bounds or if the columnIdx is
not the same as set using setMatchColumn(int)
Joinable.setMatchColumn(int)
public void unsetMatchColumn(java.lang.String columnName) throws java.sql.SQLException
String
object. This was set using setMatchColumn
as the column which will form the basis of the join.
The parameter value unset by this method should be same as was set.
unsetMatchColumn
in interface Joinable
columnName
- the index into this rowset
object's internal representation of parameter values
java.sql.SQLException
- if an error occurs or the
parameter index is out of bounds or if the columnName is
not the same as set using setMatchColumn(String)
Joinable.setMatchColumn(int)
public java.sql.DatabaseMetaData getDatabaseMetaData() throws java.sql.SQLException
JdbcRowSetX
DatabaseMetaData
object that contains
metadata about the database to which this
JdbcRowSetX
object references.
The metadata includes information about the database's
tables, its supported SQL grammar, its stored
procedures, the capabilities of this connection, and so on.
getDatabaseMetaData
in interface JdbcRowSetX
DatabaseMetaData
object for this
Connection
object
java.sql.SQLException
- if a database access error occurspublic void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
JdbcRowSetX
Savepoint
object from the current
transaction. Any reference to the savepoint after it have been removed
will cause an SQLException
to be thrown.
releaseSavepoint
in interface JdbcRowSetX
savepoint
- the Savepoint
object to be removed
java.sql.SQLException
- if a database access error occurs or
the given Savepoint
object is not a valid
savepoint in the current transactionpublic java.sql.Savepoint setSavepoint() throws java.sql.SQLException
JdbcRowSetX
Savepoint
object that represents it.
setSavepoint
in interface JdbcRowSetX
Savepoint
object
java.sql.SQLException
- if a database access error occurs
or this Connection
object is currently in
auto-commit modeSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
JdbcRowSetX
Savepoint
object that represents it.
setSavepoint
in interface JdbcRowSetX
name
- a String
containing the name of the savepoint
Savepoint
object
java.sql.SQLException
- if a database access error occurs
or this Connection
object is currently in
auto-commit modeSavepoint
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
JdbcRowSetX
JdbcRowSetX
object's parameters.
getParameterMetaData
in interface JdbcRowSetX
ParameterMetaData
object that contains information
about the number, types and properties of this
PreparedStatement
object's parameters
java.sql.SQLException
- if a database access error occursParameterMetaData
public void commit() throws java.sql.SQLException
JdbcRowSet
JdbcRowSet
contains a Connection
object from
the ResultSet
or JDBC properties passed to it's constructors.
This method wraps the Connection
commit method to allow flexible
auto commit or non auto commit transactional control support.
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.
commit
in interface JdbcRowSet
java.sql.SQLException
- if a database access error occurs or this
Connection object within this JdbcRowSet
is in auto-commit modeConnection.setAutoCommit(boolean)
public void rollback() throws java.sql.SQLException
JdbcRowSet
JdbcRowSet
contains a Connection
object from
the original ResultSet
or JDBC properties passed to it.
Undoes all changes made in the current transaction and releases any
database locks currently held by this Connection
object. This method
should be used only when auto-commit mode has been disabled.
rollback
in interface JdbcRowSet
java.sql.SQLException
- if a database access error occurs or this Connection
object within this JdbcRowSet
is in auto-commit mode.JdbcRowSet.rollback(Savepoint)
public void rollback(java.sql.Savepoint s) throws java.sql.SQLException
JdbcRowSet
JdbcRowSet
contains a Connection
object from
the original ResultSet
or JDBC properties passed to it.
Undoes all changes made in the current transaction to the last set savepoint
and releases any database locks currently held by this Connection
object. This method should be used only when auto-commit mode has been disabled.
rollback
in interface JdbcRowSet
java.sql.SQLException
- if a database access error occurs or this Connection
object within this JdbcRowSet
is in auto-commit mode.JdbcRowSet.rollback()
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
JdbcRowSet
JdbcRowSet
contains a Connection
object from
the original ResultSet
or JDBC properties passed to it. This
method wraps the Connection
's getAutoCommit
method
to allow an application to set the JdbcRowSet
transaction behavior.
Sets the current auto-commit mode for this Connection
object.
setAutoCommit
in interface JdbcRowSet
Connection
object's
auto-commit mode
java.sql.SQLException
- if a database access error occursConnection.setAutoCommit(boolean)
public boolean getAutoCommit() throws java.sql.SQLException
JdbcRowSet
JdbcRowSet
contains a Connection
object from
the original ResultSet
or JDBC properties passed to it. This
method wraps the Connection
's getAutoCommit
method
to allow an application to determine the JdbcRowSet
transaction
behavior.
Sets this connection's auto-commit mode to the given state. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode.
getAutoCommit
in interface JdbcRowSet
java.sql.SQLException
- if a database access error occursConnection.getAutoCommit()
public void setHoldability(int holdability) throws java.sql.SQLException
JdbcRowSetX
JdbcRowSetX
object
to the given holdability.
setHoldability
in interface JdbcRowSetX
holdability
- a ResultSet
holdability constant; one of
ResultSet.HOLD_CURSORS_OVER_COMMIT
or
ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException
- if a database access occurs, the given parameter
is not a ResultSet
constant indicating holdability,
or the given holdability is not supportedJdbcRowSetX.getHoldability()
public int getHoldability() throws java.sql.SQLException
JdbcRowSetX
JdbcRowSetX
object
getHoldability
in interface JdbcRowSetX
ResultSet.HOLD_CURSORS_OVER_COMMIT
or
ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException
- if a database access occursJdbcRowSetX.setHoldability(int)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
JdbcRowSetX
PropertyChangeListener
to the listener list.
The listener is registered for all bound properties.
addPropertyChangeListener
in interface JdbcRowSetX
listener
- The PropertyChangeListener to be addedpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
JdbcRowSetX
addPropertyChangeListener
in interface JdbcRowSetX
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
JdbcRowSetX
PropertyChangeListener
from the listener list.
This removes a PropertyChangeListener
that was registered
for all bound properties.
removePropertyChangeListener
in interface JdbcRowSetX
listener
- The PropertyChangeListener to be removedpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
JdbcRowSetX
removePropertyChangeListener
in interface JdbcRowSetX
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |