|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The standard interface that all standard implementations of
JdbcRowSetX
must implement.
JdbcRowSet
interface.
A JdbcRowSetX
object differs from a JdbcRowSet object
in the following ways:
getParameterMetaData
method allows one to get
ParameterMetaData
information about the parameters
specified in the JdbcRowSetX
's command property.
getDatabaseMetaData
method allows one to get
DatabaseMetaData
about the database to which the
JdbcRowSetX
is connected.
releaseSavepoint
(Savepoint
),
setSavepoint
() and setSavepoint
(Savepiont
)
methods have been added since the parent JdbcRowSet
interface contains the rollback
(Savepoint
) method,
but no way to use it.
closeResultSet
method allows one to close the
internal ResultSet
, thus freeing up resources,
without having to call close() (which would also close the
internal PreparedStatement
and Connection
closePrepared
method allows one to close the
internal ResultSet
and PreparedStatement
,
thus freeing up resources, without having to call close() (which
would also close the Connection
ResultSetHoldability
via the
getHoldability
and setHoldability
methods.
PropertyChangeListener
support
The following are bound properties:
command
concurrency
dataSourceName
holdability
maxRows
password
transactionIsolation
type
url
username
JdbcRowSetX
after calling
close
on it. That is, calling close
will free up resources and a new Connection
and
a new PreparedStatement
(both used internally by
the JdbcRowSetX
) will be created as needed.
Furthermore, one may call execute
again to create
another ResultSet
(again, used internally)
JdbcRowSetX
's properties are set to:
autoCommit
: false
command
: null
concurrency
: CONCUR_READ_ONLY
escapeProcessing
: true
holdability
: HOLD_CURSORS_OVER_COMMIT
maxFieldSize
: 0
maxRows
: 0
password
: null
queryTimeout
: 0
readOnly
: true
(ignored)
showDeleted
: false
(ignored)
transactionIsolation
: TRANSACTION_READ_COMMITTED
type
: TYPE_SCROLL_INSENSITIVE
typeMap
: null
url
: null
username
: null
showDeleted
property is currently not used
(i.e., whether or not deleted rows are visible is a function of
the underlying JDBC driver)
readOnly
property is currently not used
getRowSetWarnings
will always return null (it is not
used.
getWarnings
will return a chain of
SQLWarning
objects that pertain to the Connection
,
PreparedStatement
and ResultSet
objects internal
to this JdbcRowSetX
clearWarnings
will clear the warnings for the internal
Connection
, PreparedStatement
and
ResultSet
objects. It will never throw a SQLException
Connection
,
PreparedStatement
and ResultSet
)
are invalidated by property changes
autoCommit
: nothing is invalidated
command
: invalidates PreparedStatement
and
ResultSet
concurrency
: invalidates Connection
,
PreparedStatement
and ResultSet
escapeProcessing
: nothing is invalidated
holdability
: invalidates PreparedStatement
and
ResultSet
maxFieldSize
: nothing is invalidated
maxRows
: nothing is invalidated
password
: invalidates Connection
,
PreparedStatement
and ResultSet
queryTimeout
: nothing is invalidated
readOnly
: nothing is invalidated
showDeleted
: nothing is invalidated
transactionIsolation
: invalidates Connection
,
PreparedStatement
and ResultSet
type
: nothing is invalidated
typeMap
: nothing is invalidated
url
: invalidates Connection
,
PreparedStatement
and ResultSet
username
: invalidates Connection
,
PreparedStatement
and ResultSet
close
will never throw a SQLException
Field Summary |
Fields inherited from interface java.sql.ResultSet |
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE |
Method Summary | |
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 |
closePreparedStatement()
Closes the internal PreparedStatement and
ResultSet objects. |
void |
closeResultSet()
Closes the internal ResultSet object. |
java.sql.DatabaseMetaData |
getDatabaseMetaData()
Retrieves a DatabaseMetaData object that contains
metadata about the database to which this
JdbcRowSetX object references. |
int |
getHoldability()
Retrieves the current holdability of this JdbcRowSetX
object |
java.sql.ParameterMetaData |
getParameterMetaData()
Retrieves the number, types and properties of this JdbcRowSetX object's parameters. |
boolean |
isExecuted()
Returns true if this rowset is in an executed state |
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 |
setHoldability(int holdability)
Changes the holdability of this JdbcRowSetX object
to the given holdability. |
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. |
Methods inherited from interface javax.sql.rowset.JdbcRowSet |
commit, getAutoCommit, getRowSetWarnings, getShowDeleted, rollback, rollback, setAutoCommit, setShowDeleted |
Methods inherited from interface javax.sql.RowSet |
addRowSetListener, clearParameters, execute, getCommand, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getMaxRows, getPassword, getQueryTimeout, getTransactionIsolation, getTypeMap, getUrl, getUsername, isReadOnly, removeRowSetListener, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setCommand, setConcurrency, setDataSourceName, setDate, setDate, setDouble, setEscapeProcessing, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setPassword, setQueryTimeout, setReadOnly, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setTransactionIsolation, setType, setTypeMap, setUrl, setUsername |
Methods inherited from interface java.sql.ResultSet |
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getInt, getInt, getLong, getLong, getMetaData, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull |
Methods inherited from interface javax.sql.rowset.Joinable |
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
Method Detail |
public boolean isExecuted() throws java.sql.SQLException
true
if this rowset is in an executed state
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 java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
JdbcRowSetX
object's parameters.
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 java.sql.DatabaseMetaData getDatabaseMetaData() throws java.sql.SQLException
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.
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
Savepoint
object from the current
transaction. Any reference to the savepoint after it have been removed
will cause an SQLException
to be thrown.
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
Savepoint
object that represents it.
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
Savepoint
object that represents it.
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 void setHoldability(int holdability) throws java.sql.SQLException
JdbcRowSetX
object
to the given holdability.
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 supportedgetHoldability()
public int getHoldability() throws java.sql.SQLException
JdbcRowSetX
object
ResultSet.HOLD_CURSORS_OVER_COMMIT
or
ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException
- if a database access occurssetHoldability(int)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
to the listener list.
The listener is registered for all bound properties.
listener
- The PropertyChangeListener to be addedpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
from the listener list.
This removes a PropertyChangeListener
that was registered
for all bound properties.
listener
- The PropertyChangeListener to be removedpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removedpublic void closePreparedStatement()
PreparedStatement
and
ResultSet
objects.
public void closeResultSet()
ResultSet
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |