|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CachedRowSetX
The extened interface that all implementations of CachedRowSetX must implement.
CachedRowSet interface.
A CachedRowSetX object differs from a CachedRowSet object
in the following ways:
isExecuted() method will return 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.
null value (or false in the
case of printStatements). For the cases where the advanced properties
must be used, it is helpful to set the printStatements property to
true first. In that way, one can then determine what advanced
properties must be set. By setting the catalog and schema for the table to be
upadted and by explicitly setting cataloag, table, schema and column names for
each column, one can explicitly set what columns will participate in inserts,
updates and deletes. Futher control can be gained by setting the updatableColumns
and insertableColumns properties. Note: if updatableColumns is set and
insertableColumns is not set, it is assumed that updateableColumns applies to
both updates and inserts.
catalogName: the name of the catalog that contains the table referred to by tableNameschemaName: the name of the schema that contains the table referred to by tableNamecolumnCatalogNames: an array of String, one for each column, which contains the name of catalog of the corresponding column (each element can also be nullcolumnSchemaNames: an array of String, one for each column, which contains the name of the schema of the corresponding column (each element can also be nullcolumnTableNames: an array of String, one for each column, which contains the name of the table of the corresponding column (each element can also be nullcolumnNames: an array of String, one for each column, which contains the name of the corresponding column (each element can also be nullinsertableColumns: an array of boolean, one for each column, which contains true if the corresponding column can be inserted, else it contains false/code>updatableColumns: an array of boolean, one for each column, which contains true if the corresponding column can be updated, else it contains false/code>printStatements: a boolean{/code> that when true will result in internally generated INSERT, UPDATE, and DELETE SQL statements being written to System.out. This output is useful in determining why inserts,updates and/or deletes are falling and in deciding what advanced properties to set in order to address the problems.PropertyChangeListener supportcommanddataSourceNamemaxRowspasswordtypeurlusernameCachedRowSetX after calling
close on it.
CachedRowSetX's properties are set to:
command: nullescapeProcessing: truekeyColumns: nullmaxFieldSize: 0maxRows: 0password: nullreadOnly: true (ignored)showDeleted: falsetypeMap: nullurl: nullusername: nullreadOnly property is currently not used
CachedRowSetX
autoCommit: nothing is invalidatedcommand: release() is calledconcurrency: nohting is invalidatedescapeProcessing: nothing is invalidatedmaxFieldSize: nothing is invalidatedmaxRows: nothing is invalidatedpassword: nothing is invalidatedreadOnly: nothing is invalidatedshowDeleted: nothing is invalidatedtransactionIsolation: nothing is invalidatedtype: nothing is invalidatedtypeMap: nothing is invalidatedurl: release() is calledusername: release() is calledclose will never throw a SQLException
| Field Summary |
|---|
| 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 |
| 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. |
java.lang.String |
getCatalogName()
Returns the catalog in which the table referred to by the tableName property
resides. |
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. |
boolean[] |
getInsertableColumns()
Returns an array of boolean{/code>. |
boolean |
getInsertableColumns(int index)
Returns a boolean{/code> of |
boolean |
getPrintStatements()
Returns the printStatements property. |
java.lang.String |
getSchemaName()
Returns the schema in which the table referred to by the tableName property
resides. |
boolean[] |
getUpdatableColumns()
Returns an array of boolean{/code>. |
boolean |
getUpdatableColumns(int index)
Returns a boolean{/code> of |
boolean |
isExecuted()
Returns true if this rowset is in an executed state |
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 |
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 |
setInsertableColumns(boolean[] insertableColumns)
Set the insertableColumns property. |
void |
setInsertableColumns(int index,
boolean insertableColumn)
Set the insertableColumns property. |
void |
setPrintStatements(boolean printStatements)
Sets the printStatements property. |
void |
setSchemaName(java.lang.String schemaName)
Sets the identifier for schema of the table referred to in the tableName
property. |
void |
setUpdatableColumns(boolean[] updatableColumns)
Set the updatableColumns property. |
void |
setUpdatableColumns(int index,
boolean updatableColumn)
Set the updatableColumns property. |
| Methods inherited from interface javax.sql.rowset.CachedRowSet |
|---|
acceptChanges, acceptChanges, columnUpdated, columnUpdated, commit, createCopy, createCopyNoConstraints, createCopySchema, createShared, execute, getKeyColumns, getOriginal, getOriginalRow, getPageSize, getRowSetWarnings, getShowDeleted, getSyncProvider, getTableName, nextPage, populate, populate, previousPage, release, restoreOriginal, rollback, rollback, rowSetPopulated, setKeyColumns, setMetaData, setOriginalRow, setPageSize, setShowDeleted, setSyncProvider, setTableName, size, toCollection, toCollection, toCollection, undoDelete, undoInsert, undoUpdate |
| 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 |
|---|
boolean isExecuted()
throws java.sql.SQLException
true if this rowset is in an executed state
boolean 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 occursvoid addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener to the listener list.
The listener is registered for all bound properties.
listener - The PropertyChangeListener to be addedjava.lang.String getCatalogName()
tableName property
resides.
String 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)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.
catalogName - 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),
RowSetWriterjava.lang.String getSchemaName()
tableName property
resides.
String 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)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.
schemaName - 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),
RowSetWriterjava.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.
- Returns:
- an array of
String objects or null
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.
String object or null
java.lang.NullPointerException - if columnCatalogNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnCatalogName.lengthvoid setColumnCatalogNames(java.lang.String[] columnCatalogNames)
columnCatalogNames property.
columnCatalogNames - 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.
void setColumnCatalogNames(int index,
java.lang.String columnCatalogName)
columnCatalogNames property.
index - the index of the array to set (zero based)columnCatalogName - the name of catalog for the column (can also be null
java.lang.NullPointerException - if columnCatalogNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnCatalogName.length
Note, the column is zero based whereas most jdbc calls are one based.
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.
- Returns:
- an array of
String objects or null
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.
String object or null
java.lang.NullPointerException - if columnSchemaNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnSchemaName.lengthvoid setColumnSchemaNames(java.lang.String[] columnSchemaNames)
columnSchemaNames property.
columnSchemaNames - 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.
void setColumnSchemaNames(int index,
java.lang.String columnSchemaName)
columnSchemaNames property.
index - the index of the array to set (zero based)columnSchemaName - the name of schema for the column (can also be null
java.lang.NullPointerException - if columnSchemaNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnSchemaName.length
Note, the column is zero based whereas most jdbc calls are one based.
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.
- Returns:
- an array of
String objects or null
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.
String object or null
java.lang.NullPointerException - if columnTableNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnTableName.lengthvoid setColumnTableNames(java.lang.String[] columnTableNames)
columnTableNames property.
columnTableNames - 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.
void setColumnTableNames(int index,
java.lang.String columnTableName)
columnTableNames property.
index - the index of the array to set (zero based)columnTableName - the name of table for the column (can also be null
java.lang.NullPointerException - if columnTableNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnTableName.length
Note, the column is zero based whereas most jdbc calls are one based.
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.
- Returns:
- an array of
String objects or null
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.
String object or null
java.lang.NullPointerException - if columnNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnName.lengthvoid setColumnNames(java.lang.String[] columnNames)
columnNames property.
columnNames - 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.
void setColumnNames(int index,
java.lang.String columnName)
columnNames property.
index - the index of the array to set (zero based)columnName - for the column (can also be null
java.lang.NullPointerException - if columnNames was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
columnName.length
Note, the column is zero based whereas most jdbc calls are one based.
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.
- Returns:
- an array of
boolean{/code> objects or null
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.
- Returns:
- a
boolean/code> object or null
- Throws:
java.lang.NullPointerException - if insertableColumns was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
insertableColumns.length
void setInsertableColumns(boolean[] insertableColumns)
insertableColumns property.
insertableColumns - 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.
void setInsertableColumns(int index,
boolean insertableColumn)
insertableColumns property.
index - the index of the array to set (zero based)insertableColumn - true if column should be inserted for new rows
java.lang.NullPointerException - if insertableColumns was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
insertableColumns.length
Note, the column is zero based whereas most jdbc calls are one based.
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.
- Returns:
- an array of
boolean{/code> objects or null
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.
- Returns:
- a
boolean{/code> object or null
- Throws:
java.lang.NullPointerException - if updatableColumns was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
updatableColumns.length
void setUpdatableColumns(boolean[] updatableColumns)
updatableColumns property.
updatableColumns - 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.
void setUpdatableColumns(int index,
boolean updatableColumn)
updatableColumns property.
index - the index of the array to set (zero based)updatableColumn - true if column should be updated when rows are updated
java.lang.NullPointerException - if updatableColumns was never set.
java.lang.ArrayIndexOutOfBoundsException - if index is >=
updatableColumns.length
Note, the column is zero based whereas most jdbc calls are one based.
boolean getPrintStatements()
printStatements property.
boolean{/code> object which, if true, causes SQL statements to be written to
System.out.
Note: This method is called by CachedRowSetXWriter.
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.
printStatements - a boolean{/code> object which determines whether
SQL Insert, UPDATE and DELETE statements are
written to System.out
void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - The name of the property to listen on.listener - The PropertyChangeListener to be addedvoid 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 removed
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 removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||