|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.sql.rowset.BaseRowSet
com.sun.sql.rowset.BaseRowSetX
com.sun.sql.rowset.CachedRowSetXImpl5
public abstract class CachedRowSetXImpl5
The reference implementation of the CachedRowSetX interface. See the interface
definition for full behavior and implementation requirements.
Note: This implementation is based on the Sun Microsystems Reference Implemenation of
CachedRowSet
All jdbc4.0-specific methods have been split offinto a sub-class CachedRowSetXImpl, to
enable usage in both JDK5 and JDK6. This class, which has been made abstract, is
used in the BeanInfo when running in JDK5.
| Field Summary | |
|---|---|
protected int |
cursorPos
The current postion of the cursor in this CachedRowSetXImpl
object. |
protected boolean |
internalUseInstance
The internalUseInstance flag tells to ignore exceptional conditions
with regard to the rowset not being executed. |
protected int |
numDeleted
The number of deleted rows currently in this CachedRowSetXImpl
object. |
protected int |
numRows
The total number of rows currently in this CachedRowSetXImpl
object. |
protected java.beans.PropertyChangeSupport |
propertyChangeSupport
The PropertyChangeSupport object helps in providing
support for property change listeners. |
protected javax.sql.rowset.spi.SyncProvider |
provider
The SyncProvider used by the CachedRowSet |
protected static java.util.ResourceBundle |
rb
|
protected javax.sql.RowSetMetaData |
rowSetMD
The RowSetMetaData object that contains information about
the columns in this CachedRowSetXImpl object. |
protected javax.sql.RowSetReader |
rowSetReader
The RowSetReaderImpl object that is the reader
for this rowset. |
protected javax.sql.rowset.RowSetWarning |
rowsetWarning
A RowSetWarning which logs on the warnings |
protected javax.sql.RowSetWriter |
rowSetWriter
The RowSetWriterImpl object that is the writer
for this rowset. |
protected java.util.Vector |
rvh
A Vector object containing the Row
objects that comprise this CachedRowSetXImpl object. |
protected java.sql.SQLWarning |
sqlwarn
A SQLWarning which logs on the warnings |
| 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 javax.sql.rowset.CachedRowSet |
|---|
COMMIT_ON_ACCEPT_CHANGES |
| 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 | |
|---|---|
CachedRowSetXImpl5()
|
|
| Method Summary | |
|---|---|
boolean |
absolute(int row)
|
void |
acceptChanges()
|
void |
acceptChanges(java.sql.Connection con)
|
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()
|
protected java.lang.Object |
clone()
Returns a new RowSet object containing by the same data
as this CachedRowSetXImpl object. |
void |
close()
|
boolean |
columnUpdated(int idx)
|
boolean |
columnUpdated(java.lang.String columnName)
|
void |
commit()
|
javax.sql.rowset.CachedRowSet |
createCopy()
|
javax.sql.rowset.CachedRowSet |
createCopyNoConstraints()
|
javax.sql.rowset.CachedRowSet |
createCopySchema()
|
javax.sql.RowSet |
createShared()
|
void |
deleteRow()
|
void |
execute()
|
void |
execute(java.sql.Connection conn)
|
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)
|
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.lang.String |
getCatalogName()
Returns the catalog in which the table referred to by the tableName property
resides. |
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)
|
java.lang.String[] |
getColumnCatalogNames()
Returns an array of String. |
java.lang.String |
getColumnCatalogNames(int index)
Returns a String which contains the catalog name set for the column or
null. |
java.lang.String[] |
getColumnNames()
Returns an array of String. |
java.lang.String |
getColumnNames(int index)
Returns a String which contains the column name set for the column or
null. |
java.lang.String[] |
getColumnSchemaNames()
Returns an array of String. |
java.lang.String |
getColumnSchemaNames(int index)
Returns a String which contains the schema name set for the column or
null. |
java.lang.String[] |
getColumnTableNames()
Returns an array of String. |
java.lang.String |
getColumnTableNames(int index)
Returns a String which contains the table name set for the column or
null. |
java.sql.Connection |
getConnection()
Retrieves the Connection object passed to this
CachedRowSetXImpl object. |
protected com.sun.rowset.internal.BaseRow |
getCurrentRow()
Returns the insert row or the current row of this CachedRowSetXImplobject. |
java.lang.String |
getCursorName()
|
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)
|
float |
getFloat(int columnIndex)
|
float |
getFloat(java.lang.String columnName)
|
boolean[] |
getInsertableColumns()
Returns an array of boolean{/code>. |
boolean |
getInsertableColumns(int index)
Returns a boolean{/code> of |
int |
getInt(int columnIndex)
|
int |
getInt(java.lang.String columnName)
|
int[] |
getKeyColumns()
|
long |
getLong(int columnIndex)
|
long |
getLong(java.lang.String columnName)
|
int[] |
getMatchColumnIndexes()
|
java.lang.String[] |
getMatchColumnNames()
|
java.sql.ResultSetMetaData |
getMetaData()
|
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 columnName,
java.util.Map map)
|
abstract java.sql.ResultSet |
getOriginal()
|
abstract java.sql.ResultSet |
getOriginalRow()
|
int |
getPageSize()
|
boolean |
getPrintStatements()
Returns the printStatements property. |
java.sql.Ref |
getRef(int columnIndex)
|
java.sql.Ref |
getRef(java.lang.String colName)
|
int |
getRow()
|
javax.sql.rowset.RowSetWarning |
getRowSetWarnings()
|
java.lang.String |
getSchemaName()
Returns the schema in which the table referred to by the tableName property
resides. |
short |
getShort(int columnIndex)
|
short |
getShort(java.lang.String columnName)
|
java.sql.Statement |
getStatement()
Returns null. |
java.lang.String |
getString(int columnIndex)
|
java.lang.String |
getString(java.lang.String columnName)
|
javax.sql.rowset.spi.SyncProvider |
getSyncProvider()
|
java.lang.String |
getTableName()
|
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)
|
java.io.InputStream |
getUnicodeStream(int columnIndex)
|
java.io.InputStream |
getUnicodeStream(java.lang.String columnName)
|
boolean[] |
getUpdatableColumns()
Returns an array of boolean{/code>. |
boolean |
getUpdatableColumns(int index)
Returns a boolean{/code> of |
java.net.URL |
getURL(int columnIndex)
|
java.net.URL |
getURL(java.lang.String columnName)
|
java.sql.SQLWarning |
getWarnings()
|
protected void |
initContainer()
Sets the rvh field to a new Vector
object with a capacity of 100 and sets the
cursorPos and numRows fields to zero. |
protected void |
initParams()
|
protected void |
initProperties()
Sets the properties for this CachedRowSetXImpl object to
their default values. |
void |
insertRow()
|
protected boolean |
internalFirst()
|
protected boolean |
internalLast()
|
protected boolean |
internalNext()
Moves this CachedRowSetXImpl object's cursor to the next
row and returns true if the cursor is still in the rowset;
returns false if the cursor has moved to the position after
the last row. |
protected boolean |
internalPrevious()
|
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 |
nextPage()
|
void |
populate(java.sql.ResultSet data)
|
void |
populate(java.sql.ResultSet data,
int start)
|
boolean |
previous()
|
boolean |
previousPage()
|
void |
refreshRow()
|
boolean |
relative(int rows)
|
void |
release()
|
protected void |
removeCurrentRow()
Removes the row on which the cursor is positioned. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Deprecated. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
restoreOriginal()
|
void |
rollback()
|
void |
rollback(java.sql.Savepoint s)
|
boolean |
rowDeleted()
|
boolean |
rowInserted()
|
void |
rowSetPopulated(javax.sql.RowSetEvent event,
int numRows)
|
boolean |
rowUpdated()
|
void |
setCatalogName(java.lang.String catalogName)
Sets the identifier for catalog of the table referred to in the tableName
property. |
void |
setColumnCatalogNames(int index,
java.lang.String columnCatalogName)
Set the columnCatalogNames property. |
void |
setColumnCatalogNames(java.lang.String[] columnCatalogNames)
Set the columnCatalogNames property. |
void |
setColumnNames(int index,
java.lang.String columnName)
Set the columnNames property. |
void |
setColumnNames(java.lang.String[] columnNames)
Set the columnNames property. |
void |
setColumnSchemaNames(int index,
java.lang.String columnSchemaName)
Set the columnSchemaNames property. |
void |
setColumnSchemaNames(java.lang.String[] columnSchemaNames)
Set the columnSchemaNames property. |
void |
setColumnTableNames(int index,
java.lang.String columnTableName)
Set the columnTableNames property. |
void |
setColumnTableNames(java.lang.String[] columnTableNames)
Set the columnTableNames property. |
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)
|
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 |
setInsertableColumns(boolean[] insertableColumns)
Set the insertableColumns property. |
void |
setInsertableColumns(int index,
boolean insertableColumn)
Set the insertableColumns property. |
void |
setKeyColumns(int[] keys)
|
void |
setMatchColumn(int columnIdx)
|
void |
setMatchColumn(int[] columnIdxes)
|
void |
setMatchColumn(java.lang.String columnName)
|
void |
setMatchColumn(java.lang.String[] columnNames)
|
void |
setMaxRows(int maxRows)
Sets the maximum number of rows that this RowSet object may contain to
the given number. |
void |
setMetaData(javax.sql.RowSetMetaData md)
|
void |
setOriginal()
|
void |
setOriginalRow()
|
void |
setPageSize(int size)
|
void |
setPassword(java.lang.String password)
|
void |
setPrintStatements(boolean printStatements)
Sets the printStatements property. |
void |
setReadOnly(boolean isReadOnly)
|
void |
setSchemaName(java.lang.String schemaName)
Sets the identifier for schema of the table referred to in the tableName
property. |
void |
setSyncProvider(java.lang.String providerStr)
|
void |
setTableName(java.lang.String tabName)
|
void |
setTransactionIsolation(int transactionIsolation)
|
void |
setType(int type)
|
void |
setUpdatableColumns(boolean[] updatableColumns)
Set the updatableColumns property. |
void |
setUpdatableColumns(int index,
boolean updatableColumn)
Set the updatableColumns property. |
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)
|
int |
size()
|
java.util.Collection |
toCollection()
|
java.util.Collection |
toCollection(int column)
|
java.util.Collection |
toCollection(java.lang.String column)
|
void |
undoDelete()
|
void |
undoInsert()
|
void |
undoUpdate()
|
void |
unsetMatchColumn(int columnIdx)
|
void |
unsetMatchColumn(int[] columnIdxes)
|
void |
unsetMatchColumn(java.lang.String columnName)
|
void |
unsetMatchColumn(java.lang.String[] columnIdxes)
|
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 |
|---|
getFetchDirection, getFetchSize, getMaxRows, setFetchDirection, setFetchSize |
| Methods inherited from class javax.sql.rowset.BaseRowSet |
|---|
addRowSetListener, clearParameters, getCommand, getConcurrency, getDataSourceName, getEscapeProcessing, getMaxFieldSize, getParams, getPassword, getQueryTimeout, getShowDeleted, getTransactionIsolation, getType, getTypeMap, getUrl, getUsername, isReadOnly, notifyCursorMoved, notifyRowChanged, notifyRowSetChanged, 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, setRef, setShort, setShowDeleted, setString, setTime, setTime, setTimestamp, setTimestamp, setTypeMap, setUnicodeStream |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.sql.rowset.CachedRowSet |
|---|
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, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setTypeMap |
| Methods inherited from interface java.sql.ResultSet |
|---|
getConcurrency, getFetchDirection, getFetchSize, getType, setFetchDirection, setFetchSize |
| Methods inherited from interface javax.sql.RowSetInternal |
|---|
getParams |
| Field Detail |
|---|
protected static java.util.ResourceBundle rb
protected java.beans.PropertyChangeSupport propertyChangeSupport
PropertyChangeSupport object helps in providing
support for property change listeners.
protected boolean internalUseInstance
internalUseInstance flag tells to ignore exceptional conditions
with regard to the rowset not being executed. We must do this because this class
is also used internally and methods are called that would result in a rowset not
executed sqlexception if the user called them.
protected javax.sql.rowset.spi.SyncProvider provider
SyncProvider used by the CachedRowSet
protected javax.sql.RowSetReader rowSetReader
RowSetReaderImpl object that is the reader
for this rowset. The method execute uses this
reader as part of its implementation.
protected javax.sql.RowSetWriter rowSetWriter
RowSetWriterImpl object that is the writer
for this rowset. The method acceptChanges uses
this writer as part of its implementation.
protected javax.sql.RowSetMetaData rowSetMD
RowSetMetaData object that contains information about
the columns in this CachedRowSetXImpl object.
protected java.util.Vector rvh
Vector object containing the Row
objects that comprise this CachedRowSetXImpl object.
protected int cursorPos
CachedRowSetXImpl
object.
protected int numDeleted
CachedRowSetXImpl
object.
protected int numRows
CachedRowSetXImpl
object.
protected java.sql.SQLWarning sqlwarn
SQLWarning which logs on the warnings
protected javax.sql.rowset.RowSetWarning rowsetWarning
RowSetWarning which logs on the warnings
| Constructor Detail |
|---|
public CachedRowSetXImpl5()
| Method Detail |
|---|
protected void initParams()
initParams in class javax.sql.rowset.BaseRowSet
public boolean isExecuted()
throws java.sql.SQLException
true if this rowset is in an executed state
isExecuted in interface CachedRowSetXboolean true if the CachedRowSetX
is in a state where navigation and getters and setters can be called on rows
returned from the database (i.e., returns true if execute()
or populate has been called.
java.sql.SQLException - if a database access error occurs
public void setDataSourceName(java.lang.String dataSourceName)
throws java.sql.SQLException
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.RowSetsetDataSourceName in class BaseRowSetXdataSourceName - 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
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.RowSetsetUrl in class BaseRowSetXurl - 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)
setUsername in interface javax.sql.RowSetsetUsername in class javax.sql.rowset.BaseRowSetpublic void setPassword(java.lang.String password)
setPassword in interface javax.sql.RowSetsetPassword in class javax.sql.rowset.BaseRowSet
public void setType(int type)
throws java.sql.SQLException
setType in interface javax.sql.RowSetsetType in class javax.sql.rowset.BaseRowSetjava.sql.SQLException
public void setConcurrency(int concurrency)
throws java.sql.SQLException
setConcurrency in interface javax.sql.RowSetsetConcurrency in class javax.sql.rowset.BaseRowSetjava.sql.SQLException
public void setTransactionIsolation(int transactionIsolation)
throws java.sql.SQLException
setTransactionIsolation in interface javax.sql.RowSetsetTransactionIsolation in class javax.sql.rowset.BaseRowSetjava.sql.SQLException
public void setMaxRows(int maxRows)
throws java.sql.SQLException
RowSet object may contain to
the given number. If this limit is exceeded, the excess rows are
silently dropped.
setMaxRows in interface javax.sql.RowSetsetMaxRows in class BaseRowSetXmaxRows - 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
RowSetpublic void setReadOnly(boolean isReadOnly)
setReadOnly in interface javax.sql.RowSetsetReadOnly in class javax.sql.rowset.BaseRowSetpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener to the listener list.
The listener is registered for all bound properties.
addPropertyChangeListener in interface CachedRowSetXlistener - The PropertyChangeListener to be added
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface CachedRowSetXpropertyName - 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.
removePropertyChangeListener in interface CachedRowSetXlistener - The PropertyChangeListener to be removed
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface CachedRowSetXpropertyName - The name of the property that was listened on.listener - The PropertyChangeListener to be removedprotected void initContainer()
rvh field to a new Vector
object with a capacity of 100 and sets the
cursorPos and numRows fields to zero.
protected void initProperties()
throws java.sql.SQLException
CachedRowSetXImpl object to
their default values. This method is called internally by the
default constructor.
java.sql.SQLException
public void setCommand(java.lang.String command)
throws java.sql.SQLException
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.RowSetsetCommand in class BaseRowSetXcommand - 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 populate(java.sql.ResultSet data)
throws java.sql.SQLException
populate in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void execute(java.sql.Connection conn)
throws java.sql.SQLException
execute in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void acceptChanges()
throws javax.sql.rowset.spi.SyncProviderException
acceptChanges in interface javax.sql.rowset.CachedRowSetjavax.sql.rowset.spi.SyncProviderException
public void acceptChanges(java.sql.Connection con)
throws javax.sql.rowset.spi.SyncProviderException
acceptChanges in interface javax.sql.rowset.CachedRowSetjavax.sql.rowset.spi.SyncProviderException
public void restoreOriginal()
throws java.sql.SQLException
restoreOriginal in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void release()
throws java.sql.SQLException
release in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void undoDelete()
throws java.sql.SQLException
undoDelete in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void undoInsert()
throws java.sql.SQLException
undoInsert in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void undoUpdate()
throws java.sql.SQLException
undoUpdate in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public javax.sql.RowSet createShared()
throws java.sql.SQLException
createShared in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
RowSet object containing by the same data
as this CachedRowSetXImpl object. This method
differs from the method createCopy in that it throws a
CloneNotSupportedException object instead of an
SQLException object, as the method createShared
does. This clone
method is called internally by the method createShared,
which catches the CloneNotSupportedException object
and in turn throws a new SQLException object.
clone in class java.lang.ObjectCachedRowSetXImpl object
java.lang.CloneNotSupportedException - if an error occurs when
attempting to clone this CachedRowSetXImpl objectcreateShared()
public javax.sql.rowset.CachedRowSet createCopy()
throws java.sql.SQLException
createCopy in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public javax.sql.rowset.CachedRowSet createCopySchema()
throws java.sql.SQLException
createCopySchema in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public javax.sql.rowset.CachedRowSet createCopyNoConstraints()
throws java.sql.SQLException
createCopyNoConstraints in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public java.util.Collection toCollection()
throws java.sql.SQLException
toCollection in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public java.util.Collection toCollection(int column)
throws java.sql.SQLException
toCollection in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public java.util.Collection toCollection(java.lang.String column)
throws java.sql.SQLException
toCollection in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public javax.sql.rowset.spi.SyncProvider getSyncProvider()
throws java.sql.SQLException
getSyncProvider in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void setSyncProvider(java.lang.String providerStr)
throws java.sql.SQLException
setSyncProvider in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void execute()
throws java.sql.SQLException
execute in interface javax.sql.RowSetjava.sql.SQLException
public boolean next()
throws java.sql.SQLException
next in interface java.sql.ResultSetjava.sql.SQLException
protected boolean internalNext()
throws java.sql.SQLException
CachedRowSetXImpl object's cursor to the next
row and returns true if the cursor is still in the rowset;
returns false if the cursor has moved to the position after
the last row.
This method handles the cases where the cursor moves to a row that has been deleted. If this rowset shows deleted rows and the cursor moves to a row that has been deleted, this method moves the cursor to the next row until the cursor is on a row that has not been deleted.
The method internalNext is called by methods such as
next, absolute, and relative,
and, as its name implies, is only called internally.
This is a implementation only method and is not required as a standard
implementation of the CachedRowSet interface.
true if the cursor is on a valid row in this
rowset; false if it is after the last row
java.sql.SQLException - if an error occurspublic void close()
close in interface java.sql.ResultSet
public boolean wasNull()
throws java.sql.SQLException
wasNull in interface java.sql.ResultSetjava.sql.SQLException
protected com.sun.rowset.internal.BaseRow getCurrentRow()
throws java.sql.SQLException
CachedRowSetXImplobject.
Row object on which this CachedRowSetXImpl
objects's cursor is positioned
java.sql.SQLException
protected void removeCurrentRow()
throws java.sql.SQLException
This is a implementation only method and is not required as a standard
implementation of the CachedRowSet interface.
java.sql.SQLException - if the cursor is positioned on the insert
row
public java.lang.String getString(int columnIndex)
throws java.sql.SQLException
getString in interface java.sql.ResultSetjava.sql.SQLException
public boolean getBoolean(int columnIndex)
throws java.sql.SQLException
getBoolean in interface java.sql.ResultSetjava.sql.SQLException
public byte getByte(int columnIndex)
throws java.sql.SQLException
getByte in interface java.sql.ResultSetjava.sql.SQLException
public short getShort(int columnIndex)
throws java.sql.SQLException
getShort in interface java.sql.ResultSetjava.sql.SQLException
public int getInt(int columnIndex)
throws java.sql.SQLException
getInt in interface java.sql.ResultSetjava.sql.SQLException
public long getLong(int columnIndex)
throws java.sql.SQLException
getLong in interface java.sql.ResultSetjava.sql.SQLException
public float getFloat(int columnIndex)
throws java.sql.SQLException
getFloat in interface java.sql.ResultSetjava.sql.SQLException
public double getDouble(int columnIndex)
throws java.sql.SQLException
getDouble in interface java.sql.ResultSetjava.sql.SQLException
public java.math.BigDecimal getBigDecimal(int columnIndex,
int scale)
throws java.sql.SQLException
getBigDecimal in interface java.sql.ResultSetjava.sql.SQLException
public byte[] getBytes(int columnIndex)
throws java.sql.SQLException
getBytes in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Date getDate(int columnIndex)
throws java.sql.SQLException
getDate in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Time getTime(int columnIndex)
throws java.sql.SQLException
getTime in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Timestamp getTimestamp(int columnIndex)
throws java.sql.SQLException
getTimestamp in interface java.sql.ResultSetjava.sql.SQLException
public java.io.InputStream getAsciiStream(int columnIndex)
throws java.sql.SQLException
getAsciiStream in interface java.sql.ResultSetjava.sql.SQLException
public java.io.InputStream getUnicodeStream(int columnIndex)
throws java.sql.SQLException
getUnicodeStream in interface java.sql.ResultSetjava.sql.SQLException
public java.io.InputStream getBinaryStream(int columnIndex)
throws java.sql.SQLException
getBinaryStream in interface java.sql.ResultSetjava.sql.SQLException
public java.lang.String getString(java.lang.String columnName)
throws java.sql.SQLException
getString in interface java.sql.ResultSetjava.sql.SQLException
public boolean getBoolean(java.lang.String columnName)
throws java.sql.SQLException
getBoolean in interface java.sql.ResultSetjava.sql.SQLException
public byte getByte(java.lang.String columnName)
throws java.sql.SQLException
getByte in interface java.sql.ResultSetjava.sql.SQLException
public short getShort(java.lang.String columnName)
throws java.sql.SQLException
getShort in interface java.sql.ResultSetjava.sql.SQLException
public int getInt(java.lang.String columnName)
throws java.sql.SQLException
getInt in interface java.sql.ResultSetjava.sql.SQLException
public long getLong(java.lang.String columnName)
throws java.sql.SQLException
getLong in interface java.sql.ResultSetjava.sql.SQLException
public float getFloat(java.lang.String columnName)
throws java.sql.SQLException
getFloat in interface java.sql.ResultSetjava.sql.SQLException
public double getDouble(java.lang.String columnName)
throws java.sql.SQLException
getDouble in interface java.sql.ResultSetjava.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.lang.String columnName,
int scale)
throws java.sql.SQLException
getBigDecimal in interface java.sql.ResultSetjava.sql.SQLException
public byte[] getBytes(java.lang.String columnName)
throws java.sql.SQLException
getBytes in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Date getDate(java.lang.String columnName)
throws java.sql.SQLException
getDate in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Time getTime(java.lang.String columnName)
throws java.sql.SQLException
getTime in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String columnName)
throws java.sql.SQLException
getTimestamp in interface java.sql.ResultSetjava.sql.SQLException
public java.io.InputStream getAsciiStream(java.lang.String columnName)
throws java.sql.SQLException
getAsciiStream in interface java.sql.ResultSetjava.sql.SQLException
public java.io.InputStream getUnicodeStream(java.lang.String columnName)
throws java.sql.SQLException
getUnicodeStream in interface java.sql.ResultSetjava.sql.SQLException
public java.io.InputStream getBinaryStream(java.lang.String columnName)
throws java.sql.SQLException
getBinaryStream in interface java.sql.ResultSetjava.sql.SQLExceptionpublic java.sql.SQLWarning getWarnings()
getWarnings in interface java.sql.ResultSetpublic void clearWarnings()
clearWarnings in interface java.sql.ResultSet
public java.lang.String getCursorName()
throws java.sql.SQLException
getCursorName in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.ResultSetjava.sql.SQLException
public java.lang.Object getObject(int columnIndex)
throws java.sql.SQLException
getObject in interface java.sql.ResultSetjava.sql.SQLException
public java.lang.Object getObject(java.lang.String columnName)
throws java.sql.SQLException
getObject in interface java.sql.ResultSetjava.sql.SQLException
public int findColumn(java.lang.String columnName)
throws java.sql.SQLException
findColumn in interface java.sql.ResultSetjava.sql.SQLException
public java.io.Reader getCharacterStream(int columnIndex)
throws java.sql.SQLException
getCharacterStream in interface java.sql.ResultSetjava.sql.SQLException
public java.io.Reader getCharacterStream(java.lang.String columnName)
throws java.sql.SQLException
getCharacterStream in interface java.sql.ResultSetjava.sql.SQLException
public java.math.BigDecimal getBigDecimal(int columnIndex)
throws java.sql.SQLException
getBigDecimal in interface java.sql.ResultSetjava.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.lang.String columnName)
throws java.sql.SQLException
getBigDecimal in interface java.sql.ResultSetjava.sql.SQLExceptionpublic int size()
size in interface javax.sql.rowset.CachedRowSet
public boolean isBeforeFirst()
throws java.sql.SQLException
isBeforeFirst in interface java.sql.ResultSetjava.sql.SQLException
public boolean isAfterLast()
throws java.sql.SQLException
isAfterLast in interface java.sql.ResultSetjava.sql.SQLException
public boolean isFirst()
throws java.sql.SQLException
isFirst in interface java.sql.ResultSetjava.sql.SQLException
public boolean isLast()
throws java.sql.SQLException
isLast in interface java.sql.ResultSetjava.sql.SQLException
public void beforeFirst()
throws java.sql.SQLException
beforeFirst in interface java.sql.ResultSetjava.sql.SQLException
public void afterLast()
throws java.sql.SQLException
afterLast in interface java.sql.ResultSetjava.sql.SQLException
public boolean first()
throws java.sql.SQLException
first in interface java.sql.ResultSetjava.sql.SQLException
protected boolean internalFirst()
throws java.sql.SQLException
java.sql.SQLException
public boolean last()
throws java.sql.SQLException
last in interface java.sql.ResultSetjava.sql.SQLException
protected boolean internalLast()
throws java.sql.SQLException
java.sql.SQLException
public int getRow()
throws java.sql.SQLException
getRow in interface java.sql.ResultSetjava.sql.SQLException
public boolean absolute(int row)
throws java.sql.SQLException
absolute in interface java.sql.ResultSetjava.sql.SQLException
public boolean relative(int rows)
throws java.sql.SQLException
relative in interface java.sql.ResultSetjava.sql.SQLException
public boolean previous()
throws java.sql.SQLException
previous in interface java.sql.ResultSetjava.sql.SQLException
protected boolean internalPrevious()
throws java.sql.SQLException
java.sql.SQLException
public boolean rowUpdated()
throws java.sql.SQLException
rowUpdated in interface java.sql.ResultSetjava.sql.SQLException
public boolean columnUpdated(int idx)
throws java.sql.SQLException
columnUpdated in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public boolean columnUpdated(java.lang.String columnName)
throws java.sql.SQLException
columnUpdated in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public boolean rowInserted()
throws java.sql.SQLException
rowInserted in interface java.sql.ResultSetjava.sql.SQLException
public boolean rowDeleted()
throws java.sql.SQLException
rowDeleted in interface java.sql.ResultSetjava.sql.SQLException
public void updateNull(int columnIndex)
throws java.sql.SQLException
updateNull in interface java.sql.ResultSetjava.sql.SQLException
public void updateBoolean(int columnIndex,
boolean x)
throws java.sql.SQLException
updateBoolean in interface java.sql.ResultSetjava.sql.SQLException
public void updateByte(int columnIndex,
byte x)
throws java.sql.SQLException
updateByte in interface java.sql.ResultSetjava.sql.SQLException
public void updateShort(int columnIndex,
short x)
throws java.sql.SQLException
updateShort in interface java.sql.ResultSetjava.sql.SQLException
public void updateInt(int columnIndex,
int x)
throws java.sql.SQLException
updateInt in interface java.sql.ResultSetjava.sql.SQLException
public void updateLong(int columnIndex,
long x)
throws java.sql.SQLException
updateLong in interface java.sql.ResultSetjava.sql.SQLException
public void updateFloat(int columnIndex,
float x)
throws java.sql.SQLException
updateFloat in interface java.sql.ResultSetjava.sql.SQLException
public void updateDouble(int columnIndex,
double x)
throws java.sql.SQLException
updateDouble in interface java.sql.ResultSetjava.sql.SQLException
public void updateBigDecimal(int columnIndex,
java.math.BigDecimal x)
throws java.sql.SQLException
updateBigDecimal in interface java.sql.ResultSetjava.sql.SQLException
public void updateString(int columnIndex,
java.lang.String x)
throws java.sql.SQLException
updateString in interface java.sql.ResultSetjava.sql.SQLException
public void updateBytes(int columnIndex,
byte[] x)
throws java.sql.SQLException
updateBytes in interface java.sql.ResultSetjava.sql.SQLException
public void updateDate(int columnIndex,
java.sql.Date x)
throws java.sql.SQLException
updateDate in interface java.sql.ResultSetjava.sql.SQLException
public void updateTime(int columnIndex,
java.sql.Time x)
throws java.sql.SQLException
updateTime in interface java.sql.ResultSetjava.sql.SQLException
public void updateTimestamp(int columnIndex,
java.sql.Timestamp x)
throws java.sql.SQLException
updateTimestamp in interface java.sql.ResultSetjava.sql.SQLException
public void updateAsciiStream(int columnIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
updateAsciiStream in interface java.sql.ResultSetjava.sql.SQLException
public void updateBinaryStream(int columnIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
updateBinaryStream in interface java.sql.ResultSetjava.sql.SQLException
public void updateCharacterStream(int columnIndex,
java.io.Reader x,
int length)
throws java.sql.SQLException
updateCharacterStream in interface java.sql.ResultSetjava.sql.SQLException
public void updateObject(int columnIndex,
java.lang.Object x,
int scale)
throws java.sql.SQLException
updateObject in interface java.sql.ResultSetjava.sql.SQLException
public void updateObject(int columnIndex,
java.lang.Object x)
throws java.sql.SQLException
updateObject in interface java.sql.ResultSetjava.sql.SQLException
public void updateNull(java.lang.String columnName)
throws java.sql.SQLException
updateNull in interface java.sql.ResultSetjava.sql.SQLException
public void updateBoolean(java.lang.String columnName,
boolean x)
throws java.sql.SQLException
updateBoolean in interface java.sql.ResultSetjava.sql.SQLException
public void updateByte(java.lang.String columnName,
byte x)
throws java.sql.SQLException
updateByte in interface java.sql.ResultSetjava.sql.SQLException
public void updateShort(java.lang.String columnName,
short x)
throws java.sql.SQLException
updateShort in interface java.sql.ResultSetjava.sql.SQLException
public void updateInt(java.lang.String columnName,
int x)
throws java.sql.SQLException
updateInt in interface java.sql.ResultSetjava.sql.SQLException
public void updateLong(java.lang.String columnName,
long x)
throws java.sql.SQLException
updateLong in interface java.sql.ResultSetjava.sql.SQLException
public void updateFloat(java.lang.String columnName,
float x)
throws java.sql.SQLException
updateFloat in interface java.sql.ResultSetjava.sql.SQLException
public void updateDouble(java.lang.String columnName,
double x)
throws java.sql.SQLException
updateDouble in interface java.sql.ResultSetjava.sql.SQLException
public void updateBigDecimal(java.lang.String columnName,
java.math.BigDecimal x)
throws java.sql.SQLException
updateBigDecimal in interface java.sql.ResultSetjava.sql.SQLException
public void updateString(java.lang.String columnName,
java.lang.String x)
throws java.sql.SQLException
updateString in interface java.sql.ResultSetjava.sql.SQLException
public void updateBytes(java.lang.String columnName,
byte[] x)
throws java.sql.SQLException
updateBytes in interface java.sql.ResultSetjava.sql.SQLException
public void updateDate(java.lang.String columnName,
java.sql.Date x)
throws java.sql.SQLException
updateDate in interface java.sql.ResultSetjava.sql.SQLException
public void updateTime(java.lang.String columnName,
java.sql.Time x)
throws java.sql.SQLException
updateTime in interface java.sql.ResultSetjava.sql.SQLException
public void updateTimestamp(java.lang.String columnName,
java.sql.Timestamp x)
throws java.sql.SQLException
updateTimestamp in interface java.sql.ResultSetjava.sql.SQLException
public void updateAsciiStream(java.lang.String columnName,
java.io.InputStream x,
int length)
throws java.sql.SQLException
updateAsciiStream in interface java.sql.ResultSetjava.sql.SQLException
public void updateBinaryStream(java.lang.String columnName,
java.io.InputStream x,
int length)
throws java.sql.SQLException
updateBinaryStream in interface java.sql.ResultSetjava.sql.SQLException
public void updateCharacterStream(java.lang.String columnName,
java.io.Reader reader,
int length)
throws java.sql.SQLException
updateCharacterStream in interface java.sql.ResultSetjava.sql.SQLException
public void updateObject(java.lang.String columnName,
java.lang.Object x,
int scale)
throws java.sql.SQLException
updateObject in interface java.sql.ResultSetjava.sql.SQLException
public void updateObject(java.lang.String columnName,
java.lang.Object x)
throws java.sql.SQLException
updateObject in interface java.sql.ResultSetjava.sql.SQLException
public void insertRow()
throws java.sql.SQLException
insertRow in interface java.sql.ResultSetjava.sql.SQLException
public void updateRow()
throws java.sql.SQLException
updateRow in interface java.sql.ResultSetjava.sql.SQLException
public void deleteRow()
throws java.sql.SQLException
deleteRow in interface java.sql.ResultSetjava.sql.SQLException
public void refreshRow()
throws java.sql.SQLException
refreshRow in interface java.sql.ResultSetjava.sql.SQLException
public void cancelRowUpdates()
throws java.sql.SQLException
cancelRowUpdates in interface java.sql.ResultSetjava.sql.SQLException
public void moveToInsertRow()
throws java.sql.SQLException
moveToInsertRow in interface java.sql.ResultSetjava.sql.SQLException
public void moveToCurrentRow()
throws java.sql.SQLException
moveToCurrentRow in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Statement getStatement()
throws java.sql.SQLException
null.
getStatement in interface java.sql.ResultSetnull
java.sql.SQLException - if an error occurs
public java.lang.Object getObject(int columnIndex,
java.util.Map map)
throws java.sql.SQLException
getObject in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Ref getRef(int columnIndex)
throws java.sql.SQLException
getRef in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Blob getBlob(int columnIndex)
throws java.sql.SQLException
getBlob in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Clob getClob(int columnIndex)
throws java.sql.SQLException
getClob in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Array getArray(int columnIndex)
throws java.sql.SQLException
getArray in interface java.sql.ResultSetjava.sql.SQLException
public java.lang.Object getObject(java.lang.String columnName,
java.util.Map map)
throws java.sql.SQLException
getObject in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Ref getRef(java.lang.String colName)
throws java.sql.SQLException
getRef in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Blob getBlob(java.lang.String colName)
throws java.sql.SQLException
getBlob in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Clob getClob(java.lang.String colName)
throws java.sql.SQLException
getClob in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Array getArray(java.lang.String colName)
throws java.sql.SQLException
getArray in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Date getDate(int columnIndex,
java.util.Calendar cal)
throws java.sql.SQLException
getDate in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Date getDate(java.lang.String columnName,
java.util.Calendar cal)
throws java.sql.SQLException
getDate in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Time getTime(int columnIndex,
java.util.Calendar cal)
throws java.sql.SQLException
getTime in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Time getTime(java.lang.String columnName,
java.util.Calendar cal)
throws java.sql.SQLException
getTime in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Timestamp getTimestamp(int columnIndex,
java.util.Calendar cal)
throws java.sql.SQLException
getTimestamp in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String columnName,
java.util.Calendar cal)
throws java.sql.SQLException
getTimestamp in interface java.sql.ResultSetjava.sql.SQLException
public java.sql.Connection getConnection()
throws java.sql.SQLException
Connection object passed to this
CachedRowSetXImpl object. This connection may be
used to populate this rowset with data or to write data back
to its underlying data source.
getConnection in interface javax.sql.RowSetInternalConnection object passed to this rowset;
may be null if there is no connection
java.sql.SQLException - if an error occurs
public void setMetaData(javax.sql.RowSetMetaData md)
throws java.sql.SQLException
setMetaData in interface javax.sql.rowset.CachedRowSetsetMetaData in interface javax.sql.RowSetInternaljava.sql.SQLException
public abstract java.sql.ResultSet getOriginal()
throws java.sql.SQLException
getOriginal in interface javax.sql.rowset.CachedRowSetgetOriginal in interface javax.sql.RowSetInternaljava.sql.SQLException
public abstract java.sql.ResultSet getOriginalRow()
throws java.sql.SQLException
getOriginalRow in interface javax.sql.rowset.CachedRowSetgetOriginalRow in interface javax.sql.RowSetInternaljava.sql.SQLException
public void setOriginalRow()
throws java.sql.SQLException
setOriginalRow in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void setOriginal()
throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getTableName()
throws java.sql.SQLException
getTableName in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void setTableName(java.lang.String tabName)
throws java.sql.SQLException
setTableName in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public int[] getKeyColumns()
throws java.sql.SQLException
getKeyColumns in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void setKeyColumns(int[] keys)
throws java.sql.SQLException
setKeyColumns in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void updateRef(int columnIndex,
java.sql.Ref ref)
throws java.sql.SQLException
updateRef in interface java.sql.ResultSetjava.sql.SQLException
public void updateRef(java.lang.String columnName,
java.sql.Ref ref)
throws java.sql.SQLException
updateRef in interface java.sql.ResultSetjava.sql.SQLException
public void updateClob(int columnIndex,
java.sql.Clob c)
throws java.sql.SQLException
updateClob in interface java.sql.ResultSetjava.sql.SQLException
public void updateClob(java.lang.String columnName,
java.sql.Clob c)
throws java.sql.SQLException
updateClob in interface java.sql.ResultSetjava.sql.SQLException
public void updateBlob(int columnIndex,
java.sql.Blob b)
throws java.sql.SQLException
updateBlob in interface java.sql.ResultSetjava.sql.SQLException
public void updateBlob(java.lang.String columnName,
java.sql.Blob b)
throws java.sql.SQLException
updateBlob in interface java.sql.ResultSetjava.sql.SQLException
public void updateArray(int columnIndex,
java.sql.Array a)
throws java.sql.SQLException
updateArray in interface java.sql.ResultSetjava.sql.SQLException
public void updateArray(java.lang.String columnName,
java.sql.Array a)
throws java.sql.SQLException
updateArray in interface java.sql.ResultSetjava.sql.SQLException
public java.net.URL getURL(int columnIndex)
throws java.sql.SQLException
getURL in interface java.sql.ResultSetjava.sql.SQLException
public java.net.URL getURL(java.lang.String columnName)
throws java.sql.SQLException
getURL in interface java.sql.ResultSetjava.sql.SQLExceptionpublic javax.sql.rowset.RowSetWarning getRowSetWarnings()
getRowSetWarnings in interface javax.sql.rowset.CachedRowSet
public void commit()
throws java.sql.SQLException
commit in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void rollback()
throws java.sql.SQLException
rollback in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void rollback(java.sql.Savepoint s)
throws java.sql.SQLException
rollback in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void unsetMatchColumn(int[] columnIdxes)
throws java.sql.SQLException
unsetMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void unsetMatchColumn(java.lang.String[] columnIdxes)
throws java.sql.SQLException
unsetMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public java.lang.String[] getMatchColumnNames()
throws java.sql.SQLException
getMatchColumnNames in interface javax.sql.rowset.Joinablejava.sql.SQLException
public int[] getMatchColumnIndexes()
throws java.sql.SQLException
getMatchColumnIndexes in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void setMatchColumn(int[] columnIdxes)
throws java.sql.SQLException
setMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void setMatchColumn(java.lang.String[] columnNames)
throws java.sql.SQLException
setMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void setMatchColumn(int columnIdx)
throws java.sql.SQLException
setMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void setMatchColumn(java.lang.String columnName)
throws java.sql.SQLException
setMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void unsetMatchColumn(int columnIdx)
throws java.sql.SQLException
unsetMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void unsetMatchColumn(java.lang.String columnName)
throws java.sql.SQLException
unsetMatchColumn in interface javax.sql.rowset.Joinablejava.sql.SQLException
public void rowSetPopulated(javax.sql.RowSetEvent event,
int numRows)
throws java.sql.SQLException
rowSetPopulated in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void populate(java.sql.ResultSet data,
int start)
throws java.sql.SQLException
populate in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public boolean nextPage()
throws java.sql.SQLException
nextPage in interface javax.sql.rowset.CachedRowSetjava.sql.SQLException
public void setPageSize(int size)
throws java.sql.SQLException
setPageSize in interface javax.sql.rowset.CachedRowSetjava.sql.SQLExceptionpublic int getPageSize()
getPageSize in interface javax.sql.rowset.CachedRowSet
public boolean previousPage()
throws java.sql.SQLException
previousPage in interface javax.sql.rowset.CachedRowSetjava.sql.SQLExceptionpublic java.lang.String getCatalogName()
tableName property
resides.
getCatalogName in interface CachedRowSetXString object giving the name of the catalog that contains
the table referred to by tableName
Note: This method is called by CachedRowSetXWriter.
ResultSetMetaData.getCatalogName(int)public void setCatalogName(java.lang.String catalogName)
tableName
property.
The writer uses this name to determine which table to use when comparing the values in
the data source with the CachedRowSetX object's values during a
synchronization attempt.
The catalogName property also indicates where modified values from this
CachedRowSetX object should be written.
The implementation of this CachedRowSetX object may obtain the
the name internally from the RowSetMetaDataXImpl object.
Note: This method is called by CachedRowSetXWriter.
setCatalogName in interface CachedRowSetXcatalogName - a String object identifying the catalog of the table
from which this CachedRowSetX object was derived; can be
null or an empty StringRowSetMetaData.setCatalogName(int, java.lang.String),
RowSetWriterpublic java.lang.String getSchemaName()
tableName property
resides.
getSchemaName in interface CachedRowSetXString object giving the name of the catalog that contains
the table referred to by tableName
Note: This method is called by CachedRowSetXWriter.
ResultSetMetaData.getCatalogName(int)public void setSchemaName(java.lang.String schemaName)
tableName
property.
The writer uses this name to determine which table to use when comparing the values in
the data source with the CachedRowSetX object's values during a
synchronization attempt.
The schemaName property also indicates where modified values from this
CachedRowSetX object should be written.
The implementation of this CachedRowSetX object may obtain the
the name internally from the RowSetMetaDataXImpl object.
setSchemaName in interface CachedRowSetXschemaName - a String object identifying the schema of the table
from which this CachedRowSetX object was derived; can be
null or an empty StringRowSetMetaData.setSchemaName(int, java.lang.String),
RowSetWriterpublic java.lang.String[] getColumnCatalogNames()
String. If setColumnCatalogNames was never called,
null is returned, else the value set when calling
setColumnCatalogNames{/code> is returned. See setColumnCatalogNames
for details.
Note, the column is zero based whereas most jdbc calls are one based.
Note: This method is called by CachedRowSetXWriter.
- Specified by:
getColumnCatalogNames in interface CachedRowSetX
- Returns:
- an array of
String objects or null
public java.lang.String getColumnCatalogNames(int index)
String which contains the catalog name set for the column or
null.
Note, the column is zero based whereas most jdbc calls are one based.
getColumnCatalogNames in interface CachedRowSetXString object or nullpublic void setColumnCatalogNames(java.lang.String[] columnCatalogNames)
columnCatalogNames property.
setColumnCatalogNames in interface CachedRowSetXcolumnCatalogNames - an array of String, one for each column, which contains
the name of catalog of the corresponding column (each element can also be
null
Note, the column is zero based whereas most jdbc calls are one based.
public void setColumnCatalogNames(int index,
java.lang.String columnCatalogName)
columnCatalogNames property.
setColumnCatalogNames in interface CachedRowSetXindex - the index of the array to set (zero based)columnCatalogName - the name of catalog for the column (can also be nullpublic java.lang.String[] getColumnSchemaNames()
String. If setColumnSchemaNames was never called,
null is returned, else the value set when calling
setColumnSchemaNames{/code> is returned. See setColumnSchemaNames
for details.
Note, the column is zero based whereas most jdbc calls are one based.
Note: This method is called by CachedRowSetXWriter.
- Specified by:
getColumnSchemaNames in interface CachedRowSetX
- Returns:
- an array of
String objects or null
public java.lang.String getColumnSchemaNames(int index)
String which contains the schema name set for the column or
null.
Note, the column is zero based whereas most jdbc calls are one based.
getColumnSchemaNames in interface CachedRowSetXString object or nullpublic void setColumnSchemaNames(java.lang.String[] columnSchemaNames)
columnSchemaNames property.
setColumnSchemaNames in interface CachedRowSetXcolumnSchemaNames - an array of String, one for each column, which contains
the name of schema of the corresponding column (each element can also be
null
Note, the column is zero based whereas most jdbc calls are one based.
public void setColumnSchemaNames(int index,
java.lang.String columnSchemaName)
columnSchemaNames property.
setColumnSchemaNames in interface CachedRowSetXindex - the index of the array to set (zero based)columnSchemaName - the name of schema for the column (can also be nullpublic java.lang.String[] getColumnTableNames()
String. If setColumnTableNames was never called,
null is returned, else the value set when calling
setColumnTableNames{/code> is returned. See setColumnTableNames
for details.
Note, the column is zero based whereas most jdbc calls are one based.
Note: This method is called by CachedRowSetXWriter.
- Specified by:
getColumnTableNames in interface CachedRowSetX
- Returns:
- an array of
String objects or null
public java.lang.String getColumnTableNames(int index)
String which contains the table name set for the column or
null.
Note, the column is zero based whereas most jdbc calls are one based.
getColumnTableNames in interface CachedRowSetXString object or nullpublic void setColumnTableNames(java.lang.String[] columnTableNames)
columnTableNames property.
setColumnTableNames in interface CachedRowSetXcolumnTableNames - an array of String, one for each column, which contains
the name of table of the corresponding column (each element can also be
null
Note, the column is zero based whereas most jdbc calls are one based.
public void setColumnTableNames(int index,
java.lang.String columnTableName)
columnTableNames property.
setColumnTableNames in interface CachedRowSetXindex - the index of the array to set (zero based)columnTableName - the name of table for the column (can also be nullpublic java.lang.String[] getColumnNames()
String. If setColumnNames was never called,
null is returned, else the value set when calling
setColumnNames{/code> is returned. See setColumnNames
for details.
Note, the column is zero based whereas most jdbc calls are one based.
Note: This method is called by CachedRowSetXWriter.
- Specified by:
getColumnNames in interface CachedRowSetX
- Returns:
- an array of
String objects or null
public java.lang.String getColumnNames(int index)
String which contains the column name set for the column or
null.
Note, the column is zero based whereas most jdbc calls are one based.
getColumnNames in interface CachedRowSetXString object or nullpublic void setColumnNames(java.lang.String[] columnNames)
columnNames property.
setColumnNames in interface CachedRowSetXcolumnNames - an array of String, one for each column, which contains
the name of column (each element can also be null
Note, the column is zero based whereas most jdbc calls are one based.
public void setColumnNames(int index,
java.lang.String columnName)
columnNames property.
setColumnNames in interface CachedRowSetXindex - the index of the array to set (zero based)columnName - for the column (can also be nullpublic boolean[] getInsertableColumns()
boolean{/code>. If setInsertableColumns was never called,
null is returned, else the value set when calling
setInsertableColumns{/code> is returned. See setInsertableColumns
for details.
Note, the column is zero based whereas most jdbc calls are one based.
Note: This method is called by CachedRowSetXWriter.
- Specified by:
getInsertableColumns in interface CachedRowSetX
- Returns:
- an array of
boolean{/code> objects or null
public boolean getInsertableColumns(int index)
boolean{/code> of true if the column should be inserted when
when adding rows or null.
Note, the column is zero based whereas most jdbc calls are one based.
- Specified by:
getInsertableColumns in interface CachedRowSetX
- Returns:
- a
boolean/code> object or null
public void setInsertableColumns(boolean[] insertableColumns)
insertableColumns property.
setInsertableColumns in interface CachedRowSetXinsertableColumns - an array of boolean one for each column, which contains
a boolean indicating whether or not the column should be inserted when adding
rows to the CachedRowSetX
Note, the column is zero based whereas most jdbc calls are one based.
public void setInsertableColumns(int index,
boolean insertableColumn)
insertableColumns property.
setInsertableColumns in interface CachedRowSetXindex - the index of the array to set (zero based)insertableColumn - true if column should be inserted for new rowspublic boolean[] getUpdatableColumns()
boolean{/code>. If setUpdatableColumns was never called,
null is returned, else the value set when calling
setUpdatebleColumns{/code> is returned. See setUpdatableColumns
for details.
Note, the column is zero based whereas most jdbc calls are one based.
Note: This method is called by CachedRowSetXWriter.
- Specified by:
getUpdatableColumns in interface CachedRowSetX
- Returns:
- an array of
boolean{/code> objects or null
public boolean getUpdatableColumns(int index)
boolean{/code> of true if the column should be updated when
when updating rows or null.
Note, the column is zero based whereas most jdbc calls are one based.
- Specified by:
getUpdatableColumns in interface CachedRowSetX
- Returns:
- a
boolean{/code> object or null
public void setUpdatableColumns(boolean[] updatableColumns)
updatableColumns property.
setUpdatableColumns in interface CachedRowSetXupdatableColumns - an array of boolean, one for each column, which contains
a boolean indicating whether or not the column should be updated when updating
rows to the CachedRowSetX
Note, the column is zero based whereas most jdbc calls are one based.
public void setUpdatableColumns(int index,
boolean updatableColumn)
updatableColumns property.
setUpdatableColumns in interface CachedRowSetXindex - the index of the array to set (zero based)updatableColumn - true if column should be updated when rows are updatedpublic boolean getPrintStatements()
printStatements property.
getPrintStatements in interface CachedRowSetXboolean{/code> object which, if true, causes SQL statements to be written to
System.out.
Note: This method is called by CachedRowSetXWriter.
public void setPrintStatements(boolean printStatements)
printStatements property.
If this property is true,
SQL Insert, UPDATE and DELETE statements will
be written to System.out. This property is intended to be set when debugging
problems inserting, updating and deleting. With the information gained from examining the
output, it is intended that one can set the other advanced properties on the
CachedRowSetX to "fix" the SQL statements being generated. In this way,
some JDBC driver problems can be overcome.
setPrintStatements in interface CachedRowSetXprintStatements - a boolean{/code> object which determines whether
SQL Insert, UPDATE and DELETE statements are
written to System.out
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||