|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
weblogic.jdbc.rowset.BaseRowSet
weblogic.jdbc.rowset.CachedRowSetImpl
Deprecated. 12.1.2.0 Use the reference implementation classes in the J2SE JRE/SDK.
public class CachedRowSetImpl
CachedRowSet is an implementation of the JDBC RowSet API (javax.sql.RowSet). This implementation provides a disconnected RowSet. The CachedRowSet is populated with data from a JDBC query or an existing JDBC ResultSet. At this point, the RowSet has all of the data in memory. The CachedRowSet uses the familiar ResultSet methods for reading, inserting, updating, and deleteting data. These operations only change the current copy of the data in memory. The data is not written back to the database until the acceptChanges method is called. The CachedRowSet uses optimistic concurrency when data is written back to the database. By default, the SQL UPDATE statement verifies that the data in the database matches what was read into the CachedRowSet. It is possible to select other Optimistic policies with the setOptimisticPolicy method.
| Field Summary |
|---|
| Fields inherited from interface javax.sql.rowset.spi.SyncResolver |
|---|
DELETE_ROW_CONFLICT, INSERT_ROW_CONFLICT, NO_ROW_CONFLICT, UPDATE_ROW_CONFLICT |
| Method Summary | ||
|---|---|---|
void |
acceptChanges()Deprecated. CachedRowSet Propagates all row update, insert, and delete changes to the underlying data source backing this CachedRowSetImpl object. |
|
void |
acceptChanges(Connection con)Deprecated. CachedRowSet Propagates all row update, insert, and delete changes to the data source backing this CachedRowSetImpl object using the given Connection object to establish a connection to the datasource. |
|
void |
cancelRowUpdates()Deprecated. ResultSet Rolls back any updates made to the current row of this CachedRowSetImpl object and notifies listeners that a row has changed. |
|
void |
close()Deprecated. ResultSet Closes this CachedRowSetImpl objecy and releases any resources it was using. |
|
void |
commit()Deprecated. CachedRowSet Commits all changes performed by the acceptChanges() methods |
|
CachedRowSet |
createCopy()Deprecated. CachedRowSet Creates a RowSet object that is a deep copy of this CachedRowSetImpl object's data, including constraints. |
|
CachedRowSet |
createCopyNoConstraints()Deprecated. CachedRowSet Creates a CachedRowSet object that is a copy of this CachedRowSetImpl object's data only. |
|
CachedRowSet |
createCopySchema()Deprecated. CachedRowSet Creates a RowSet object that is a copy of this CachedRowSetImpl object's table structure and the constraints only. |
|
RowSet |
createShared()Deprecated. CachedRowSet Returns a new RowSet object backed by the same data as that of this CachedRowSetImpl object and sharing a set of cursors with it. |
|
void |
deleteRow()Deprecated. ResultSet Deletes the current row from this CachedRowSetImpl object and notifies listeners registered with this rowset that a row has changed. |
|
void |
execute()Deprecated. RowSet Populates this CachedRowSetImpl object with data using the command |
|
void |
execute(Connection con)Deprecated. CachedRowSet Populates this CachedRowSetImpl object with data, using the given connection to produce the result set from which data will be read. |
|
String |
executeAndGuessTableName()Deprecated. WLS extension Parse the associated SQL and sets the table name for all columns as the first word following the SQL keyword FROM. |
|
boolean |
executeAndGuessTableNameAndPrimaryKeys()Deprecated. WLS extension Parses the SQL command to read the table name. |
|
Map |
getCurrentRow()Deprecated. CachedRowSet Returns the insert row or the current row of this CachedRowSetImplobject. |
|
Predicate |
getFilter()Deprecated. FilteredRowSetImpl - Retrieve the filter active for this FilteredRowSet |
|
|
getObject(int columnIndex, Class<T> type)Deprecated. ResultSet - not supported. |
|
|
getObject(String columnLabel, Class<T> type)Deprecated. ResultSet - not supported. |
|
ResultSet |
getOriginal()Deprecated. CachedRowSet Returns a result set containing the original value of the rowset. |
|
ResultSet |
getOriginalRow()Deprecated. CachedRowSet Returns a result set containing the original value of the current row only. |
|
int |
getPageSize()Deprecated. CachedRowSet This is the getter function for the size of the page. |
|
Map |
getRow(int index)Deprecated. CachedRowSet Returns the number of the current row in this CachedRowSetImpl object. |
|
Comparator |
getSorter()Deprecated. SortedRowSetImpl - Get a Comparator that will be used to sort the rows of the RowSet object |
|
void |
insertRow()Deprecated. ResultSet Inserts the contents of this CachedRowSetImpl object's insert row into this rowset immediately following the current row. |
|
boolean |
isWrapperFor(Class<?> iface)Deprecated. ResultSet |
|
void |
moveToCurrentRow()Deprecated. ResultSet Moves the cursor for this CachedRowSetImpl object to the current row. |
|
void |
moveToInsertRow()Deprecated. ResultSet Moves the cursor for this CachedRowSetImpl object to the insert row. |
|
void |
moveToUpdateRow()Deprecated. WLS Extension Mark the current row as updated even if it has no original value. |
|
boolean |
nextPage()Deprecated. CachedRowSet The nextPage gets the next page, that is a CachedRowSetImpl object containing the number of rows specified by page size. |
|
void |
populate(ResultSet rs)Deprecated. CachedRowSet Populates this CachedRowSetImpl object with data from the given ResultSet object. |
|
void |
populate(ResultSet rs, int i)Deprecated. CachedRowSet Populates this CachedRowSet object with data from the given ResultSet object. |
|
(package private) void |
populateInternal(ResultSet rs)Deprecated. CachedRowSet Populates this CachedRowSet object with data from the given ResultSet object. |
|
boolean |
previousPage()Deprecated. CachedRowSet Retrieves the data present in the page prior to the page from where it is called. |
|
void |
readXml(InputStream iStream)Deprecated. WebRowSet |
|
void |
readXml(Reader reader)Deprecated. WebRowSet Reads a WebRowSet object in its XML format from the given Reader object. |
|
void |
readXml(XMLInputStream xis)Deprecated. WLS Extension Reads a stream based XML input to populate this WebRowSet object. |
|
void |
refreshRow()Deprecated. ResultSet Sets the current row with its original value and marks the row as not updated, thus undoing any changes made to the row since the last call to the methods updateRow or deleteRow. |
|
void |
release()Deprecated. CachedRowSet Releases the current contents of this CachedRowSetImpl object and sends a rowSetChanged event object to all registered listeners. |
|
void |
restoreOriginal()Deprecated. CachedRowSet Restores this CachedRowSetImpl object to its original state, that is, its state before the last set of changes. |
|
void |
rollback()Deprecated. CachedRowSet Rolls back all changes performed by the acceptChanges() methods |
|
void |
rollback(Savepoint s)Deprecated. CachedRowSet Rolls back all changes performed by the acceptChanges() to the last Savepoint transaction marker. |
|
void |
rowSetPopulated(RowSetEvent rse, int i)Deprecated. CachedRowSet Notifies registered listeners that a RowSet object in the given RowSetEvent object has populated a number of additional rows. |
|
void |
setFilter(Predicate p)Deprecated. FilteredRowSetImpl - Apply the predicate for this filter |
|
void |
setOriginalRow()Deprecated. CachedRowSet void setOriginalRow() - Marks the current row in this rowset as being an original row. |
|
void |
setPageSize(int i)Deprecated. CachedRowSet This is the setter function for setting the size of the page, which specifies how many rows have to be retrived at a time. |
|
void |
setRowSetSynced()Deprecated. WLS Extension Mark the whole RowSet object as it has been synced with backend DataSource. |
|
void |
setRowSynced()Deprecated. WLS Extension Mark current row as it has been synced with backend DataSource. |
|
void |
setSorter(Comparator s)Deprecated. SortedRowSetImpl - Set a Comparator that will be used to sort the rows of the RowSet object |
|
int |
size()Deprecated. CachedRowSet Returns the number of rows in this CachedRowSetImpl object. |
|
Collection |
toCollection()Deprecated. CachedRowSet Converts this CachedRowSet object to a Collection object that contains all of this CachedRowSet object's data. |
|
Collection |
toCollection(int column)Deprecated. CachedRowSet Converts the designated column in this CachedRowSet object to a Collection object. |
|
Collection |
toCollection(String column)Deprecated. CachedRowSet Converts the designated column in this CachedRowSet object to a Collection object. |
|
void |
undoDelete()Deprecated. CachedRowSet void undoDelete() - Cancels deletion of the current row and notifies listeners that a row has changed. |
|
void |
undoInsert()Deprecated. CachedRowSet Immediately removes the current row from this CachedRowSetImpl object if the row has been inserted, and also notifies listeners the a row has changed. |
|
void |
undoUpdate()Deprecated. CachedRowSet Immediately reverses the last update operation if the row has been modified. |
|
|
unwrap(Class<T> iface)Deprecated. ResultSet |
|
void |
updateRow()Deprecated. ResultSet Marks the current row of this CachedRowSetImpl object as updated and notifies listeners registered with this rowset that the row has changed. |
|
void |
writeXml(OutputStream oStream)Deprecated. WebRowSet Writes the data, properties, and metadata for this WebRowSet object to the given OutputStream object in XML format. |
|
void |
writeXml(ResultSet rs, OutputStream oStream)Deprecated. WebRowSet Populates this WebRowSet object with the contents of the given ResultSet object and writes its data, properties, and metadata to the given OutputStream object in XML format. |
|
void |
writeXml(ResultSet rs, Writer writer)Deprecated. WebRowSet Populates this WebRowSet object with the contents of the given ResultSet object and writes its data, properties, and metadata to the given Writer object in XML format. |
|
void |
writeXml(Writer oWriter)Deprecated. WebRowSet Writes the data, properties, and metadata for this WebRowSet object to the given Writer object in XML format. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface weblogic.jdbc.rowset.WLCachedRowSet |
|---|
getDataSource, getRows, getRows, isComplete, loadXML, populate, setDataSource, writeXML, writeXML |
| Methods inherited from interface javax.sql.rowset.CachedRowSet |
|---|
columnUpdated, columnUpdated, getKeyColumns, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, setKeyColumns, setMetaData, setShowDeleted, setSyncProvider, setTableName |
| Methods inherited from interface javax.sql.rowset.Joinable |
|---|
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
| Methods inherited from interface javax.sql.rowset.CachedRowSet |
|---|
columnUpdated, columnUpdated, getKeyColumns, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, setKeyColumns, setMetaData, setShowDeleted, setSyncProvider, setTableName |
| Methods inherited from interface javax.sql.rowset.Joinable |
|---|
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
| Methods inherited from interface javax.sql.rowset.CachedRowSet |
|---|
columnUpdated, columnUpdated, getKeyColumns, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, setKeyColumns, setMetaData, setShowDeleted, setSyncProvider, setTableName |
| Methods inherited from interface javax.sql.rowset.Joinable |
|---|
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
| Methods inherited from interface weblogic.jdbc.rowset.WLRowSetInternal |
|---|
setCachedRows |
| Methods inherited from interface javax.sql.RowSetInternal |
|---|
getConnection, getParams, setMetaData |
| Methods inherited from interface weblogic.jdbc.rowset.WLCachedRowSet |
|---|
getDataSource, getRows, getRows, isComplete, loadXML, populate, setDataSource, writeXML, writeXML |
| Methods inherited from interface javax.sql.rowset.CachedRowSet |
|---|
columnUpdated, columnUpdated, getKeyColumns, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, setKeyColumns, setMetaData, setShowDeleted, setSyncProvider, setTableName |
| Methods inherited from interface javax.sql.rowset.Joinable |
|---|
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
| Methods inherited from interface javax.sql.rowset.CachedRowSet |
|---|
columnUpdated, columnUpdated, getKeyColumns, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, setKeyColumns, setMetaData, setShowDeleted, setSyncProvider, setTableName |
| Methods inherited from interface javax.sql.rowset.Joinable |
|---|
getMatchColumnIndexes, getMatchColumnNames, setMatchColumn, setMatchColumn, setMatchColumn, setMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn, unsetMatchColumn |
| Methods inherited from interface javax.sql.rowset.spi.SyncResolver |
|---|
getConflictValue, getConflictValue, getStatus, nextConflict, previousConflict, setResolvedValue, setResolvedValue |
| Method Detail |
|---|
void populateInternal(ResultSet rs)
throws SQLException
SQLException
public void populate(ResultSet rs)
throws SQLException
populate in interface CachedRowSetSQLException
public void populate(ResultSet rs,
int i)
throws SQLException
populate in interface CachedRowSetSQLException
public void execute()
throws SQLException
execute in interface RowSetSQLException
public void execute(Connection con)
throws SQLException
execute in interface CachedRowSetSQLException
public String executeAndGuessTableName()
throws SQLException
executeAndGuessTableName in interface WLCachedRowSetSQLException - if a database access error occurs or any of the properties necessary for making a connection and creating a statement have not been set
public boolean executeAndGuessTableNameAndPrimaryKeys()
throws SQLException
executeAndGuessTableNameAndPrimaryKeys in interface WLCachedRowSetSQLException - if a database access error occurs or any of the properties necessary for making a connection and creating a statement have not been set
public void acceptChanges()
throws SyncProviderException
acceptChanges in interface CachedRowSetSyncProviderException
public void acceptChanges(Connection con)
throws SyncProviderException
acceptChanges in interface CachedRowSetSyncProviderException
public void insertRow()
throws SQLException
insertRow in interface ResultSetSQLException
public void undoInsert()
throws SQLException
undoInsert in interface CachedRowSetSQLException
public void deleteRow()
throws SQLException
deleteRow in interface ResultSetSQLException
public void undoDelete()
throws SQLException
undoDelete in interface CachedRowSetSQLException
public void updateRow()
throws SQLException
updateRow in interface ResultSetSQLException
public void undoUpdate()
throws SQLException
undoUpdate in interface CachedRowSetSQLException
public void cancelRowUpdates()
throws SQLException
cancelRowUpdates in interface ResultSetSQLException
public void setOriginalRow()
throws SQLException
setOriginalRow in interface CachedRowSetSQLException
public void restoreOriginal()
throws SQLException
restoreOriginal in interface CachedRowSetSQLException
public ResultSet getOriginal()
throws SQLException
getOriginal in interface CachedRowSetgetOriginal in interface RowSetInternalSQLException
public ResultSet getOriginalRow()
throws SQLException
getOriginalRow in interface CachedRowSetgetOriginalRow in interface RowSetInternalSQLException
public void refreshRow()
throws SQLException
refreshRow in interface ResultSetSQLExceptionpublic void moveToInsertRow()
moveToInsertRow in interface ResultSetpublic void moveToCurrentRow()
moveToCurrentRow in interface ResultSetpublic void moveToUpdateRow()
moveToUpdateRow in interface WLCachedRowSet
public void setRowSynced()
throws SQLException
setRowSynced in interface WLCachedRowSetSQLException
public void setRowSetSynced()
throws SQLException
setRowSetSynced in interface WLCachedRowSetSQLExceptionpublic void setFilter(Predicate p)
setFilter in interface FilteredRowSetpublic Predicate getFilter()
getFilter in interface FilteredRowSetpublic void setSorter(Comparator s)
setSorter in interface SortedRowSets - Comparator instance used to decide the order of rows.public Comparator getSorter()
getSorter in interface SortedRowSetpublic int size()
size in interface CachedRowSetsize in class BaseRowSet
public Map getCurrentRow()
throws SQLException
getCurrentRow in interface WLCachedRowSetSQLException - if the current RowSet position is not a valid row
public Map getRow(int index)
throws SQLException
getRow in interface WLCachedRowSetindex - row index into the row set. Valid values are [0 ... row.size() -1]SQLException - if the index is not a valid row
public Collection toCollection()
throws SQLException
toCollection in interface CachedRowSetSQLException
public Collection toCollection(int column)
throws SQLException
toCollection in interface CachedRowSetSQLException
public Collection toCollection(String column)
throws SQLException
toCollection in interface CachedRowSetSQLException
public void readXml(XMLInputStream xis)
throws IOException,
SQLException
IOExceptionSQLException
public void readXml(Reader reader)
throws SQLException
readXml in interface WebRowSetSQLException
public void readXml(InputStream iStream)
throws SQLException,
IOException
readXml in interface WebRowSetSQLExceptionIOException
public void writeXml(Writer oWriter)
throws SQLException
writeXml in interface WebRowSetSQLException
public void writeXml(OutputStream oStream)
throws SQLException,
IOException
writeXml in interface WebRowSetSQLExceptionIOException
public void writeXml(ResultSet rs,
Writer writer)
throws SQLException
writeXml in interface WebRowSetSQLException
public void writeXml(ResultSet rs,
OutputStream oStream)
throws SQLException,
IOException
writeXml in interface WebRowSetSQLExceptionIOException
public RowSet createShared()
throws SQLException
createShared in interface CachedRowSetSQLException
public CachedRowSet createCopy()
throws SQLException
createCopy in interface CachedRowSetSQLException
public CachedRowSet createCopySchema()
throws SQLException
createCopySchema in interface CachedRowSetSQLException
public CachedRowSet createCopyNoConstraints()
throws SQLException
createCopyNoConstraints in interface CachedRowSetSQLExceptionpublic void close()
close in interface AutoCloseableclose in interface ResultSet
public void release()
throws SQLException
release in interface CachedRowSetSQLException
public boolean previousPage()
throws SQLException
previousPage in interface CachedRowSetSQLException
public boolean nextPage()
throws SQLException
nextPage in interface CachedRowSetSQLExceptionpublic int getPageSize()
getPageSize in interface CachedRowSet
public void setPageSize(int i)
throws SQLException
setPageSize in interface CachedRowSetSQLException
public void rowSetPopulated(RowSetEvent rse,
int i)
throws SQLException
rowSetPopulated in interface CachedRowSetSQLException
public void rollback(Savepoint s)
throws SQLException
rollback in interface CachedRowSetSQLException
public void rollback()
throws SQLException
rollback in interface CachedRowSetSQLException
public void commit()
throws SQLException
commit in interface CachedRowSetSQLException
public <T> T unwrap(Class<T> iface)
throws SQLException
unwrap in interface WrapperSQLException
public boolean isWrapperFor(Class<?> iface)
throws SQLException
isWrapperFor in interface WrapperSQLException
public <T> T getObject(int columnIndex,
Class<T> type)
throws SQLException
getObject in interface ResultSetSQLException
public <T> T getObject(String columnLabel,
Class<T> type)
throws SQLException
getObject in interface ResultSetSQLException
|
Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||