First page Back Continue Last page Text

oracle adf workshop

Notes:


Examining View Object Methods (continued)

setWhereClauseParam(int index, java.lang.Object value): Specifies a single bind-variable value to use with the View Object’s query condition, and executes the query

setWhereClauseParams(java.lang.Object[] values): Specifies the bind-variable values to use with the View Object’s query condition, and executes the query.

The RowSet interface implements the RowIterator interface, which enables access to the row set. Some of its methods include the following:

createRow(): Creates a new Row object, but does not insert it into the row set

findByEntity(int eRowHandle, int maxNumOfRows): Finds and returns view rows that use the entity row, identified by the entity row handle, eRowHandle

findByKey(Key key, int maxNumOfRows): Finds and returns view rows that match the specified key

first(): Designates the first row of the row set as the current row

getRow(Key key): Accesses a row through a unique key

hasNext(): Tests for existence of a row after the current row

hasPrevious(): Tests for existence of a row before the current row

insertRow(Row row): Adds a row to the row set, before the current row

last(): Designates the last row of the row set as the current row

next(): Steps forward, designating the next row as the current row

removeCurrentRow(): Removes the current Row object from the row set

previous(): Steps backward, designating the previous row as the current row

reset(): Clears the “current row” designation and places the iterator in the slot before the first row

setCurrentRow(Row row): Designates a given row as the current row

In addition to the RowSet and RowIterator interfaces, ViewObjectImpl implements the ViewObject interface, containing the following methods:

applyViewCriteria(ViewCriteria criteria): Applies the view criteria to this View Object

createRowSet(java.lang.String name): Creates and names a row set for the View Object

createViewCriteria(): Creates a “Query by Example” view criteria object

findViewLinkAccessor(ViewLink vl): Finds the view link accessor attribute

getOrderByClause(): Retrieves the current ORDER BY clause of the View Object’s query statement

getQuery(): Retrieves the View Object’s query statement

getViewCriteria(): Gets this View Object’s view criteria

getViewLinkNames(): Retrieves the names of the View Object’s View Links

getWhereClause(): Retrieves the current WHERE clause of the View Object’s query statement

isReadOnly(): Tests if the View Object is read-only

setOrderByClause(java.lang.String expr): Sets the ORDER BY clause of the View Object’s query statement

setWhereClause(java.lang.String cond): Sets the WHERE clause of the View Object’s query statement