|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
oracle.jbo.common.PropertiesHelper
oracle.jbo.common.RowSetHelper
oracle.jbo.server.RowSetImpl
oracle.jbo.server.ViewRowSetImpl
The middle-tier class that manages collections of view rows that result from executing a query.
A view row set blongs to a View Object. An important distinction between a View Object and a row set is that the View Object manages the query statement. All row sets that belong to a View Object use the same query statement. However, each row set supplies its own set of binding values. This arrangement is ideally for managing the master-detail relationship: the detail View Object supplies the same query statement for all detail row sets, while each row set builds its own bind values from its master row.
View rows are maintained in an ordered list, and each view row is identified by an index into this list. This index is referred as the absolute row index. An application can insert a row at any valid row index, or delete any row, which will cause the indices of following rows to be adjusted.
The work horse behind ViewRowSetImpl are internal query collections. In a master-detail relationship the detail set is identified by its foreign key value. For example, consider the View Objects Dept and TempAgency, where Dept is the master and TempAgency is the detail, which are related through a View Link <emLocation. Suppose Depts 10 and 20 are located in "New York" and Dept 30 in "San Jose", and "New York" has two temp agencies "ABC and DEF", and "San Jose" has "GHI and JKL".
This scenario has two query collections on the detail (TempAgency) side, for "New York" and "San Jose". If the application invokes the assocation/View Link accessor to get the temp agencies from Dept, each Dept produces a view row set. Two view row sets, for Depts 10 and 20 show temp agencies in "New York", and Dept 30 shows the temp agencies in "San Jose". The first two view row sets share the same query collection, and the third has its own.
An internal table of master-key/query-collection pairs, the query collection hash table, is maintained for the View Object. When a new detail view row set is created, it checks this hash table to see if a query collection of the master key value already is in the list, and if found, uses it. Otherwise, the query is executed and a new query collection is created.
The position of a row inserted in the middle of the row set is temporary in that when the data is posted to the database, this position will not be preserved in the database. If the row set is executed again, refreshing its data from the database, the new row will appear in the position returned by the database.
ViewObject, RowSet, ViewObjectImpl, ViewRowSetIteratorImpl| Field Summary | |
protected ViewRowSetIteratorImpl |
mDefaultView |
static byte |
mDefaultViewLinkMode |
protected com.sun.java.util.collections.ArrayList |
mMasterViews |
protected java.lang.Object[] |
mParamValues |
protected ViewObjectImpl |
mQRef |
protected com.sun.java.util.collections.ArrayList |
mUserParams |
protected com.sun.java.util.collections.HashMap |
mViewMap |
protected com.sun.java.util.collections.ArrayList |
mViews |
static byte |
VIEWLINK_MODE_CONSISTENT |
static byte |
VIEWLINK_MODE_DEFAULT |
static byte |
VIEWLINK_MODE_INCONSISTENT |
static byte |
VIEWLINK_MODE_UNINITIALIZED |
| Fields inherited from class oracle.jbo.common.RowSetHelper |
listeners, mMgmtListeners, mName |
| Fields inherited from class oracle.jbo.common.PropertiesHelper |
mProperties |
| Fields inherited from interface oracle.jbo.RowSet |
FORWARD_ONLY, RANGE_PAGING, RANGE_PAGING_AUTO_POST, SCROLLABLE |
| Fields inherited from interface oracle.jbo.RowIterator |
ITER_MODE_LAST_PAGE_FULL, ITER_MODE_LAST_PAGE_PARTIAL, SLOT_BEFORE_FIRST, SLOT_BEYOND_LAST, SLOT_DELETED, SLOT_VALID |
| Fields inherited from interface oracle.jbo.XMLInterface |
XML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT, XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE |
| Constructor Summary | |
ViewRowSetImpl(ViewObjectImpl vo, java.lang.String name, ViewRowSetIteratorImpl masterRSI)Constructs a new secondary (non-default) view row set. |
|
| Method Summary | |
void |
addListener(java.lang.Object listener)Adds an event listener to this object. |
void |
addManagementListener(RowSetManagementListener listener)Adds a subscriber (listener) to be notified of RowSetManagementListener events generated by this Row Set Iterator. |
void |
addRowSetManagementListener(RowSetManagementListener listener) |
protected void |
close()Closes the view row set. |
void |
closeRowSet()Closes the Row Set. |
void |
closeRowSetIterator()Closes this row set iterator. |
Row |
createAndInitRow(AttributeList initVals)Creates and initializes a new Row object, but does not insert it into the Row Set. |
RowSet |
createDetailRowSet(java.lang.String rsName, java.lang.String linkDefName)Creates and returns an new detail row set for this row set iterator. |
Key |
createKey(AttributeList nvp)Given a list of name-value pairs, creates a Key object that matches the key structure for the ViewObject for this RowItertor. |
Row |
createRow()Creates a new view row. |
RowSetIterator |
createRowSetIterator(java.lang.String name)Creates and returns a new row set iterator on this row set. |
boolean |
doesRowFilterMatch(Row[] masterRows, java.lang.Object[] rowFilterValues) |
static void |
dumpViewRowCache(RowSetIterator rsi, java.io.Writer out)Internal: Applications should not use this method. |
java.util.Enumeration |
enumerateRowsInRange()Creates and returns an enumerator of the rows in the range. |
void |
execute(boolean forceFlag, boolean notifyFlag)Executes the query. |
void |
execute(boolean forceFlag, boolean notifyFlag, Row[] masterRows) |
java.lang.Object[] |
executeDetailQuery(Row[] masterRows) |
void |
executeEmptyRowSet() |
void |
executeQuery()Executes the query. |
void |
findAndSetCurrentRowByKey(Key key, int rangeIndex) |
Row[] |
findByEntity(int eRowHandle, int maxNumOfRows)Finds and returns View rows that use the Entity row, identified by the Entity row handle, eRowHandle. |
Row[] |
findByKey(Key key, int maxNumOfRows)Finds and returns View rows that match the specified key. |
Row[] |
findByKey(Key key, int maxNumOfRows, boolean skipWhere) |
RowSetIterator |
findRowSetIterator(java.lang.String rsiName)Gets the named Row Set Iterator that was created at runtime for this Row Set. |
Row |
first()Navigates to the first row in the row set. |
byte |
getAccessMode() |
Row[] |
getAllRowsInRange()Returns an array of all rows in the iterator's range. |
ApplicationModule |
getApplicationModule()Returns the application module to which this row set's View Object belongs. |
SvcMsgIteratorState |
getCliIteratorState() |
int[] |
getCollMgmtInfo() |
Row |
getCurrentRow()Returns the current row of the iterator. |
int |
getCurrentRowIndex()Returns the absolute row index of the current row in the row set. |
int |
getCurrentRowSlot()Returns the current row slot status. |
ViewRowSetIteratorImpl |
getDefaultRowSetIterator()Returns the default ViewRowSetIteratorImpl. |
long |
getDetailEstimatedRowCount(Row[] masterRows) |
RowSet[] |
getDetailRowSets()Returns an array of all detail row sets for this row set iterator. |
java.lang.String |
getElementTagName() |
int |
getEstimatedRangePageCount()Returns getEstimatedRowCount()/rangePageSize, if rangeSize > 0. |
long |
getEstimatedRowCount()Returns an estimated number of rows in this row set. |
int |
getFetchedRowCount()Returns the number of rows fetched from the JDBC RestultSet. |
Row[] |
getFilteredRows(RowQualifier qualifier) |
Row[] |
getFilteredRows(java.lang.String attrName, java.lang.Object attrValue)Returns all rows in this collection whose attribute value matches the value being passed in attrValue. |
Row[] |
getFilteredRowsInRange(RowQualifier qualifier) |
Row[] |
getFilteredRowsInRange(java.lang.String attrName, java.lang.Object attrValue)Returns all rows in this range whose attribute value matches the value being passed in attrValue. |
int |
getIterMode()Gets the current iteration mode. |
RowSetIterator[] |
getMasterRowSetIterators()Returns an array of all master row set iterators for this row set. |
java.util.Vector |
getMasterViewRowSetIterators()Returns a list of all master row set iterators for this row set. |
com.sun.java.util.collections.ArrayList |
getMasterViewRowSetIteratorsList()Returns a list of all master row set iterators for this row set. |
Row[] |
getNextRangeSet()Gets the next set of rows in the range. |
java.lang.Object[] |
getParameters(boolean nullValueFlag)Returns an array of bind values to be used for binding to the query. |
java.lang.Object[] |
getParameters(boolean nullValueFlag, Row[] masterRows) |
java.lang.Object[] |
getParametersAsStorageTypes()Returns an array of bind values to be used for binding to the query. |
java.lang.Object[] |
getParametersAsStorageTypes(Row[] masterRows) |
Row[] |
getPreviousRangeSet()Gets the previous set of rows in the range. |
java.util.Hashtable |
getProperties()Retrieves all properties. |
QueryCollection |
getQueryCollection()Internal: Applications should not use this method. |
int |
getRangeIndexOf(Row row)Returns the range index of the row specified by row. |
int |
getRangeSize()Returns the range size of the iterator. |
int |
getRangeStart()Returns the absolute row index of the first row in the range. |
Row |
getRow(int index)Returns the row at absolute row index of index. |
Row |
getRow(Key key)Returns the first row whose key matches key. |
Row |
getRowAtRangeIndex(int index)Returns the row at range index index. |
int |
getRowCount()Returns the total number of rows in this row set. |
int |
getRowCountInRange()Returns the actual number of rows in the range. |
java.lang.Object[] |
getRowFilterValues() |
Row |
getRowFromHandle(java.lang.Object rowHandle)Internal: Applications should not use this method. |
protected Row[] |
getRows(EntityImpl entity)Returns an array of view rows that use the specified entity row. |
RowSet |
getRowSet()Implements RowSetIterator.getRowSet. |
ViewRowSetImpl |
getRowSetForFilter(java.lang.Object[] rowFilterValues, ViewRowSetImpl baseVRS)Internal: Applications should not use this method. |
RowSetIterator |
getRowSetIterator()Returns the row set iterator interface of this object. |
RowSetIterator[] |
getRowSetIterators()Gets all Row Set Iterators that belong to this Row Set. |
java.lang.Object |
getSyncLock()Gets the locking object for this Row Set Iterator. |
byte |
getViewLinkMode()Internal: Applications should not use this method. |
ViewObject |
getViewObject()Returns this row set's View Object. |
java.lang.Object[] |
getWhereClauseParams()Returns an array of bind values currently specified for the query. |
boolean |
hasDefaultRowSetIterator() |
boolean |
hasNext()Indicates whether the iterator has a next row or not. |
boolean |
hasPrevious()Indicates whether the iterator has a previous row or not. |
protected boolean |
initQueryCollection(boolean forceFlag, RowFilter rowFilter)Sets up QueryCollection for the view row set. |
void |
insertRow(Row row)Inserts the row into the row set. |
void |
insertRowAt(int index, Row row)Inserts a view row at an absolute row index specified by index. |
void |
insertRowAtRangeIndex(int index, Row row)Inserts the row into the row set at the specified range index. |
boolean |
isAssociationConsistent()Returns the association-consistent flag for this row set. |
boolean |
isDefaultRS()Internal: Applications should not use this method. |
boolean |
isDirty()Indicates whether data modifications have been performed since the last database post through this row set. |
boolean |
isExecuted()Indicates whether the query for this rowset has been executed once or not. |
boolean |
isFetchComplete()Tests if the query result set has been fetched to the end. |
boolean |
isForwardOnly()Indicates whether this row set is forward-only or not. |
boolean |
isMaxFetchSizeExceeded()Tests if the query result has been fetched to the end and the end was reached due to hitting the maxFetchSize limit |
boolean |
isNameGenerated()Tests if the Iterator's name was generated by the system. |
protected boolean |
isNotifiedRefresh()Indicates whether row set refresh event has been notified to the row set's listeners or not. |
boolean |
isPassivationEnabled() |
boolean |
isRangeAtBottom()Indicates whether the iterator range contains the last row of the row set. |
boolean |
isRangeAtTop()Indicates whether the iterator range contains the first row of the row set. |
boolean |
isRowValidation()Gets the validation flag on this iterator. |
Row |
last()Navigates to the last row in the row set. |
ViewRowImpl |
makeRowCopy(ViewRowImpl vr) |
Row |
next()Navigates to the next row in the row set. |
void |
prepareForBatchMode(SvcMsgIteratorState iteratorState, boolean setCurrentRow) |
Row |
previous()Navigates to the previous row in the row set. |
void |
printActiveObjsTab(java.io.PrintWriter pw) |
void |
printColl(java.io.PrintWriter pw, int printFlag) |
void |
printRUChain(java.io.PrintWriter pw) |
void |
readXML(Element elem, int depthCount) |
void |
readXML(Element elem, int depthCount, XSLStylesheet xslt) |
java.lang.Object[] |
refreshCollection(Row[] masterRows, boolean resetIter, boolean fillUpRange) |
void |
removeCurrentRow()Removes the current row. |
Row |
removeCurrentRowAndRetain()Removes the current Row object from the collection and retain it for insertion into another location. |
void |
removeCurrentRowFromCollection()Removes the current Row object from the collection. |
void |
removeListener(java.lang.Object listener)Removes an event listener to this object from the listener list. |
void |
removeManagementListener(RowSetManagementListener listener)Removes a subscriber (listener) for RowSetManagementListener events generated by this row set iterator. |
boolean |
removeMasterRowSetIterator(RowSetIterator masterRSI)Removes the master row set iterator in a master-detail View Link. |
void |
removeRowAndRetainAt(int index) |
void |
removeRowAt(int index)Removes a view row at an absolute row index specified by index. |
void |
removeRowFromCollectionAt(int index) |
void |
removeRowHandle(java.lang.Object rowHandle)Deprecated. Since Jdeveloper 9.0.3. No replacement. No longer used. |
void |
removeRowSetManagementListener(RowSetManagementListener listener) |
void |
reset()Resets the iterator. |
int |
scrollRange(int amount)Scrolls the range by amount. |
int |
scrollRangeTo(Row row, int index)Scrolls the range to a specific row. |
int |
scrollToRangePage(int amount)Moves the row set range start to the given page index where every page consists of RangeSize number of rows. |
void |
setAccessMode(byte flag)Constrains the row access based on the following settings: |
void |
setAssociationConsistent(boolean isConsistent)Sets the association-consistent flag for this row set. |
boolean |
setCurrentRow(Row row)Moves the iterator to the row specified by row. |
boolean |
setCurrentRowAtRangeIndex(int index)Moves the iterator to the row whose range index is index. |
void |
setExecuteParameters(java.lang.Object[] userValues, java.lang.Object[] paramValues, boolean diffParams) |
void |
setForwardOnly(boolean isForwardOnly)Sets whether this row set will be forward-only or not. |
void |
setIterMode(int mode)Sets the iteration mode for this Row Iterator. |
boolean |
setMasterRowSetIterator(RowSetIterator masterRSI)Sets the master row set iterator in a master-detail View Link. |
void |
setPassivationEnabled(boolean flag) |
void |
setPassivationEnabledInternal(boolean flag) |
int |
setRangeSize(int size)Sets the range size for the iterator. |
int |
setRangeStart(int start)Sets the range position by the absolute row index specified in start. |
void |
setReceiveAllInsertEvents(boolean b)Internal: Applications should not use this method. |
void |
setRowFilterValues(java.lang.Object[] rowFilterValues) |
void |
setRowValidation(boolean flag)Sets the validation flag on this iterator. |
void |
setViewLinkMode(byte val)Internal: Applications should not use this method. |
void |
setWhereClauseParam(int index, java.lang.Object value)Sets the bind value at a specified index. |
void |
setWhereClauseParams(java.lang.Object[] values)Sets bind values for the query. |
void |
writeAsXml(oracle.jbo.common.xml.XmlOutput out, Node node, oracle.jbo.common.xml.Criteria rules) |
Node |
writeXML(int depthCount, long options)Renders data in a canonical XML-format. |
Node |
writeXML(int depthCount, long options, XSLStylesheet xslt) |
Node |
writeXML(long options, com.sun.java.util.collections.HashMap voAttrRules)Renders data in a canonical XML-format. |
Node |
writeXML(long options, com.sun.java.util.collections.HashMap map, XSLStylesheet xslt) |
| Methods inherited from class oracle.jbo.common.RowSetHelper |
fireMgmtIteratorClosed, fireMgmtIteratorReset, fireNavigationEvent, fireRangeRefreshed, fireRangeScrolled, fireRowDeleted, fireRowInserted, fireRowUpdated, getListeners, getListenersList, getManagementListenersList, getName, hasListeners, hasManagementListeners, setName |
| Methods inherited from class oracle.jbo.common.PropertiesHelper |
getProperty, refreshProperty, setProperty |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.jbo.RowSet |
getName |
| Methods inherited from interface oracle.jbo.Properties |
getProperty, refreshProperty |
| Methods inherited from interface oracle.jbo.XMLInterface |
readXML, readXML, writeXML, writeXML, writeXML, writeXML |
| Field Detail |
protected ViewObjectImpl mQRef
protected com.sun.java.util.collections.ArrayList mViews
protected com.sun.java.util.collections.HashMap mViewMap
protected ViewRowSetIteratorImpl mDefaultView
protected com.sun.java.util.collections.ArrayList mMasterViews
protected com.sun.java.util.collections.ArrayList mUserParams
protected java.lang.Object[] mParamValues
public static final byte VIEWLINK_MODE_UNINITIALIZED
public static final byte VIEWLINK_MODE_INCONSISTENT
public static final byte VIEWLINK_MODE_CONSISTENT
public static final byte VIEWLINK_MODE_DEFAULT
public static byte mDefaultViewLinkMode
| Constructor Detail |
public ViewRowSetImpl(ViewObjectImpl vo,
java.lang.String name,
ViewRowSetIteratorImpl masterRSI)
vo - the View Object to which this view row set belongs.name - name to be given to this view row set. If null, the view row set is assigned the default row set name, which is the View Object's name, plus "_RowSet".masterRSI - the master row set iterator if this view row set will be detail in a master-detail relationship. null otherwise.| Method Detail |
public final java.lang.Object getSyncLock()
RowSetIteratorApplicationModule.getSyncLock() for details.getSyncLock in interface RowSetIteratorpublic final boolean isNameGenerated()
RowSetIteratorisNameGenerated in interface RowSetIteratortrue if the name was generated by the system. false if the name was given by the user and not generated by the system.public boolean isDefaultRS()
Indicates whether this row set is the default row set for the View Object.
protected boolean initQueryCollection(boolean forceFlag,
RowFilter rowFilter)
QueryCollection for the view row set.forceFlag - indicates whether to force-create the query collection or not. If this flag is false, we try to find an existing in the query collection list (of the View Object). If it is true, we do not bother with existing QCs.protected void close()
It closes all row set iterators, removes itself from all master row set iterators, and possibly remove the query collection from the query collection list.
public void closeRowSet()
RowSetcloseRowSet removes this Row Set from the master Row Set Iterator.closeRowSet in interface RowSetpublic void closeRowSetIterator()
RowSetIteratorcloseRowSetIterator closes all detail row sets.
After that, it fires a RowSetManagementListener.iteratorClosed() event to its RowSetManagementListener's.
Then, it deregisters this row set iterator from the owning row set, and deregisters all its listeners.
closeRowSetIterator in interface RowSetIterator
public void execute(boolean forceFlag,
boolean notifyFlag)
forceFlag controls whether a new query collection should be force-created or not. If true, the query collection list is not consulted and a new query collection is created. If false, we check the query collection list to see if one with the key exists. If so, we reuse the existing one.
If forceFlag is true, the application may see a different set of rows than before, depending on the where-clause and data modifications performed by this application or other users.
See ViewObjectImpl.executeQuery for explanation.
forceFlag - indicates whether to force-create the query collection.notifyFlag - indicates whether to send notification or not. If true, each row set iterator will fire a range refreshed event.ViewObjectImpl.executeQuery()
public void execute(boolean forceFlag,
boolean notifyFlag,
Row[] masterRows)
public void executeQuery()
See ViewObjectImpl.executeQuery for details.
executeQuery in interface RowSetViewObjectImpl.executeQuery()public java.lang.Object[] executeDetailQuery(Row[] masterRows)
executeDetailQuery in interface WSRowSetMarshaller
public boolean doesRowFilterMatch(Row[] masterRows,
java.lang.Object[] rowFilterValues)
doesRowFilterMatch in interface WSRowSetMarshaller
public java.lang.Object[] refreshCollection(Row[] masterRows,
boolean resetIter,
boolean fillUpRange)
refreshCollection in interface WSRowSetMarshallerpublic void executeEmptyRowSet()
executeEmptyRowSet in interface WSRowSetMarshallerpublic RowSetIterator createRowSetIterator(java.lang.String name)
createRowSetIterator in interface RowSetname - the name of the new row set iterator.
public ViewRowSetImpl getRowSetForFilter(java.lang.Object[] rowFilterValues,
ViewRowSetImpl baseVRS)
public RowSetIterator[] getRowSetIterators()
RowSetgetRowSetIterators in interface RowSetpublic RowSetIterator findRowSetIterator(java.lang.String rsiName)
RowSetfindRowSetIterator in interface RowSetrsiName - a Row Set Iterator name. If null, it returns the the Row Set.null if the named Row Set Iterator is not not found.public boolean isExecuted()
isExecuted in interface RowSetpublic final QueryCollection getQueryCollection()
Returns the query collection for this row set.
public boolean hasDefaultRowSetIterator()
public ViewRowSetIteratorImpl getDefaultRowSetIterator()
ViewRowSetIteratorImpl.
The default row set iterator has the same name as this row set object.
public void addListener(java.lang.Object listener)
listener should implement the RowSetListener interface.
addListener in interface NavigatableRowIteratoraddListener in class RowSetHelperlistener - the RowSetListener registering interest in this object's events.public void removeListener(java.lang.Object listener)
listener should implement the RowSetListener interface.
removeListener in interface NavigatableRowIteratorremoveListener in class RowSetHelperlistener - the RowSetListener to be removed.public void addManagementListener(RowSetManagementListener listener)
RowSetIteratorRowSetManagementListener events generated by this Row Set Iterator.addManagementListener in interface RowSetIteratoraddManagementListener in class RowSetHelperpublic void removeManagementListener(RowSetManagementListener listener)
RowSetIteratorRowSetManagementListener events generated by this row set iterator.removeManagementListener in interface RowSetIteratorremoveManagementListener in class RowSetHelperpublic void addRowSetManagementListener(RowSetManagementListener listener)
public void removeRowSetManagementListener(RowSetManagementListener listener)
public com.sun.java.util.collections.ArrayList getMasterViewRowSetIteratorsList()
public java.util.Vector getMasterViewRowSetIterators()
public boolean setMasterRowSetIterator(RowSetIterator masterRSI)
See ViewObjectImpl.setMasterRowSetIterator for details.
setMasterRowSetIterator in interface RowSetmasterRSI - master row set iterator.ViewObjectImpl.setMasterRowSetIterator(RowSetIterator)public boolean removeMasterRowSetIterator(RowSetIterator masterRSI)
See ViewObjectImpl.removeMasterRowSetIterator for details.
removeMasterRowSetIterator in interface RowSetmasterRSI - master row set iterator to remove.ViewObjectImpl.removeMasterRowSetIterator(RowSetIterator)public boolean isDirty()
protected boolean isNotifiedRefresh()
public ViewRowImpl makeRowCopy(ViewRowImpl vr)
public void insertRowAt(int index,
Row row)
index.
An absolute row index is a row index in the entire row set. It starts at 0.
index - absolute row index at which the row is to be inserted.row - the row to inserted.public void removeRowAt(int index)
index.
An absolute row index is a row index in the entire row set. It starts at 0.
index - absolute row index of the row to remove.public void removeRowFromCollectionAt(int index)
public void removeRowAndRetainAt(int index)
public Row createAndInitRow(AttributeList initVals)
RowIteratorcreateRow() mainly in that this method allows the user to pass in a list of name-value pairs with which row attributes are initialized.
nvp is a named value pair. When building an nvp from scratch, use NameValuePairs to build a new nvp. Here is an example:
NameValuePairs nvp = new NameValuePairs();
nvp.setAttribute("EmpTyp", "C");
Row row = voEmp.createAndInitRow(nvp);
This method is particularly useful when creating a subclass View Row or Entity Row. You can include polymorphic discriminator attribute values in nvp and correct subclass row object will be created.
When this method is called, underlying entities are created. After the new entities are created, a new view row is created. After that ViewRowImpl.create(oracle.jbo.AttributeList) is called with this nvp. ViewRowImpl.create(AttributeList) walks thru the list of entities and calls EntityImpl.create(AttributeList) with the same nvp for each entity in the view row.
createAndInitRow in interface RowIteratorinitVals - a list of name-value pairs.public Row createRow()
See ViewObjectImpl.createRow for details.
createRow in interface RowIteratorViewObjectImpl.createRow()public int getRowCount()
See ViewObjectImpl.getRowCount for details.
getRowCount in interface RowIteratorViewObjectImpl.getRowCount()public int getEstimatedRangePageCount()
RowSetIteratorThis number may fluxuate when the View Object is syncronized with its Entity Object.
getEstimatedRangePageCount in interface RowSetIteratorpublic long getEstimatedRowCount()
See ViewObjectImpl.getEstimatedRowCount for details.
getEstimatedRowCount in interface RowSetViewObjectImpl.getEstimatedRowCount()public long getDetailEstimatedRowCount(Row[] masterRows)
getDetailEstimatedRowCount in interface WSRowSetMarshallerpublic RowSetIterator[] getMasterRowSetIterators()
getMasterRowSetIterators in interface RowSetpublic ApplicationModule getApplicationModule()
getApplicationModule in interface RowSetpublic ViewObject getViewObject()
getViewObject in interface RowSetViewObject this row set belongs to.public RowSet getRowSet()
RowSetIterator.getRowSet.getRowSet in interface RowSetIteratorpublic RowSetIterator getRowSetIterator()
public java.lang.Object[] getRowFilterValues()
getRowFilterValues in interface WSRowSetIteratorMarshallerpublic void setRowFilterValues(java.lang.Object[] rowFilterValues)
setRowFilterValues in interface WSRowSetIteratorMarshallerpublic SvcMsgIteratorState getCliIteratorState()
getCliIteratorState in interface WSRowSetIteratorMarshaller
public void prepareForBatchMode(SvcMsgIteratorState iteratorState,
boolean setCurrentRow)
prepareForBatchMode in interface WSRowSetIteratorMarshallerpublic int setRangeSize(int size)
See ViewObjectImpl.setRangeSize for details.
setRangeSize in interface RowIteratorsize - the new range size.ViewObjectImpl.setRangeSize(int)public int getRangeSize()
See ViewObjectImpl.getRangeSize for details.
getRangeSize in interface RowIteratorViewObjectImpl.getRangeSize()public int getRangeStart()
See ViewObjectImpl.getRangeStart for details.
getRangeStart in interface RowIteratorViewObjectImpl.getRangeStart()public int setRangeStart(int start)
start.
See ViewObjectImpl.setRangeStart for details.
setRangeStart in interface RowIteratorstart - absolute row index of the row that should be positioned as the first row of the range. An absolute row index is a row index in the entire row set. It starts at 0.ViewObjectImpl.setRangeStart(int)public int scrollRange(int amount)
amount.
See ViewObjectImpl.scrollRange for details.
scrollRange in interface RowIteratoramount - the number of rows to scroll.ViewObjectImpl.scrollRange(int)public int scrollToRangePage(int amount)
RowSetIterator(rangeSize * (pageSize-1)) - getRangeStart();
scrollToRangePage in interface RowSetIteratoramount - the page number to go to in the result set.
public int scrollRangeTo(Row row,
int index)
See ViewObjectImpl.scrollRangeTo for details.
scrollRangeTo in interface RowIteratorrow - the row to scroll the range to.index - the range index to position the row at.ViewObjectImpl.scrollRangeTo(Row, int)public Row[] getAllRowsInRange()
See ViewObjectImpl.getAllRowsInRange for details.
getAllRowsInRange in interface RowIteratorViewObjectImpl.getAllRowsInRange()public Row[] getNextRangeSet()
RowSetIteratorgetNextRangeSet() will return rows 10 through 19.
If the next range set does not have enough rows to fill up the range, getNextRangeSet() returns a partially filled range. That is, this method operates as if the iteration mode is .RowIterator.ITER_MODE_LAST_PAGE_PARTIAL
If there is no more rows, this method returns an empty array (an array of length 0).
While obtaining the next range set, the range will be scrolled. This causes a to be sent to #oracle.jbo.ScrollEvent. To pick up such an event, the listener object must implement the #oracle.jbo.RowSetListener.rangeScrolled(oracle.jbo.ScrollEvent) interface. Further, this listener must be registered through a call to #oracle.jbo.RowSetListener (the listener object passed in as the parameter to #oracle.jbo.NavigatableRowIterator.addListener(Object)addListener).
After the next range set is obtained, the method sets the first Row of the range as the current row. This may fire a and sends it to #oracle.jbo.NavigationEvent.#oracle.jbo.RowSetListener.navigated(oracle.jbo.NavigationEvent)
getNextRangeSet in interface RowSetIteratorpublic Row[] getPreviousRangeSet()
RowSetIteratorgetPreviousRangeSet() will return rows 0 through 9.
If there is no more rows, this method returns an empty array (an array of length 0).
While obtaining the previous range set, the range will be scrolled. This causes a to be sent to #oracle.jbo.ScrollEvent. To pick up such an event, the listener object must implement the #oracle.jbo.RowSetListener.rangeScrolled(oracle.jbo.ScrollEvent) interface. Further, this listener must be registered through a call to #oracle.jbo.RowSetListener (the listener object passed in as the parameter to #oracle.jbo.NavigatableRowIterator.addListener(Object)addListener).
After the previous range set is obtained, the method sets the first Row of the range as the current row. This may fire a and sends it to #oracle.jbo.NavigationEvent.#oracle.jbo.RowSetListener.navigated(oracle.jbo.NavigationEvent)
getPreviousRangeSet in interface RowSetIteratorpublic java.util.Enumeration enumerateRowsInRange()
enumerateRowsInRange in interface RowIteratorpublic int getFetchedRowCount()
RestultSet.getFetchedRowCount in interface RowIteratorpublic boolean isRangeAtBottom()
See ViewObjectImpl.isRangeAtBottom for details.
isRangeAtBottom in interface RowIteratortrue if the range contains the last row, false if not.ViewObjectImpl.isRangeAtBottom()public boolean isRangeAtTop()
See ViewObjectImpl.isRangeAtTop for details.
isRangeAtTop in interface RowIteratortrue if the range contains the first row, false if not.ViewObjectImpl.isRangeAtTop()public void insertRow(Row row)
This method does change currency. It sets the inserted row to be the current row (for the RSI through which the row is inserted). From an events standpoint, insertRow will generate two events: insert followed by navigated.
See ViewObjectImpl.insertRow for details.
insertRow in interface RowIteratorrow - the view row to insert.ViewObjectImpl.insertRow(Row)
public void insertRowAtRangeIndex(int index,
Row row)
See ViewObjectImpl.insertRowAtRangeIndex for details.
insertRowAtRangeIndex in interface RowIteratorindex - the range index into which the row is to be inserted.row - the view row to insert.ViewObjectImpl.insertRowAtRangeIndex(int, Row)public Row getRowFromHandle(java.lang.Object rowHandle)
Returns the row with a handle specified by hdl.
See ViewObjectImpl#getRowFromHandle(Object) for details.
rowHandle - the row handle.ViewObjectImpl.getRowFromHandle(Object)public void removeRowHandle(java.lang.Object rowHandle)
Removes the row handle from the row handle hash table.
See ViewObjectImpl.removeRowHandle for details.
rowHandle - the row handle to remove.ViewObjectImpl.removeRowHandle(Object)public Row getRow(Key key)
key.
See ViewObjectImpl.getRow for details.
getRow in interface RowIteratorkey - key to match.null if no match.ViewObjectImpl.getRow(Key)public int getRangeIndexOf(Row row)
row.
See ViewObjectImpl.getRangeIndexOf for details.
getRangeIndexOf in interface RowIteratorrow - the row in question.ViewObjectImpl.getRangeIndexOf(Row)public void removeCurrentRow()
See ViewObjectImpl.removeCurrentRow for details.
removeCurrentRow in interface RowIteratorViewObjectImpl.removeCurrentRow()public void removeCurrentRowFromCollection()
RowIteratorIt does not cause the row to be deleted from the database table. It just removes the row from the row collection. However, once the row is removed, it cannot be used any more. If you want to remove the current row from collection and insert it elsewhere, call , change currency to the desired location, and then call #removeAndRetain() with that row.RowIterator.insertRow(oracle.jbo.Row)
removeCurrentRowFromCollection in interface RowIteratorpublic Row removeCurrentRowAndRetain()
RowIteratorIt does not cause the row to be deleted from the database table. It just removes the row from the row collection.
This method differs from in that after the current row is removed from the collection, it can be inserted back into the collection at another location.RowIterator.removeCurrentRowFromCollection()
To do so, call , and get the returning row. Then, change currency to the desired location, and call RowIterator.removeCurrentRowAndRetain() with that row.RowIterator.insertRow(oracle.jbo.Row)
removeCurrentRowAndRetain in interface RowIteratorpublic void setRowValidation(boolean flag)
RowIteratorsetRowValidation in interface RowIteratorflag - Whether to turn row validation off or not.public boolean isRowValidation()
RowIteratorisRowValidation in interface RowIteratorpublic boolean setCurrentRow(Row row)
row.
See ViewObjectImpl.setCurrentRow for details.
setCurrentRow in interface RowIteratorrow - the new current row.ViewObjectImpl.setCurrentRow(Row)public boolean setCurrentRowAtRangeIndex(int index)
index.
See ViewObjectImpl.setCurrentRowAtRangeIndex for details.
setCurrentRowAtRangeIndex in interface RowIteratorindex - range index to which to move the current row.ViewObjectImpl.setCurrentRowAtRangeIndex(int)public Row getCurrentRow()
See ViewObjectImpl.getCurrentRow for details.
getCurrentRow in interface RowIteratornull if no current row.ViewObjectImpl.getCurrentRow()public int getCurrentRowIndex()
See ViewObjectImpl.getCurrentRowIndex for details.
getCurrentRowIndex in interface RowIteratorreset.ViewObjectImpl.getCurrentRowIndex()public int getCurrentRowSlot()
See ViewObjectImpl.getCurrentRowSlot for details.
getCurrentRowSlot in interface RowIteratorViewObjectImpl.getCurrentRowSlot()public int getIterMode()
RowIteratorgetIterMode in interface RowIteratorpublic void setIterMode(int mode)
RowIteratorsetIterMode in interface RowIteratormode - should be ITER_MODE_LAST_PAGE_PARTIAL if the iteration mode is to be "partial-last-page", ITER_MODE_LAST_PAGE_FULL if it is to be "full-last-page".public boolean hasNext()
See ViewObjectImpl.hasNext for details.
hasNext in interface RowIteratortrue if there is a next row, false if not.ViewObjectImpl.hasNext()public boolean hasPrevious()
See ViewObjectImpl.hasPrevious for details.
hasPrevious in interface RowIteratortrue if there is a previous row, false if not.ViewObjectImpl.hasPrevious()public Row first()
See ViewObjectImpl.first for details.
first in interface RowIteratornull if the row set has no rows.ViewObjectImpl.first()public Row last()
See ViewObjectImpl.last for details.
last in interface RowIteratornull if the row set has no rows.ViewObjectImpl.last()public Row next()
See ViewObjectImpl.next for details.
next in interface RowIteratornull if no next row. If no next row, the current row is not moved.ViewObjectImpl.next()public Row previous()
See ViewObjectImpl.previous for details.
previous in interface RowIteratornull if no previous row. If no previous row, the current row is not moved.ViewObjectImpl.previous()public void reset()
See ViewObjectImpl.reset for details.
reset in interface RowIteratorViewObjectImpl.reset()public RowSet[] getDetailRowSets()
ViewObjectImpl.getDetailRowSets for details.getDetailRowSets in interface RowSetIteratorViewObjectImpl.getDetailRowSets()
public RowSet createDetailRowSet(java.lang.String rsName,
java.lang.String linkDefName)
See ViewObjectImpl.createDetailRowSet for details.
createDetailRowSet in interface RowSetIteratorrsName - the name of the row set to be assigned to the new detail row set.linkDefName - identifies the View Link definition that defines the master-detail relationship between this row set iterator and the new detail row set.ViewObjectImpl.createDetailRowSet(String, String)public void setForwardOnly(boolean isForwardOnly)
See ViewObjectImpl.setForwardOnly for details.
setForwardOnly in interface RowSetisForwardOnly - indicates whether the row set should be forward-only or not.ViewObjectImpl.setForwardOnly(boolean)public final boolean isForwardOnly()
See ViewObjectImpl.isForwardOnly for details.
isForwardOnly in interface RowSetViewObjectImpl.isForwardOnly()public final byte getAccessMode()
getAccessMode in interface RowSetRowSet.setAccessMode(byte)public void setAccessMode(byte flag)
RowSetSCROLLABLE - if this RowSet should fetch rows and cache the ViewRows in a collection. This is the most flexible mode for accessing rows and working with a RowSet.FORWARD_ONLY - if this RowSet should only provide sequential access to Rows in its collection. The iterators on this RowSet will not allow scrolling back.RANGE_PAGING - if this RowSet should fetch rows in ranges (set using setRangeSize() - the default range size is -1 to fetch all rows), such that on scroll to the the next range or to fetch a row that's not in the current range, it's fetched back from the database using ROWNUM query and the row at the desired index is placed as the first row in the current range.
New rows inserted in this mode will be inserted at the beginning of the rowset to maintain their row indices.
If an attempt is made to get a row outside of the range when a new row is inserted or a row is removed in the current range, then an InvalidOperException is raised as the current set of changes needs to be posted to recalculate the right ROWNUM.
RANGE_PAGING_AUTO_POST - if this rowset should also post any changes in this transaction to access a row out of the current range.Switching access modes for a rowset will not take effect until the next explicit call to executeQuery. Switching accessmode back to SCROLLABLE from any other mode is not allowed.
setAccessMode in interface RowSetflag - One of the four enumerated values SCROLLABLE, FORWARD_ONLY, RANGE_PAGING, RANGE_PAGING_AUTO_POSTpublic byte getViewLinkMode()
public void setViewLinkMode(byte val)
public void setAssociationConsistent(boolean isConsistent)
See ViewObjectImpl.setAssociationConsistent for details.
setAssociationConsistent in interface RowSetisConsistent - indicates whether association-consistency should be on or not.ViewObjectImpl.setAssociationConsistent(boolean)public final boolean isMaxFetchSizeExceeded()
RowSetisMaxFetchSizeExceeded in interface RowSettrue if the result set has been fetched to the maxFetchSize limit and there are still more rows in the database.public boolean isFetchComplete()
RowSetisFetchComplete in interface RowSettrue if the result set has been fetched to the end.public boolean isAssociationConsistent()
See ViewObjectImpl.isAssociationConsistent for details.
isAssociationConsistent in interface RowSetViewObjectImpl.isAssociationConsistent()public int getRowCountInRange()
See ViewObjectImpl.getRowCountInRange for details.
getRowCountInRange in interface RowIteratorViewObjectImpl.getRowCountInRange()public void setWhereClauseParams(java.lang.Object[] values)
See ViewObjectImpl.setWhereClauseParams for details.
setWhereClauseParams in interface RowSetvalues - an array of bind values.ViewObjectImpl.setWhereClauseParams(Object[])
public void setExecuteParameters(java.lang.Object[] userValues,
java.lang.Object[] paramValues,
boolean diffParams)
public void setWhereClauseParam(int index,
java.lang.Object value)
index.
See ViewObjectImpl.setWhereClauseParam for details.
setWhereClauseParam in interface RowSetindex - index of the bind value.value - the bind value.ViewObjectImpl.setWhereClauseParam(int, Object)public java.lang.Object[] getWhereClauseParams()
ViewObjectImpl.getWhereClauseParams for details.getWhereClauseParams in interface RowSetViewObjectImpl.getWhereClauseParams()public java.lang.Object[] getParametersAsStorageTypes()
See ViewObjectImpl.getParametersAsStorageTypes for details.
null if there is no bind value to return.ViewObjectImpl.getParametersAsStorageTypes()public java.lang.Object[] getParametersAsStorageTypes(Row[] masterRows)
public Row getRow(int index)
index.
An absolute row index is a row index in the entire row set. It starts at 0.
index - the absolute row index.null if the index is invalid.public Row getRowAtRangeIndex(int index)
index.
Range index is a 0 based index within the range.
getRowAtRangeIndex in interface RowIteratorindex - range index of the row.null if the index is outside the range, or if there is no row at the specified index.
public static void dumpViewRowCache(RowSetIterator rsi,
java.io.Writer out)
Debug routine that prints the view row cache content for the query collection.
View row cache manages mapping between entity rows and view rows. If a View Object consists of entities A, B, C, each view row consists of three entity rows (from A, B, and C, respectively). For this, the view row cache manages three hash tables, each mapping the entity row to view rows that use it as a constituent entity row.
This method dumps the content of that mapping to out.
rsi - the row set iterator whose view row cache is to be dumped.out - where to dump the output.protected Row[] getRows(EntityImpl entity)
A view row consists of entity rows. This method returns all view rows (so far retrieved) that use the entity row specified by entity
entity. null if no view row uses entity.
public Row[] findByKey(Key key,
int maxNumOfRows)
See for details.#oracle.jbo.RowIterator.findByKey(oracle.jbo.Key, int)
findByKey in interface RowIteratorkey - the key to match.maxNumOfRows - the maximum size of the array to return, or -1 to return all rows.
public void findAndSetCurrentRowByKey(Key key,
int rangeIndex)
findAndSetCurrentRowByKey in interface WSRowSetIteratorMarshaller
public Row[] findByKey(Key key,
int maxNumOfRows,
boolean skipWhere)
public Key createKey(AttributeList nvp)
RowIteratorcreateKey in interface RowIterator
public Row[] findByEntity(int eRowHandle,
int maxNumOfRows)
RowIteratoreRowHandle.findByEntity in interface RowIteratoreRowHandle - the Entity row handle.maxNumOfRows - the maximum size of the row array to return, or -1 to return all rows.public java.lang.Object[] getParameters(boolean nullValueFlag)
This array is a union of the following set of bind values:
setWhereClauseParam).This method differs from getParametersAsStorageTypes in that, if the bind values are domain instanes, this method returns them as is, while getParametersAsStorageTypes returns the actual data out of the domain.
null if there is no bind value to return.
public java.lang.Object[] getParameters(boolean nullValueFlag,
Row[] masterRows)
public java.util.Hashtable getProperties()
getProperties in interface PropertiesgetProperties in class PropertiesHelperpublic void printActiveObjsTab(java.io.PrintWriter pw)
public void printRUChain(java.io.PrintWriter pw)
public void printColl(java.io.PrintWriter pw,
int printFlag)
public int[] getCollMgmtInfo()
public Row[] getFilteredRows(RowQualifier qualifier)
public Row[] getFilteredRowsInRange(RowQualifier qualifier)
public Row[] getFilteredRows(java.lang.String attrName,
java.lang.Object attrValue)
RowSetIteratorattrValue.
Note that this method does not affect the current RowSetIterator.
getFilteredRows in interface RowSetIteratorattrName - name of the attribute to be used for filtering.attrValue - attribute value for filtering.
public Row[] getFilteredRowsInRange(java.lang.String attrName,
java.lang.Object attrValue)
RowSetIteratorattrValue.
This method uses getAllRowsInRange() to retrieve all rows and then match the rows.
getFilteredRowsInRange in interface RowSetIteratorattrName - name of the attribute to be used for filtering.attrValue - attribute value for filtering.public void setPassivationEnabled(boolean flag)
public boolean isPassivationEnabled()
public void setPassivationEnabledInternal(boolean flag)
public void setReceiveAllInsertEvents(boolean b)
public final Node writeXML(long options,
com.sun.java.util.collections.HashMap voAttrRules)
XMLInterfaceViewObjectImpl and ViewRowImpl implement this method to render data in XML.
Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.
The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:
EntityImpl.The voAttrMap parameter represents in a hashmap, the mapping between a given ViewObject's definition type and the corresponding Attributes/accessors to render. A null entry in the hashmap means, render all attributes and accessors of that viewobject type.
writeXML in interface XMLInterfaceoptions - a set of bit flags that will control the writeXMLvoAttrRules - HashMap containing Definition names of ViewObjects and an array of AttributeDef to render for a ViewObject of that definition type.
public Node writeXML(int depthCount,
long options)
XMLInterfaceViewObjectImpl and ViewRowImpl implement this method to render data in XML.
Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.
The depthcount parameter represents to what level the rendering should recurse. A depthcount of zero (0) means do not traverse any View Links while rendering. One (1) means traverse the View Links on this object but no View Links thereafter, and so on.
The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:
EntityImpl.writeXML in interface XMLInterfacedepthCount - represents to what level the rendering should recurse.options - a set of bit flags that will control the writeXML behavior.
public Node writeXML(long options,
com.sun.java.util.collections.HashMap map,
XSLStylesheet xslt)
writeXML in interface XMLInterface
public Node writeXML(int depthCount,
long options,
XSLStylesheet xslt)
writeXML in interface XMLInterface
public void readXML(Element elem,
int depthCount,
XSLStylesheet xslt)
readXML in interface XMLInterfacepublic java.lang.String getElementTagName()
getElementTagName in interface oracle.jbo.common.xml.XmlSerializable
public void writeAsXml(oracle.jbo.common.xml.XmlOutput out,
Node node,
oracle.jbo.common.xml.Criteria rules)
writeAsXml in interface oracle.jbo.common.xml.XmlSerializable
public void readXML(Element elem,
int depthCount)
readXML in interface XMLInterface
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright © 1997, 2005, Oracle. All rights reserved.