|
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 |
public interface WLRowSetMetaData
Field Summary | |
---|---|
static int |
VERIFY_AUTO_VERSION_COLUMNS The VERIFY_AUTO_VERSION_COLUMNS option includes the primary key columns and specified version columns in the WHERE clause. |
static int |
VERIFY_MODIFIED_COLUMNS The VERIFY_MODIFIED_COLUMNS only verifies the modified columns during the update. |
static int |
VERIFY_NONE The VERIFY_NONE option only includes the primary key columns in the WHERE clause. |
static int |
VERIFY_READ_COLUMNS The VERIFY_READ_COLUMNS optimistic concurrency policy includes all values read into the WLCachedRowSet in the where clause when changes are written back to the database. |
static int |
VERIFY_SELECTED_COLUMNS The VERIFY_SELECTED_COLUMNS only verifies specified columns and the primary key columns during the update. |
static int |
VERIFY_VERSION_COLUMNS The VERIFY_VERSION_COLUMNS option includes the primary key columns and specified version columns in the WHERE clause. |
Fields inherited from interface java.sql.ResultSetMetaData |
---|
columnNoNulls, columnNullable, columnNullableUnknown |
Method Summary | |
---|---|
abstract int |
findColumn(String n) Returns the column index for the specified column name. |
abstract boolean |
getBatchDeletes() Returns the current batch delete setting. |
abstract boolean |
getBatchInserts() Returns the current batch insert setting. |
abstract boolean |
getBatchUpdates() Returns the current batch update setting. |
abstract int |
getBatchVerifySize() Returns the current batch verify size. |
abstract String |
getDefaultNamespace() Returns the XML schema's default namespace for this RowSet. |
abstract boolean |
getGroupDeletes() Returns the current group deletes setting. |
abstract int |
getGroupDeleteSize() Returns the current group delete size. |
abstract int |
getOptimisticPolicy() Returns the current optimistic concurrency policy. |
abstract String |
getOptimisticPolicyAsString() Returns the current optimistic policy as a String |
abstract String |
getQualifiedTableName(int i) getQualifiedTableName behaves like getTableName; however, if the catalog and/or schema name have been set then getQualifiedTableName returns catalog.schema.column. |
abstract String |
getQualifiedTableName(String n) getQualifiedTableName behaves like getTableName; however, if the catalog and/or schema name have been set then getQualifiedTableName returns catalog.schema.column. |
abstract String |
getRowName() Returns the name of the Row element in the schema and instance. |
abstract String |
getRowSetName() Returns the name of the Row Set in the schema and instance. |
abstract boolean |
getVerboseSQL() Returns the current verbose SQL setting |
abstract String |
getWriteColumnName(int i) Returns the write column name for the specified column. |
abstract String |
getWriteColumnName(String colName) Returns the write column name for the specified column. |
abstract String |
getWriteTableName() Returns the write table name. |
abstract String |
getXMLSchemaLocation() Returns the schemaLocation attribute which instance documents will use to refer to this schema document. |
abstract boolean |
haveSetPKColumns() Indicates whether setPrimaryKeyColumn has been called on any of the columns. |
abstract boolean |
isAutoVersionColumn(int i) Indicates whether the column will be used for a VERIFY_AUTO_VERSION_COLUMNS verification. |
abstract boolean |
isAutoVersionColumn(String colName) Indicates whether the column will be used for a VERIFY_AUTO_VERSION_COLUMNS verification. |
abstract boolean |
isPrimaryKeyColumn(int i) Indicates whether the column is a primary key column. |
abstract boolean |
isPrimaryKeyColumn(String colName) Indicates whether the column is a primary key column. |
abstract boolean |
isReadOnly() Indicates whether the entire RowSet is ReadOnly. |
abstract boolean |
isReadOnly(String colName) Indicates whether the column is marked read-only. |
abstract boolean |
isSelectedColumn(int i) Indicates whether the column will be used for a VERIFY_SELECTED_COLUMNS verification. |
abstract boolean |
isSelectedColumn(String colName) Indicates whether the column will be used for a VERIFY_SELECTED_COLUMNS verification. |
abstract boolean |
isVersionColumn(int i) Indicates whether the column will be used for a VERIFY_VERSION_COLUMNS verification. |
abstract boolean |
isVersionColumn(String colName) Indicates whether the column will be used for a VERIFY_VERSION_COLUMNS verification. |
abstract void |
loadXMLSchema(XMLInputStream xis) Loads the WLRowSetMetaData from an XML Schema document in the XMLInputStream. |
abstract void |
markUpdateProperties(String writeTableName, String pkColumn, String rowVersionColumn) markUpdateProperties is a convenience method for indicating the writeTableName, a single primary key column, and a row version column. |
abstract void |
setAutoVersionColumn(int i, boolean b) Sets a column to be a version column. |
abstract void |
setAutoVersionColumn(String colName, boolean b) Sets a column to be a version column. |
abstract void |
setBatchDeletes(boolean b) Sets whether DELETE statements should use a JDBC batch statement or should be issued as individual DELETE statements. |
abstract void |
setBatchInserts(boolean b) Sets whether INSERT statements should use a JDBC batch statement or should be issued as individual INSERT statements. |
abstract void |
setBatchUpdates(boolean b) Sets whether UPDATE statements should use a JDBC batch statement or should be issued as individual UPDATE statements. |
abstract void |
setBatchVerifySize(int size) When batched updates and enabled and the database/driver do not return the updated row counts from batched statements, an extra select query is issued prior to the batched updates to ensure there is no optimistic conflict. |
abstract void |
setDefaultNamespace(String namespace) Sets the XML schema's default namespace for this RowSet. |
abstract void |
setGroupDeletes(boolean b) Sets the RowSet to use group deletes. |
abstract void |
setGroupDeleteSize(int size) Sets the number of rows sent in an individual delete statement. |
abstract void |
setOptimisticPolicy(int policy) Sets the optimistic concurrency policy for updates |
abstract void |
setOptimisticPolicyAsString(String policy) Sets the optimistic concurrency policy for updates |
abstract void |
setPrimaryKeyColumn(int i, boolean b) Sets the column to be a primary key column. |
abstract void |
setPrimaryKeyColumn(String colName, boolean b) Sets the column to be a primary key column. |
abstract void |
setReadOnly(boolean b) Sets the entire RowSet to be ReadOnly. |
abstract void |
setReadOnly(int i, boolean b) Sets the column to be a read-only column. |
abstract void |
setReadOnly(String colName, boolean b) Sets the column to be a read-only column. |
abstract void |
setRowName(String rowName) Sets the name of the Row element in the schema and instance. |
abstract void |
setRowSetName(String rowSetName) Sets the name of the Row Set in the schema and instance. |
abstract void |
setTableName(String tableName) Sets the table name for all columns. |
abstract void |
setTableName(String colName, String tableName) Sets the table name for the specified column. |
abstract void |
setVerboseSQL(boolean b) Enables/disables printing of the executed SQL statements to System.out. |
abstract void |
setVerifySelectedColumn(int i, boolean b) Sets a column to be verified during the update. |
abstract void |
setVerifySelectedColumn(String colName, boolean b) Sets a column to be verified during the update. |
abstract void |
setVersionColumn(int i, boolean b) Sets a column to be a version column. |
abstract void |
setVersionColumn(String colName, boolean b) Sets a column to be a version column. |
abstract void |
setWriteColumnName(int i, String writeColumnName) Sets the write column name for the specified column. |
abstract void |
setWriteColumnName(String colName, String writeColumnName) Sets the write column name for the specified column. |
abstract void |
setWriteTableName(String writeTableName) Sets a table to be the write table. |
abstract void |
setXMLSchemaLocation(String location) Sets the schemaLocation attribute which instance documents will use to refer to this schema document. |
abstract void |
writeXMLSchema(XMLOutputStream xos) Writes the WLRowSetMetaData as an XML Schema document to the specified XMLOutputStream. |
Methods inherited from interface javax.sql.RowSetMetaData |
---|
setAutoIncrement, setCaseSensitive, setCatalogName, setColumnCount, setColumnDisplaySize, setColumnLabel, setColumnName, setColumnType, setColumnTypeName, setCurrency, setNullable, setPrecision, setScale, setSchemaName, setSearchable, setSigned, setTableName |
Methods inherited from interface java.sql.ResultSetMetaData |
---|
getCatalogName, getColumnClassName, getColumnCount, getColumnDisplaySize, getColumnLabel, getColumnName, getColumnType, getColumnTypeName, getPrecision, getScale, getSchemaName, getTableName, isAutoIncrement, isCaseSensitive, isCurrency, isDefinitelyWritable, isNullable, isReadOnly, isSearchable, isSigned, isWritable |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
static final int VERIFY_READ_COLUMNS
For instance, if the RowSet attempts to update John Doe's salary to 20000, it will issue:
UPDATE SET e_salary=20000 WHERE e_id=1 AND e_first='John' AND e_last='Doe' AND e_salary=10000
static final int VERIFY_MODIFIED_COLUMNS
For instance, if the RowSet attempts to update John Doe's salary to 20000, it will issue:
UPDATE SET e_salary=20000 WHERE e_id=1 AND e_salary=10000
WLRowSetMetaData.setOptimisticPolicy(int)
, WLRowSetMetaData.setOptimisticPolicyAsString(java.lang.String)
, Constant Field Valuesstatic final int VERIFY_SELECTED_COLUMNS
acceptChanges
.
This method is used when the application wants complete control to customize which columns are verified.
For instance, if the RowSet attempts to update John Doe's salary to 20000 and setVerifySelectedColumn("e_first") has been called, it will issue:
UPDATE SET e_salary=20000 WHERE e_id=1 AND e_first='John'
WLRowSetMetaData.setOptimisticPolicy(int)
, WLRowSetMetaData.setOptimisticPolicyAsString(java.lang.String)
, Constant Field Valuesstatic final int VERIFY_NONE
For instance, if the RowSet attempts to update John Doe's salary to 20000, it will issue:
UPDATE SET e_salary=20000 WHERE e_id=1
WLRowSetMetaData.setOptimisticPolicy(int)
, WLRowSetMetaData.setOptimisticPolicyAsString(java.lang.String)
, Constant Field Valuesstatic final int VERIFY_AUTO_VERSION_COLUMNS
The VERIFY_AUTO_VERSION_COLUMNS automatically updates the version columns to the next increasing value
UPDATE SET e_salary=20000, e_version=2 WHERE e_id=1 AND e_version=1
WLRowSetMetaData.setOptimisticPolicy(int)
, WLRowSetMetaData.setOptimisticPolicyAsString(java.lang.String)
, Constant Field Valuesstatic final int VERIFY_VERSION_COLUMNS
The database must handle updating the version column to a new value. Some databases provide support for a version type that will automatically be updated, but it is also possible to write a database trigger to update the version column.
UPDATE SET e_salary=20000 WHERE e_id=1 AND e_version=1
WLRowSetMetaData.setOptimisticPolicy(int)
, WLRowSetMetaData.setOptimisticPolicyAsString(java.lang.String)
, Constant Field ValuesMethod Detail |
---|
int getOptimisticPolicy()
Possible values are:
1 = VERIFY_READ_COLUMNS (the default)
2 = VERIFY_MODIFIED_COLUMNS
3 = VERIFY_SELECTED_COLUMNS
4 = VERIFY_NONE
5 = VERIFY_AUTO_VERSION_COLUMNS
6 = VERIFY_VERSION_COLUMNS
String getOptimisticPolicyAsString()
void setOptimisticPolicy(int policy) throws SQLException
Possible values are:
1 = VERIFY_READ_COLUMNS (the default)
2 = VERIFY_MODIFIED_COLUMNS
3 = VERIFY_SELECTED_COLUMNS
4 = VERIFY_NONE
5 = VERIFY_AUTO_VERSION_COLUMNS
6 = VERIFY_VERSION_COLUMNS
setOptimisticPolicy must be called before calling acceptChanges
.
SQLException
- thrown if the policy is not a legal valuevoid setOptimisticPolicyAsString(String policy) throws SQLException
Possible values are:
VERIFY_READ_COLUMNS (the default)
VERIFY_MODIFIED_COLUMNS
VERIFY_SELECTED_COLUMNS
VERIFY_NONE
VERIFY_AUTO_VERSION_COLUMNS
VERIFY_VERSION_COLUMNS
setOptimisticPolicy must be called before calling acceptChanges
.
SQLException
- thrown if the policy is not a legal valuevoid setBatchInserts(boolean b)
Batch inserts require a JDBC 2.0 or later driver that supports the java.sql.PreparedStatement.addBatch method
By default, batch inserts are not enabled.
boolean getBatchInserts()
By default, batch inserts are not enabled.
void setBatchDeletes(boolean b)
Batch deletes require a JDBC 2.0 or later driver that supports the java.sql.PreparedStatement.addBatch method
By default, batch deletes are not enabled.
boolean getBatchDeletes()
By default, batch deletes are not enabled.
void setBatchUpdates(boolean b)
Batch updates require a JDBC 2.0 or later driver that supports the java.sql.PreparedStatement.addBatch method
By default, batch updates are not enabled.
boolean getBatchUpdates()
By default, batch updates are not enabled.
void setVerboseSQL(boolean b)
boolean getVerboseSQL()
void setGroupDeletes(boolean b)
boolean getGroupDeletes()
void setGroupDeleteSize(int size) throws SQLException
SQLException
- if the size is <= 0int getGroupDeleteSize()
void setBatchVerifySize(int size) throws SQLException
SQLException
- if the size is <= 0int getBatchVerifySize()
int findColumn(String n) throws SQLException
SQLException
- if the column name is not in the RowSetString getQualifiedTableName(String n) throws SQLException
SQLException
String getQualifiedTableName(int i) throws SQLException
SQLException
void setTableName(String tableName) throws SQLException
The RowSet implementation will attempt to infer table names when it is populated with data. However, many JDBC drivers do not implement java.sql.ResultSetMetaData.getTable
, so it is usually required to call setTableName before writing the RowSet's data.
SQLException
void setTableName(String colName, String tableName) throws SQLException
The RowSet implementation will attempt to infer table names when it is populated with data. However, many JDBC drivers do not implement java.sql.ResultSetMetaData.getTable
so it is usually required to call setTableName before writing the RowSet's data.
SQLException
void setPrimaryKeyColumn(int i, boolean b) throws SQLException
Marking a column to be a primary key automatically marks it as read-only. To update a primary key column, it is necessary to explicitly call setReadOnly(col, false) after setPrimaryKeyColumn.
i
- column numberb
- isPrimaryKeySQLException
void setPrimaryKeyColumn(String colName, boolean b) throws SQLException
Marking a column to be a primary key automatically marks it as read-only. To update a primary key column, it is necessary to explicitly call setReadOnly(col, false) after setPrimaryKeyColumn.
colName
- column nameb
- isPrimaryKeySQLException
boolean isPrimaryKeyColumn(int i) throws SQLException
i
- column numberSQLException
boolean isPrimaryKeyColumn(String colName) throws SQLException
colName
- column nameSQLException
boolean haveSetPKColumns()
setPrimaryKeyColumn
has been called on any of the columns.
This is generally useful for a RowSetWriter implementation which requires the user to set primary key columns to determine whether this has occurred.
boolean isReadOnly(String colName) throws SQLException
colName
- column nameSQLException
void setReadOnly(int i, boolean b) throws SQLException
i
- column numberb
- isReadOnlySQLException
void setReadOnly(String colName, boolean b) throws SQLException
colName
- column nameb
- isReadOnlySQLException
boolean isReadOnly() throws SQLException
SQLException
void setReadOnly(boolean b) throws SQLException
b
- isReadOnlySQLException
void setVerifySelectedColumn(int i, boolean b) throws SQLException
i
- column numberb
- isVerifiedColumnSQLException
boolean isSelectedColumn(int i) throws SQLException
SQLException
boolean isSelectedColumn(String colName) throws SQLException
SQLException
void setVerifySelectedColumn(String colName, boolean b) throws SQLException
colName
- column nameb
- isVerifiedColumnSQLException
void setAutoVersionColumn(int i, boolean b) throws SQLException
i
- column numberb
- isVersionColumnSQLException
void setAutoVersionColumn(String colName, boolean b) throws SQLException
colName
- column nameb
- isVersionColumnSQLException
boolean isAutoVersionColumn(String colName) throws SQLException
SQLException
boolean isAutoVersionColumn(int i) throws SQLException
SQLException
void setVersionColumn(int i, boolean b) throws SQLException
i
- column numberb
- isVersionColumnSQLException
void setVersionColumn(String colName, boolean b) throws SQLException
colName
- column nameb
- isVersionColumnSQLException
boolean isVersionColumn(String colName) throws SQLException
SQLException
boolean isVersionColumn(int i) throws SQLException
SQLException
void setWriteTableName(String writeTableName) throws SQLException
The write table is the only table that can be updated or deleted.
This is typically used when a RowSet is populated via a join from multiple tables, but the rowset should only update one table.
Any column which is not from the write table is marked as read-only.
For instance, a rowset might include a join of orders and customers. The write table could be set to orders. If deleteRow were called, it would delete the order row, but not delete the customer row.
writeTableName
- the write table nameSQLException
String getWriteTableName()
void markUpdateProperties(String writeTableName, String pkColumn, String rowVersionColumn) throws SQLException
setTableName(writeTableName); setWriteTableName(writeTableName); setPrimaryKeyColumn(findColumn(pkColumn), true); setOptimisticPolicy(VERIFY_VERSION_COLUMNS); setVersionColumn(findColumn(rowVersionColumn), true);
SQLException
String getWriteColumnName(int i) throws SQLException
i
- column numberSQLException
String getWriteColumnName(String colName) throws SQLException
By default the write column name is the same as the column name.
The write column name may be set to a different value with setWriteColumnName. This is commonly done when queries like SELECT colName as alias ... are done. In this case, the rowset only sees the column alias and needs the writeColumnName to be set to the actual column name for updates to be successful.
colName
- column nameSQLException
void setWriteColumnName(int i, String writeColumnName) throws SQLException
By default the write column name is the same as the column name.
The write column name may be set to a different value with setWriteColumnName. This is commonly done when queries like SELECT colName as alias ... are done. In this case, the rowset only sees the column alias and needs the writeColumnName to be set to the actual column name for updates to be successful.
i
- column numberwriteColumnName
- write column nameSQLException
void setWriteColumnName(String colName, String writeColumnName) throws SQLException
By default the write column name is the same as the column name.
The write column name may be set to a different value with setWriteColumnName. This is commonly done when queries like SELECT colName as alias ... are done. In this case, the rowset only sees the column alias and needs the writeColumnName to be set to the actual column name for updates to be successful.
colName
- column namewriteColumnName
- write column nameSQLException
void setDefaultNamespace(String namespace)
namespace
- default namespaceString getDefaultNamespace()
void setRowName(String rowName)
rowName
- the row nameString getRowName()
The default value is getWriteTableName() + "Row". If the write table name has not been set, it defaults to "TableRow".
void setRowSetName(String rowSetName)
rowSetName
- the row set nameString getRowSetName()
The default value is getRowName() + "Set"
void writeXMLSchema(XMLOutputStream xos) throws IOException, SQLException
IOException
SQLException
void loadXMLSchema(XMLInputStream xis) throws IOException, SQLException
IOException
SQLException
String getXMLSchemaLocation()
The default value is: getDefaultNamespace()+"/" + getRowSetName()+".xsd"
void setXMLSchemaLocation(String location)
|
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 |