Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.jbo.server
Class ViewRowSetImpl

java.lang.Object
  extended by oracle.jbo.common.PropertiesHelper
      extended by oracle.jbo.common.RowSetHelper
          extended by oracle.jbo.server.ViewRowSetImpl

All Implemented Interfaces:
java.io.Serializable, WSRowSetIteratorMarshaller, WSRowSetMarshaller, XmlSerializable, ExprWrappable, NavigatableRowIterator, Properties, RowIterator, RowSet, RowSetIterator, VariableManagerOwner, VariableManagerOwnerBase, XMLInterface
Direct Known Subclasses:
CmrAccessorViewRowSet, EntityRowSetImpl

public class ViewRowSetImpl
extends RowSetHelper
implements RowSet, WSRowSetMarshaller, WSRowSetIteratorMarshaller

The middle-tier class that manages collections of view rows that result from executing a query.

A view row set belongs 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.

Since:
JDeveloper 3.0
See Also:
ViewObject, RowSet, ViewObjectImpl, ViewRowSetIteratorImpl, Serialized Form

Field Summary
static int FINDER_RANGE_SIZE_DEFAULT
           
static int FINDER_RANGE_SIZE_MAX
           
static int FINDER_RANGE_SIZE_SKIP
           
static int FINDER_RANGE_SIZE_UNINITIALIZED
           
static int mDefaultFinderRangeSize
           
protected  ViewRowSetIteratorImpl mDefaultView
           
static byte mDefaultViewLinkMode
           
protected  java.util.ArrayList mMasterViews
           
protected  java.lang.Object[] mParamValues
           
protected  ViewObjectImpl mQRef
           
protected  java.util.ArrayList mUserParams
           
protected  java.util.HashMap mViewMap
           
protected  java.util.ArrayList mViews
           
protected  java.util.ArrayList mWhereParams
           
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
COPY_OPT_ALL_ROWS, COPY_OPT_LIMIT_RANGE, FORWARD_ONLY, RANGE_PAGING, RANGE_PAGING_AUTO_POST, RANGE_PAGING_INCR, 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, XML_PASSIVATION_USE

 

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)
           
 boolean cancelQuery()
          Cancels a running query.
protected  void close(boolean keepQC)
          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.
 RowSet deepCopy(java.util.HashMap voAttrMap, long options)
          This method performs a copy of view rows and the Entity row references of the view rows that belong to this RowSet.
 void defineNamedWhereClauseParam(java.lang.String name, java.lang.Object defaultValue, int[] indices)
          Defines a named bind variable to use with the view object's where-clause.
 boolean doesRowFilterMatch(Row[] masterRows, java.lang.Object[] rowFilterValues)
           
static void dumpViewRowCache(RowSetIterator rsi, java.io.Writer out)
          Internal: Applications should not use this method.
 VariableValueManager ensureVariableManager()
          Returns this object's Variable Value Manager.
 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)
           
 RowIterator findByAltKey(java.lang.String keyName, Key key, int maxNumOfRows, boolean skipWhere)
          Same as RowIterator.findByKey(Key, int) with a few extra functionalities.
 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)
           
 RowIterator findByViewCriteria(ViewCriteria criteria, int maxNumOfRows, int queryMode)
          Finds and returns View rows that match the specified View Criteria.
 RowIterator findByViewCriteriaWithBindVars(ViewCriteria criteria, int maxNumOfRows, int queryMode, Variable[] bindVars, java.lang.Object[] bindValues)
           
 RowIterator findInCacheByAltKey(java.lang.String keyName, Key key, int maxNumOfRows)
           
 Row[] findInCacheByKey(Key key, int maxNumOfRows)
           
 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.
 void forceExecuteQueryOfSharedVO()
          Force RowSet of the shared ViewObject to execute the query.
 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.
 long getCappedRowCount(long cap)
           
 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 getDeferredEstimatedRowCount()
          If this ViewObject is marked to not perform the estimatedRowCount query, then return -1 until either the estimatedRowCount is called and the count is known or the RowSet is fetched completely in which case the actual row count is known.
 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.
 java.lang.String getFullName()
           
 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.
 java.util.ArrayList getMasterViewRowSetIteratorsList()
          Returns a list of all master row set iterators for this row set.
 java.lang.Class getMessageBundleClass()
          Internal: Applications should not use this method.
 java.lang.Object getNamedWhereClauseParam(java.lang.String name)
          Gets the value of a named where-clause parameter for this row set.
 AttributeList getNamedWhereClauseParams()
          Gets the name, value pair of all named bind variables.
 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()
          Gets the table of properties.
 java.lang.Object getProperty(java.lang.String hintName)
          Retrieves the specified property, if it exists.
 QueryCollection getQueryCollection()
          Internal: Applications should not use this method.
 int getRangeIndexOf(Row row)
          Returns the range index of the row specified by row.
 int getRangePagingCacheFactor()
           
 int getRangeSize()
          Returns the range size of the iterator.
 int getRangeStart()
          Returns the absolute row index of the first row in the range.
 ResourceBundleDef getResourceBundleDef()
           
 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.
 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.
 VariableValueManager getVariableManager()
          Returns this object's current Variable Value Manager.
 java.lang.Object getVariableValue(java.lang.String varName)
           
 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.
 boolean hasVariables()
          Returns a flag indicating whether this object has Variables or not.
protected  boolean initQueryCollection(int 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 isAllRowsFetched()
           
 boolean isAssociationConsistent()
          Returns the association-consistent flag for this row set.
 boolean isDefaultRowSet()
          Internal: Applications should not use this method.
 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 isExecutedInternal()
           
 boolean isExecutedNotEmpty()
           
 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 isRangePaging()
           
 boolean isRowValidation()
          Gets the validation flag on this iterator.
 boolean isScrollable()
           
 Row last()
          Navigates to the last row in the row set.
 ViewRowImpl makeRowCopy(ViewRowImpl vr)
           
 boolean needsRefresh()
           
 Row next()
          Navigates to the next row in the row set.
 void preFetchRowsByKeys(AttributeDef[] keyAttrs, Key[] keys)
           
 void preFetchRowsByKeys(AttributeDef[] keyAttrs, Key[] keys, Row parentRow)
           
 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)
           
protected  void reduceUserParamsToSize(int newSize)
           
 void refreshCache(int queryMode)
           
 java.lang.Object[] refreshCollection(Row[] masterRows, boolean resetIter, boolean fillUpRange)
           
 void refreshWhereClauseParams()
           
 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 removeNamedWhereClauseParam(java.lang.String name)
          Removes a named where-clause parameter.
 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.
 void resetExecuted()
          This methods invalidates all the iterators on this rowset and marks the rowset as not executed.
 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.
 void setCollectionForRowFilter(java.lang.Object[] rowFilterValues, byte baseViewLinkMode)
          Internal: Applications should not use this method.
 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 setNamedWhereClauseParam(java.lang.String name, java.lang.Object value)
          Sets the value of a named where-clause parameter for this row set.
 void setNamedWhereClauseParams(AttributeList attrlist)
          Sets the name, bind value pair passed as AttributeList attrlist.
 void setOwnedByQC(boolean b)
           
 void setPassivationEnabled(boolean flag)
           
 void setPassivationEnabledInternal(boolean flag)
           
 void setRangePagingCacheFactor(int f)
           
 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 skipNamedWhereClauseParam(java.lang.String name)
          Skips the named where-clause parameter for this row set.
 void writeAsXml(XmlOutput out, Node node, 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, java.util.HashMap voAttrRules)
          Renders data in a canonical XML-format.
 Node writeXML(long options, java.util.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, updateNamedWhereParamValues

 

Methods inherited from class oracle.jbo.common.PropertiesHelper
closeObject, getImageLoc, getProperty, isReadOnly, refreshProperties, 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

mQRef

protected ViewObjectImpl mQRef

mViews

protected java.util.ArrayList mViews

mViewMap

protected java.util.HashMap mViewMap

mDefaultView

protected ViewRowSetIteratorImpl mDefaultView

mMasterViews

protected java.util.ArrayList mMasterViews

mUserParams

protected java.util.ArrayList mUserParams

mParamValues

protected java.lang.Object[] mParamValues

mWhereParams

protected java.util.ArrayList mWhereParams

VIEWLINK_MODE_UNINITIALIZED

public static final byte VIEWLINK_MODE_UNINITIALIZED
See Also:
Constant Field Values

VIEWLINK_MODE_INCONSISTENT

public static final byte VIEWLINK_MODE_INCONSISTENT
See Also:
Constant Field Values

VIEWLINK_MODE_CONSISTENT

public static final byte VIEWLINK_MODE_CONSISTENT
See Also:
Constant Field Values

VIEWLINK_MODE_DEFAULT

public static final byte VIEWLINK_MODE_DEFAULT
See Also:
Constant Field Values

mDefaultViewLinkMode

public static byte mDefaultViewLinkMode

FINDER_RANGE_SIZE_UNINITIALIZED

public static final int FINDER_RANGE_SIZE_UNINITIALIZED
See Also:
Constant Field Values

FINDER_RANGE_SIZE_MAX

public static final int FINDER_RANGE_SIZE_MAX
See Also:
Constant Field Values

FINDER_RANGE_SIZE_SKIP

public static final int FINDER_RANGE_SIZE_SKIP
See Also:
Constant Field Values

FINDER_RANGE_SIZE_DEFAULT

public static final int FINDER_RANGE_SIZE_DEFAULT
See Also:
Constant Field Values

mDefaultFinderRangeSize

public static int mDefaultFinderRangeSize

Constructor Detail

ViewRowSetImpl

public ViewRowSetImpl(ViewObjectImpl vo,
                      java.lang.String name,
                      ViewRowSetIteratorImpl masterRSI)
Constructs a new secondary (non-default) view row set.
Parameters:
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

getSyncLock

public final java.lang.Object getSyncLock()
Description copied from interface: RowSetIterator
Gets the locking object for this Row Set Iterator. Actually, this method locks the Application Module to which this Row Set Iterator belongs. See ApplicationModule.getSyncLock() for details.
Specified by:
getSyncLock in interface RowSetIterator
Returns:
the locking object.

isNameGenerated

public final boolean isNameGenerated()
Description copied from interface: RowSetIterator
Tests if the Iterator's name was generated by the system.
Specified by:
isNameGenerated in interface RowSetIterator
Returns:
true if the name was generated by the system. false if the name was given by the user and not generated by the system.

isDefaultRS

public boolean isDefaultRS()
Internal: Applications should not use this method.

Indicates whether this row set is the default row set for the View Object.

Returns:
indicates whether this row set is the default row set for the View Object.

isDefaultRowSet

public boolean isDefaultRowSet()
Internal: Applications should not use this method.
Specified by:
isDefaultRowSet in interface RowSet
Returns:
Indicates whether this row set is the default row set for the View Object.

initQueryCollection

protected boolean initQueryCollection(int forceFlag,
                                      RowFilter rowFilter)
Sets up QueryCollection for the view row set.
Parameters:
forceFlag - indicates whether to force-create the query collection or not. If this flag is 0, we try to find an existing in the query collection list (of the View Object). If it is 1, we force a new QC, except if the VO's max-fetch-size = 0 in which case we look for existing. If -1, we force a new QC, regardless of the VO's max-fetch-size.
rowFilter - filter to initialize the query collection.
Returns:
indicates whether a new query collection was created or not.

close

protected void close(boolean keepQC)
Closes the view row set.

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.


closeRowSet

public void closeRowSet()
Description copied from interface: RowSet
Closes the row set. It closes all row set iterators that belong to this row set. If this row set is a detail row set in a master-detail relationship, closeRowSet removes this row set from the master row set iterator.
Specified by:
closeRowSet in interface RowSet

closeRowSetIterator

public void closeRowSetIterator()
Description copied from interface: RowSetIterator
Closes this row set iterator. If this row set iterator is a master in a master-detail relationship, closeRowSetIterator 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.

Specified by:
closeRowSetIterator in interface RowSetIterator

execute

public void execute(boolean forceFlag,
                    boolean notifyFlag)
Executes the query.

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.

Parameters:
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.
See Also:
ViewObjectImpl.executeQuery()

execute

public void execute(boolean forceFlag,
                    boolean notifyFlag,
                    Row[] masterRows)

refreshCache

public void refreshCache(int queryMode)

executeQuery

public void executeQuery()
Executes the query.

See ViewObjectImpl.executeQuery for details.

Specified by:
executeQuery in interface RowSet
See Also:
ViewObjectImpl.executeQuery()

forceExecuteQueryOfSharedVO

public void forceExecuteQueryOfSharedVO()
Force RowSet of the shared ViewObject to execute the query.

executeDetailQuery

public java.lang.Object[] executeDetailQuery(Row[] masterRows)
Specified by:
executeDetailQuery in interface WSRowSetMarshaller

doesRowFilterMatch

public boolean doesRowFilterMatch(Row[] masterRows,
                                  java.lang.Object[] rowFilterValues)
Specified by:
doesRowFilterMatch in interface WSRowSetMarshaller

refreshCollection

public java.lang.Object[] refreshCollection(Row[] masterRows,
                                            boolean resetIter,
                                            boolean fillUpRange)
Specified by:
refreshCollection in interface WSRowSetMarshaller

executeEmptyRowSet

public void executeEmptyRowSet()
Specified by:
executeEmptyRowSet in interface WSRowSetMarshaller
Specified by:
executeEmptyRowSet in interface RowSet

createRowSetIterator

public RowSetIterator createRowSetIterator(java.lang.String name)
Creates and returns a new row set iterator on this row set.
Specified by:
createRowSetIterator in interface RowSet
Parameters:
name - the name of the new row set iterator.
Returns:
the new row set iterator.

setCollectionForRowFilter

public void setCollectionForRowFilter(java.lang.Object[] rowFilterValues,
                                      byte baseViewLinkMode)
Internal: Applications should not use this method.

getRowSetIterators

public RowSetIterator[] getRowSetIterators()
Description copied from interface: RowSet
Gets all row set iterators that belong to this row set.
Specified by:
getRowSetIterators in interface RowSet
Returns:
the array of row set iterators.

findRowSetIterator

public RowSetIterator findRowSetIterator(java.lang.String rsiName)
Description copied from interface: RowSet
Gets the named row set iterator that was created at runtime for this row set.
Specified by:
findRowSetIterator in interface RowSet
Parameters:
rsiName - a row set iterator name. If null, it returns the the row set.
Returns:
the row set iterator. null if the named row set iterator is not not found.

isExecuted

public boolean isExecuted()
Indicates whether the query for this rowset has been executed once or not.
Specified by:
isExecuted in interface RowSet
Returns:
true if the row set has been executed.

isExecutedNotEmpty

public boolean isExecutedNotEmpty()
For internal use only. Application developers should not use this

isExecutedInternal

public boolean isExecutedInternal()

resetExecuted

public void resetExecuted()
Description copied from interface: RowSet
This methods invalidates all the iterators on this rowset and marks the rowset as not executed.
Specified by:
resetExecuted in interface RowSet

getQueryCollection

public final QueryCollection getQueryCollection()
Internal: Applications should not use this method.

Returns the query collection for this row set.

Returns:
the QueryCollection for this row set.

setOwnedByQC

public void setOwnedByQC(boolean b)

hasDefaultRowSetIterator

public boolean hasDefaultRowSetIterator()

getDefaultRowSetIterator

public ViewRowSetIteratorImpl getDefaultRowSetIterator()
Returns the default ViewRowSetIteratorImpl.

The default row set iterator has the same name as this row set object.

Returns:
the default row set iterator.

addListener

public void addListener(java.lang.Object listener)
Adds an event listener to this object.

listener should implement the RowSetListener interface.

Specified by:
addListener in interface NavigatableRowIterator
Overrides:
addListener in class RowSetHelper
Parameters:
listener - the RowSetListener registering interest in this object's events.

removeListener

public void removeListener(java.lang.Object listener)
Removes an event listener to this object from the listener list.

listener should implement the RowSetListener interface.

Specified by:
removeListener in interface NavigatableRowIterator
Overrides:
removeListener in class RowSetHelper
Parameters:
listener - the RowSetListener to be removed.

addManagementListener

public void addManagementListener(RowSetManagementListener listener)
Description copied from interface: RowSetIterator
Adds a subscriber (listener) to be notified of RowSetManagementListener events generated by this Row Set Iterator.
Specified by:
addManagementListener in interface RowSetIterator
Overrides:
addManagementListener in class RowSetHelper
Parameters:
listener - the subscriber to be added. It should implement RowSetManagementListener.

removeManagementListener

public void removeManagementListener(RowSetManagementListener listener)
Description copied from interface: RowSetIterator
Removes a subscriber (listener) for RowSetManagementListener events generated by this row set iterator.
Specified by:
removeManagementListener in interface RowSetIterator
Overrides:
removeManagementListener in class RowSetHelper
Parameters:
listener - the subscriber to be removed.

addRowSetManagementListener

public void addRowSetManagementListener(RowSetManagementListener listener)

removeRowSetManagementListener

public void removeRowSetManagementListener(RowSetManagementListener listener)

getMasterViewRowSetIteratorsList

public java.util.ArrayList getMasterViewRowSetIteratorsList()
Returns a list of all master row set iterators for this row set.
Returns:
a list of all master row set iterators for this row set.

getMasterViewRowSetIterators

public java.util.Vector getMasterViewRowSetIterators()
Returns a list of all master row set iterators for this row set.
Returns:
a list of all master row set iterators for this row set.

setMasterRowSetIterator

public boolean setMasterRowSetIterator(RowSetIterator masterRSI)
Sets the master row set iterator in a master-detail View Link.

See ViewObjectImpl.setMasterRowSetIterator for details.

Specified by:
setMasterRowSetIterator in interface RowSet
Parameters:
masterRSI - master row set iterator.
Returns:
indicates whether the master row set iterator was successfully set or not.
See Also:
ViewObjectImpl.setMasterRowSetIterator(RowSetIterator)

removeMasterRowSetIterator

public boolean removeMasterRowSetIterator(RowSetIterator masterRSI)
Removes the master row set iterator in a master-detail View Link.

See ViewObjectImpl.removeMasterRowSetIterator for details.

Specified by:
removeMasterRowSetIterator in interface RowSet
Parameters:
masterRSI - master row set iterator to remove.
Returns:
indicates whether the master row set iterator was successfully removed or not.
See Also:
ViewObjectImpl.removeMasterRowSetIterator(RowSetIterator)

isDirty

public boolean isDirty()
Indicates whether data modifications have been performed since the last database post through this row set.
Returns:
flag indicating whether the row set is dirty.

isNotifiedRefresh

protected boolean isNotifiedRefresh()
Indicates whether row set refresh event has been notified to the row set's listeners or not.
Returns:
flag indicating whether refresh was notified or not.

makeRowCopy

public ViewRowImpl makeRowCopy(ViewRowImpl vr)

insertRowAt

public void insertRowAt(int index,
                        Row row)
Inserts a view row at an absolute row index specified by index.

An absolute row index is a row index in the entire row set. It starts at 0.

Parameters:
index - absolute row index at which the row is to be inserted.
row - the row to inserted.

removeRowAt

public void removeRowAt(int index)
Removes a view row at an absolute row index specified by index.

An absolute row index is a row index in the entire row set. It starts at 0.

Parameters:
index - absolute row index of the row to remove.

removeRowFromCollectionAt

public void removeRowFromCollectionAt(int index)

removeRowAndRetainAt

public void removeRowAndRetainAt(int index)

createAndInitRow

public Row createAndInitRow(AttributeList initVals)
Description copied from interface: RowIterator
Creates and initializes a new Row object, but does not insert it into the Row Set. This method differs from createRow() 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.

Specified by:
createAndInitRow in interface RowIterator
Parameters:
initVals - a list of name-value pairs.
Returns:
a new Row object.

createRow

public Row createRow()
Creates a new view row.

See ViewObjectImpl.createRow for details.

Specified by:
createRow in interface RowIterator
Returns:
the new view row.
See Also:
ViewObjectImpl.createRow()

getRowCount

public int getRowCount()
Returns the total number of rows in this row set.

See ViewObjectImpl.getRowCount for details.

Specified by:
getRowCount in interface RowIterator
Returns:
the number of rows in the row set.
See Also:
ViewObjectImpl.getRowCount()

getEstimatedRangePageCount

public int getEstimatedRangePageCount()
Description copied from interface: RowSetIterator
Returns getEstimatedRowCount()/rangePageSize, if rangeSize > 0. For rangeSize <= 0, returns 1.

This number may fluxuate when the View Object is syncronized with its Entity Object.

Specified by:
getEstimatedRangePageCount in interface RowSetIterator
Returns:
the number of range-pages that this RowSet collection has.

getEstimatedRowCount

public long getEstimatedRowCount()
Returns an estimated number of rows in this row set.

See ViewObjectImpl.getEstimatedRowCount for details.

Specified by:
getEstimatedRowCount in interface RowSet
Returns:
an estimated number of rows in the row set.
See Also:
ViewObjectImpl.getEstimatedRowCount()

getDeferredEstimatedRowCount

public long getDeferredEstimatedRowCount()
Description copied from interface: RowSet
If this ViewObject is marked to not perform the estimatedRowCount query, then return -1 until either the estimatedRowCount is called and the count is known or the RowSet is fetched completely in which case the actual row count is known.
Specified by:
getDeferredEstimatedRowCount in interface RowSet
Returns:
-1 until either EstimatedRowCount or real RowCount is known.

getDetailEstimatedRowCount

public long getDetailEstimatedRowCount(Row[] masterRows)
Specified by:
getDetailEstimatedRowCount in interface WSRowSetMarshaller

getCappedRowCount

public long getCappedRowCount(long cap)
Specified by:
getCappedRowCount in interface RowSet

getMasterRowSetIterators

public RowSetIterator[] getMasterRowSetIterators()
Returns an array of all master row set iterators for this row set.
Specified by:
getMasterRowSetIterators in interface RowSet
Returns:
an array of all master row set iterators for this row set.

getApplicationModule

public ApplicationModule getApplicationModule()
Returns the application module to which this row set's View Object belongs.
Specified by:
getApplicationModule in interface RowSet
Returns:
the ApplicationModule this View Object belongs to.

getViewObject

public ViewObject getViewObject()
Returns this row set's View Object.
Specified by:
getViewObject in interface RowSet
Returns:
the ViewObject this row set belongs to.

getRowSet

public RowSet getRowSet()
Implements RowSetIterator.getRowSet.
Specified by:
getRowSet in interface RowSetIterator
Returns:
the row set interface of this object.

getRowSetIterator

public RowSetIterator getRowSetIterator()
Returns the row set iterator interface of this object.
Returns:
the row set interface of this object.

getRowFilterValues

public java.lang.Object[] getRowFilterValues()
Specified by:
getRowFilterValues in interface WSRowSetIteratorMarshaller

setRowFilterValues

public void setRowFilterValues(java.lang.Object[] rowFilterValues)
Specified by:
setRowFilterValues in interface WSRowSetIteratorMarshaller

getCliIteratorState

public SvcMsgIteratorState getCliIteratorState()
Specified by:
getCliIteratorState in interface WSRowSetIteratorMarshaller

prepareForBatchMode

public void prepareForBatchMode(SvcMsgIteratorState iteratorState,
                                boolean setCurrentRow)
Specified by:
prepareForBatchMode in interface WSRowSetIteratorMarshaller

setRangeSize

public int setRangeSize(int size)
Sets the range size for the iterator.

See ViewObjectImpl.setRangeSize for details.

Specified by:
setRangeSize in interface RowIterator
Parameters:
size - the new range size.
Returns:
the new range size.
See Also:
ViewObjectImpl.setRangeSize(int)

getRangeSize

public int getRangeSize()
Returns the range size of the iterator.

See ViewObjectImpl.getRangeSize for details.

Specified by:
getRangeSize in interface RowIterator
Returns:
the range size.
See Also:
ViewObjectImpl.getRangeSize()

getRangeStart

public int getRangeStart()
Returns the absolute row index of the first row in the range.

See ViewObjectImpl.getRangeStart for details.

Specified by:
getRangeStart in interface RowIterator
Returns:
the absolute row index of the first row in the range.
See Also:
ViewObjectImpl.getRangeStart()

setRangeStart

public int setRangeStart(int start)
Sets the range position by the absolute row index specified in start.

See ViewObjectImpl.setRangeStart for details.

Specified by:
setRangeStart in interface RowIterator
Parameters:
start - 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.
Returns:
the absolute row index of the first row of the range.
See Also:
ViewObjectImpl.setRangeStart(int)

scrollRange

public int scrollRange(int amount)
Scrolls the range by amount.

See ViewObjectImpl.scrollRange for details.

Specified by:
scrollRange in interface RowIterator
Parameters:
amount - the number of rows to scroll.
Returns:
the actual number of rows scrolled. A negative number indicates that the scroll was scrolled upward.
See Also:
ViewObjectImpl.scrollRange(int)

scrollToRangePage

public int scrollToRangePage(int amount)
Description copied from interface: RowSetIterator
Moves the row set range start to the given page index where every page consists of RangeSize number of rows. PageIndex should start at page number 1. This method calculates the rowIndex that should start at that page and then scrolls the iterator to start at that row by using the following calculation:

(rangeSize * (pageSize-1)) - getRangeStart();

Specified by:
scrollToRangePage in interface RowSetIterator
Parameters:
amount - the page number to go to in the result set.
Returns:
the number of rows actually scrolled.

scrollRangeTo

public int scrollRangeTo(Row row,
                         int index)
Scrolls the range to a specific row.

See ViewObjectImpl.scrollRangeTo for details.

Specified by:
scrollRangeTo in interface RowIterator
Parameters:
row - the row to scroll the range to.
index - the range index to position the row at.
Returns:
the actual number of rows scrolled. A negative number indicates that the scroll was scrolled upward.
See Also:
ViewObjectImpl.scrollRangeTo(Row, int)

getAllRowsInRange

public Row[] getAllRowsInRange()
Returns an array of all rows in the iterator's range.

See ViewObjectImpl.getAllRowsInRange for details.

Specified by:
getAllRowsInRange in interface RowIterator
Returns:
an array of view rows.
See Also:
ViewObjectImpl.getAllRowsInRange()

getNextRangeSet

public Row[] getNextRangeSet()
Description copied from interface: RowSetIterator
Gets the next set of rows in the range. This method is good for processing rows in a range-ful fashion. Suppose the Row Set has 20 rows and the Iterator range size is 10. Suppose further that the Iterator is showing rows 0 through 9 (0-based indexing). Calling getNextRangeSet() 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 ScrollEvent to be sent to RowSetListener.rangeScrolled(oracle.jbo.ScrollEvent). To pick up such an event, the listener object must implement the RowSetListener interface. Further, this listener must be registered through a call to NavigatableRowIterator.addListener(Object) (the listener object passed in as the parameter to 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 NavigationEvent and sends it to RowSetListener.navigated(oracle.jbo.NavigationEvent).

Specified by:
getNextRangeSet in interface RowSetIterator
Returns:
an array of Rows in the next range set. An array of length 0 if there are no more rows.

getPreviousRangeSet

public Row[] getPreviousRangeSet()
Description copied from interface: RowSetIterator
Gets the previous set of rows in the range. This method is good for processing rows in a range-ful fashion. Suppose the Row Set has 20 rows and the Iterator range size is 10. Suppose further that the Iterator is showing rows 10 through 19 (0-based indexing). Calling getPreviousRangeSet() 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 ScrollEvent to be sent to RowSetListener.rangeScrolled(oracle.jbo.ScrollEvent). To pick up such an event, the listener object must implement the RowSetListener interface. Further, this listener must be registered through a call to NavigatableRowIterator.addListener(Object) (the listener object passed in as the parameter to 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 NavigationEvent and sends it to RowSetListener.navigated(oracle.jbo.NavigationEvent).

Specified by:
getPreviousRangeSet in interface RowSetIterator
Returns:
an array of Rows in the previous range set. An array of length 0 if there are no more rows.

enumerateRowsInRange

public java.util.Enumeration enumerateRowsInRange()
Creates and returns an enumerator of the rows in the range.
Specified by:
enumerateRowsInRange in interface RowIterator
Returns:
an enumerator.

getFetchedRowCount

public int getFetchedRowCount()
Returns the number of rows fetched from the JDBC RestultSet.
Specified by:
getFetchedRowCount in interface RowIterator
Returns:
the number of rows fetched so far.

isRangeAtBottom

public boolean isRangeAtBottom()
Indicates whether the iterator range contains the last row of the row set.

See ViewObjectImpl.isRangeAtBottom for details.

Specified by:
isRangeAtBottom in interface RowIterator
Returns:
true if the range contains the last row, false if not.
See Also:
ViewObjectImpl.isRangeAtBottom()

isRangeAtTop

public boolean isRangeAtTop()
Indicates whether the iterator range contains the first row of the row set.

See ViewObjectImpl.isRangeAtTop for details.

Specified by:
isRangeAtTop in interface RowIterator
Returns:
true if the range contains the first row, false if not.
See Also:
ViewObjectImpl.isRangeAtTop()

insertRow

public void insertRow(Row row)
Inserts the row into the row set.

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.

Specified by:
insertRow in interface RowIterator
Parameters:
row - the view row to insert.
See Also:
ViewObjectImpl.insertRow(Row)

insertRowAtRangeIndex

public void insertRowAtRangeIndex(int index,
                                  Row row)
Inserts the row into the row set at the specified range index. Using this method does not change currency.

See ViewObjectImpl.insertRowAtRangeIndex for details.

Specified by:
insertRowAtRangeIndex in interface RowIterator
Parameters:
index - the range index into which the row is to be inserted.
row - the view row to insert.
See Also:
ViewObjectImpl.insertRowAtRangeIndex(int, Row)

getRowFromHandle

public Row getRowFromHandle(java.lang.Object rowHandle)
Internal: Applications should not use this method.

Returns the row with a handle specified by hdl.

See ViewObjectImpl#getRowFromHandle(Object) for details.

Parameters:
rowHandle - the row handle.
Returns:
the row identified by the row handle.
See Also:
ViewObjectImpl.getRowFromHandle(Object)

removeRowHandle

public void removeRowHandle(java.lang.Object rowHandle)
Deprecated. Since Jdeveloper 9.0.3. No replacement. No longer used.
Internal: Applications should not use this method.

Removes the row handle from the row handle hash table.

See ViewObjectImpl.removeRowHandle for details.

Parameters:
rowHandle - the row handle to remove.
See Also:
ViewObjectImpl.removeRowHandle(Object)

getRow

public Row getRow(Key key)
Returns the first row whose key matches key.

See ViewObjectImpl.getRow for details.

Specified by:
getRow in interface RowIterator
Parameters:
key - key to match.
Returns:
the first matching row. null if no match.
See Also:
ViewObjectImpl.getRow(Key)

getRangeIndexOf

public int getRangeIndexOf(Row row)
Returns the range index of the row specified by row.

See ViewObjectImpl.getRangeIndexOf for details.

Specified by:
getRangeIndexOf in interface RowIterator
Parameters:
row - the row in question.
Returns:
the range index of the row. -1 if the row is not within the range.
See Also:
ViewObjectImpl.getRangeIndexOf(Row)

removeCurrentRow

public void removeCurrentRow()
Removes the current row.

See ViewObjectImpl.removeCurrentRow for details.

Specified by:
removeCurrentRow in interface RowIterator
See Also:
ViewObjectImpl.removeCurrentRow()

removeCurrentRowFromCollection

public void removeCurrentRowFromCollection()
Description copied from interface: RowIterator
Removes the current Row object from the collection.

It 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 RowIterator.removeCurrentRowAndRetain(), change currency to the desired location, and then call RowIterator.insertRow(oracle.jbo.Row) with that row.

Specified by:
removeCurrentRowFromCollection in interface RowIterator

removeCurrentRowAndRetain

public Row removeCurrentRowAndRetain()
Description copied from interface: RowIterator
Removes the current Row object from the collection and retain it for insertion into another location.

It 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 RowIterator.removeCurrentRowFromCollection() in that after the current row is removed from the collection, it can be inserted back into the collection at another location.

To do so, call RowIterator.removeCurrentRowAndRetain(), and get the returning row. Then, change currency to the desired location, and call RowIterator.insertRow(oracle.jbo.Row) with that row.

Specified by:
removeCurrentRowAndRetain in interface RowIterator
Returns:
the current row which was just removed from collection.

setRowValidation

public void setRowValidation(boolean flag)
Description copied from interface: RowIterator
Sets the validation flag on this iterator. By default a RowIterator validates the current row when navigating to another row. This method can be used to turn this row-validation off by passing 'false' as parameter.
Specified by:
setRowValidation in interface RowIterator
Parameters:
flag - Whether to turn row validation off or not.

isRowValidation

public boolean isRowValidation()
Description copied from interface: RowIterator
Gets the validation flag on this iterator. By default a RowIterator validates the current row when navigating to another row. This method returns TRUE if this row-validation is turned off.
Specified by:
isRowValidation in interface RowIterator

setCurrentRow

public boolean setCurrentRow(Row row)
Moves the iterator to the row specified by row.

See ViewObjectImpl.setCurrentRow for details.

Specified by:
setCurrentRow in interface RowIterator
Parameters:
row - the new current row.
Returns:
indicates whether the current row was successfully set or not.
See Also:
ViewObjectImpl.setCurrentRow(Row)

setCurrentRowAtRangeIndex

public boolean setCurrentRowAtRangeIndex(int index)
Moves the iterator to the row whose range index is index.

See ViewObjectImpl.setCurrentRowAtRangeIndex for details.

Specified by:
setCurrentRowAtRangeIndex in interface RowIterator
Parameters:
index - range index to which to move the current row.
Returns:
indicates whether the current row was successfully set or not.
See Also:
ViewObjectImpl.setCurrentRowAtRangeIndex(int)

getCurrentRow

public Row getCurrentRow()
Returns the current row of the iterator.

See ViewObjectImpl.getCurrentRow for details.

Specified by:
getCurrentRow in interface RowIterator
Returns:
the current row. null if no current row.
See Also:
ViewObjectImpl.getCurrentRow()

getCurrentRowIndex

public int getCurrentRowIndex()
Returns the absolute row index of the current row in the row set.

See ViewObjectImpl.getCurrentRowIndex for details.

Specified by:
getCurrentRowIndex in interface RowIterator
Returns:
the absolute row index of the current row. -1 if the row set has not be executed, or the iterator has just been reset.
See Also:
ViewObjectImpl.getCurrentRowIndex()

getCurrentRowSlot

public int getCurrentRowSlot()
Returns the current row slot status.

See ViewObjectImpl.getCurrentRowSlot for details.

Specified by:
getCurrentRowSlot in interface RowIterator
Returns:
one of the slot status constants listed above.
See Also:
ViewObjectImpl.getCurrentRowSlot()

getIterMode

public int getIterMode()
Description copied from interface: RowIterator
Gets the current iteration mode. See Iteration Modes above for details on iteration mode which controls how the range behaves when it reaches the end of the Row Set.
Specified by:
getIterMode in interface RowIterator
Returns:
ITER_MODE_LAST_PAGE_PARTIAL if the iteration mode is "partial-last-page", ITER_MODE_LAST_PAGE_FULL if it is "full-last-page".

setIterMode

public void setIterMode(int mode)
Description copied from interface: RowIterator
Sets the iteration mode for this Row Iterator. See Iteration Modes above for details on iteration mode which controls how the range behaves when it reaches the end of the Row Set.
Specified by:
setIterMode in interface RowIterator
Parameters:
mode - 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".

hasNext

public boolean hasNext()
Indicates whether the iterator has a next row or not.

See ViewObjectImpl.hasNext for details.

Specified by:
hasNext in interface RowIterator
Returns:
true if there is a next row, false if not.
See Also:
ViewObjectImpl.hasNext()

hasPrevious

public boolean hasPrevious()
Indicates whether the iterator has a previous row or not.

See ViewObjectImpl.hasPrevious for details.

Specified by:
hasPrevious in interface RowIterator
Returns:
true if there is a previous row, false if not.
See Also:
ViewObjectImpl.hasPrevious()

first

public Row first()
Navigates to the first row in the row set.

See ViewObjectImpl.first for details.

Specified by:
first in interface RowIterator
Returns:
the first row, which becomes the current row for the iterator. null if the row set has no rows.
See Also:
ViewObjectImpl.first()

last

public Row last()
Navigates to the last row in the row set.

See ViewObjectImpl.last for details.

Specified by:
last in interface RowIterator
Returns:
the last row, which becomes the current row for the iterator. null if the row set has no rows.
See Also:
ViewObjectImpl.last()

next

public Row next()
Navigates to the next row in the row set.

See ViewObjectImpl.next for details.

Specified by:
next in interface RowIterator
Returns:
the next row, which becomes the current row for the iterator. null if no next row. If no next row, the current row is not moved.
See Also:
ViewObjectImpl.next()

previous

public Row previous()
Navigates to the previous row in the row set.

See ViewObjectImpl.previous for details.

Specified by:
previous in interface RowIterator
Returns:
the previous row, which becomes the current row for the iterator. null if no previous row. If no previous row, the current row is not moved.
See Also:
ViewObjectImpl.previous()

reset

public void reset()
Resets the iterator.

See ViewObjectImpl.reset for details.

Specified by:
reset in interface RowIterator
See Also:
ViewObjectImpl.reset()

getDetailRowSets

public RowSet[] getDetailRowSets()
Returns an array of all detail row sets for this row set iterator. See ViewObjectImpl.getDetailRowSets for details.
Specified by:
getDetailRowSets in interface RowSetIterator
Returns:
an array of all detail row sets for this row set iterator.
See Also:
ViewObjectImpl.getDetailRowSets()

createDetailRowSet

public RowSet createDetailRowSet(java.lang.String rsName,
                                 java.lang.String linkDefName)
Creates and returns an new detail row set for this row set iterator.

See ViewObjectImpl.createDetailRowSet for details.

Specified by:
createDetailRowSet in interface RowSetIterator
Parameters:
rsName - 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.
Returns:
the new detail row set.
See Also:
ViewObjectImpl.createDetailRowSet(String, String)

setForwardOnly

public void setForwardOnly(boolean isForwardOnly)
Sets whether this row set will be forward-only or not.

See ViewObjectImpl.setForwardOnly for details.

Specified by:
setForwardOnly in interface RowSet
Parameters:
isForwardOnly - indicates whether the row set should be forward-only or not.
See Also:
ViewObjectImpl.setForwardOnly(boolean)

isForwardOnly

public final boolean isForwardOnly()
Indicates whether this row set is forward-only or not.

See ViewObjectImpl.isForwardOnly for details.

Specified by:
isForwardOnly in interface RowSet
Returns:
indicates whether this row set is forward-only or not.
See Also:
ViewObjectImpl.isForwardOnly()

isRangePaging

public final boolean isRangePaging()

isScrollable

public final boolean isScrollable()

getAccessMode

public final byte getAccessMode()
Specified by:
getAccessMode in interface RowSet
Returns:
Returns the current access mode for this row set.
See Also:
RowSet.setAccessMode(byte)

setAccessMode

public void setAccessMode(byte flag)
Description copied from interface: RowSet
Constrains the row access based on the following settings:

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.

Specified by:
setAccessMode in interface RowSet
Parameters:
flag - One of the four enumerated values RowSet.SCROLLABLE, RowSet.FORWARD_ONLY, RowSet.RANGE_PAGING, RowSet.RANGE_PAGING_AUTO_POST.

getRangePagingCacheFactor

public int getRangePagingCacheFactor()
Specified by:
getRangePagingCacheFactor in interface RowSet

setRangePagingCacheFactor

public void setRangePagingCacheFactor(int f)
Specified by:
setRangePagingCacheFactor in interface RowSet

getViewLinkMode

public byte getViewLinkMode()
Internal: Applications should not use this method.

setViewLinkMode

public void setViewLinkMode(byte val)
Internal: Applications should not use this method.

setAssociationConsistent

public void setAssociationConsistent(boolean isConsistent)
Sets the association-consistent flag for this row set.

See ViewObjectImpl.setAssociationConsistent for details.

Specified by:
setAssociationConsistent in interface RowSet
Parameters:
isConsistent - indicates whether association-consistency should be on or not.
See Also:
ViewObjectImpl.setAssociationConsistent(boolean)

isMaxFetchSizeExceeded

public final boolean isMaxFetchSizeExceeded()
Description copied from interface: RowSet
Tests if the query result has been fetched to the end and the end was reached due to hitting the maxFetchSize limit
Specified by:
isMaxFetchSizeExceeded in interface RowSet
Returns:
true if the result set has been fetched to the maxFetchSize limit and there are still more rows in the database.

isFetchComplete

public boolean isFetchComplete()
Description copied from interface: RowSet
Tests if the query result set has been fetched to the end.
Specified by:
isFetchComplete in interface RowSet
Returns:
true if the result set has been fetched to the end.

isAllRowsFetched

public boolean isAllRowsFetched()

isAssociationConsistent

public boolean isAssociationConsistent()
Returns the association-consistent flag for this row set.

See ViewObjectImpl.isAssociationConsistent for details.

Specified by:
isAssociationConsistent in interface RowSet
Returns:
the association-consistent flag for this row set.
See Also:
ViewObjectImpl.isAssociationConsistent()

getRowCountInRange

public int getRowCountInRange()
Returns the actual number of rows in the range.

See ViewObjectImpl.getRowCountInRange for details.

Specified by:
getRowCountInRange in interface RowIterator
Returns:
the actual number of rows in the range.
See Also:
ViewObjectImpl.getRowCountInRange()

reduceUserParamsToSize

protected void reduceUserParamsToSize(int newSize)

setWhereClauseParams

public void setWhereClauseParams(java.lang.Object[] values)
Sets bind values for the query.

See ViewObjectImpl.setWhereClauseParams for details.

Specified by:
setWhereClauseParams in interface RowSet
Parameters:
values - an array of bind values.
See Also:
ViewObjectImpl.setWhereClauseParams(Object[])

setExecuteParameters

public void setExecuteParameters(java.lang.Object[] userValues,
                                 java.lang.Object[] paramValues,
                                 boolean diffParams)

setWhereClauseParam

public void setWhereClauseParam(int index,
                                java.lang.Object value)
Sets the bind value at a specified index.

See ViewObjectImpl.setWhereClauseParam for details.

Specified by:
setWhereClauseParam in interface RowSet
Parameters:
index - index of the bind value.
value - the bind value.
See Also:
ViewObjectImpl.setWhereClauseParam(int, Object)

setNamedWhereClauseParams

public void setNamedWhereClauseParams(AttributeList attrlist)
Sets the name, bind value pair passed as AttributeList attrlist.

See ViewObjectImpl.setNamedWhereClauseParams for details.

Specified by:
setNamedWhereClauseParams in interface RowSet
Parameters:
attrlist - having the name, bind value pairs.

getNamedWhereClauseParams

public AttributeList getNamedWhereClauseParams()
Gets the name, value pair of all named bind variables.

See ViewObjectImpl.getNamedWhereClauseParams for details.

Specified by:
getNamedWhereClauseParams in interface RowSet
Returns:
an AttributeList of Name, value pair of all named bind variables.

refreshWhereClauseParams

public void refreshWhereClauseParams()
Specified by:
refreshWhereClauseParams in interface WSRowSetMarshaller

defineNamedWhereClauseParam

public void defineNamedWhereClauseParam(java.lang.String name,
                                        java.lang.Object defaultValue,
                                        int[] indices)
Description copied from interface: RowSet
Defines a named bind variable to use with the view object's where-clause.

This named where-clause parameter will be defined as a variable on the view object. That is, if a named where-clause parameter is defined through one row set, all other row sets that belongs to the same parent view object will "see" that parameter.

Through the defaultValue, one can specify the default value for this where-clause parameter. If no default value is supplied, null will be used as the parameter value.

The indices parameter specifies where-clause parameter indices into which this named parameter will be bound. The same value can be bound into multiple indices. For example, if { 1, 2 } is specified for indices, the value will be bound for where-clause parameter indices of 1 and 2. I.e., this parameter will produce setWhereClauseParam(1, value) and setWhereClauseParam(2, value).

This method can be invoked to redefine an existing named where-clause paramter (to change the default value and the indices) only if the named parameter is found on the view object. If the named parameter/variable is found on one of the parent objects, a new where-clause parameter definition is still added to the view object.

When redefining, a check is made to ensure that the existing variable has no kind specification (null) or is of the "where" kind (which means that the existing variable is a where-clause parameter). If not, an InvalidParamException is thrown.

Defining a named where-clause parameter does not automatically execute the query. You must call RowSet.executeQuery() to apply the new bind value.

Specified by:
defineNamedWhereClauseParam in interface RowSet
Parameters:
name - the name of the where-clause parameter.
defaultValue - specifies the default value for this where-clause parameter. This default value can be overridden through a call to setNamedWhereClauseParam().
indices - where-clause indices into which this parameter value should be bound. See above.

removeNamedWhereClauseParam

public void removeNamedWhereClauseParam(java.lang.String name)
Description copied from interface: RowSet
Removes a named where-clause parameter.

This method removes previously defined named where-clause parameter. A check is made to ensure that the variable being removed is a where-clause parameter (variable kind = "where"). If not, an InvalidParamException is thrown.

If the named where-clause parameter is found but it does not belong to the view object that owns this row set, an InvalidOperException is thrown. This means one is disallowed from removing a named where-clause parameter that belongs to the View definition, for example.

Removing a named where-clause parameter does not automatically execute the query. You must call RowSet.executeQuery() for the removal to take effect.

Specified by:
removeNamedWhereClauseParam in interface RowSet
Parameters:
name - the name of the where-clause parameter to remove.

getNamedWhereClauseParam

public java.lang.Object getNamedWhereClauseParam(java.lang.String name)
Description copied from interface: RowSet
Gets the value of a named where-clause parameter for this row set.

If the view object owns multiple row sets, each row set may have its own (different) named where-clause parameter value.

Specified by:
getNamedWhereClauseParam in interface RowSet
Parameters:
name - the name of the where-clause parameter.

setNamedWhereClauseParam

public void setNamedWhereClauseParam(java.lang.String name,
                                     java.lang.Object value)
Description copied from interface: RowSet
Sets the value of a named where-clause parameter for this row set.

If the view object owns multiple row sets, each row set may have its own (different) named where-clause parameter value.

Setting a named where-clause parameter does not automatically execute the query. You must call RowSet.executeQuery() to apply the new bind value.

Specified by:
setNamedWhereClauseParam in interface RowSet
Parameters:
name - the name of the where-clause parameter.
value - the where-clause parameter value for this row set.

skipNamedWhereClauseParam

public void skipNamedWhereClauseParam(java.lang.String name)
Description copied from interface: RowSet
Skips the named where-clause parameter for this row set. This method does not remove the named where-clause parameter. However, it "masks out" the named where-clause parameter, so that the parameter is skipped when the query is executed.

Skipping a named where-clause parameter does not automatically execute the query. You must call RowSet.executeQuery() for the skip to take effect.

Specified by:
skipNamedWhereClauseParam in interface RowSet
Parameters:
name - the name of the where-clause parameter.

getWhereClauseParams

public java.lang.Object[] getWhereClauseParams()
Returns an array of bind values currently specified for the query. See ViewObjectImpl.getWhereClauseParams for details.
Specified by:
getWhereClauseParams in interface RowSet
Returns:
an array of bind values.
See Also:
ViewObjectImpl.getWhereClauseParams()

getVariableValue

public java.lang.Object getVariableValue(java.lang.String varName)

getParametersAsStorageTypes

public java.lang.Object[] getParametersAsStorageTypes()
Returns an array of bind values to be used for binding to the query.

See ViewObjectImpl.getParametersAsStorageTypes for details.

Returns:
an array of the bind values as torage types. null if there is no bind value to return.
See Also:
ViewObjectImpl.getParametersAsStorageTypes()

getParametersAsStorageTypes

public java.lang.Object[] getParametersAsStorageTypes(Row[] masterRows)

getRow

public Row getRow(int index)
Returns the row at absolute row index of index.

An absolute row index is a row index in the entire row set. It starts at 0.

Parameters:
index - the absolute row index.
Returns:
the row. null if the index is invalid.

getRowAtRangeIndex

public Row getRowAtRangeIndex(int index)
Returns the row at range index index.

Range index is a 0 based index within the range.

Specified by:
getRowAtRangeIndex in interface RowIterator
Parameters:
index - range index of the row.
Returns:
the row at the specified range index. null if the index is outside the range, or if there is no row at the specified index.

dumpViewRowCache

public static void dumpViewRowCache(RowSetIterator rsi,
                                    java.io.Writer out)
Internal: Applications should not use this method.

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.

Parameters:
rsi - the row set iterator whose view row cache is to be dumped.
out - where to dump the output.

getRows

protected Row[] getRows(EntityImpl entity)
Returns an array of view rows that use the specified entity row.

A view row consists of entity rows. This method returns all view rows (so far retrieved) that use the entity row specified by entity

Returns:
an arry of rows that use entity. null if no view row uses entity.

findInCacheByKey

public Row[] findInCacheByKey(Key key,
                              int maxNumOfRows)

findInCacheByAltKey

public RowIterator findInCacheByAltKey(java.lang.String keyName,
                                       Key key,
                                       int maxNumOfRows)

findByKey

public Row[] findByKey(Key key,
                       int maxNumOfRows)
Finds and returns View rows that match the specified key.

See RowIterator.findByKey(oracle.jbo.Key, int) for details.

Specified by:
findByKey in interface RowIterator
Parameters:
key - the key to match.
maxNumOfRows - the maximum size of the array to return, or -1 to return all rows.
Returns:
an array of rows matching the key.

findByKey

public Row[] findByKey(Key key,
                       int maxNumOfRows,
                       boolean skipWhere)

findByAltKey

public RowIterator findByAltKey(java.lang.String keyName,
                                Key key,
                                int maxNumOfRows,
                                boolean skipWhere)
Description copied from interface: RowIterator
Same as RowIterator.findByKey(Key, int) with a few extra functionalities. The key is for an alternate key. You can specifcy the alternate key name through the keyName parameter.

A skipWhere parameter controls whether or notthe current view object's where-clause is included in the db query if a db query is issued to get the row(s).

It returns a RowIterator and not a row array. You can enumerate through rows of this row iterator.

Specified by:
findByAltKey in interface RowIterator
Parameters:
keyName - the name of the alternate key. If null the primary key is specified, i.e., this function call becomes equivalent to findByKey with skipWhere = false.
key - the alternate key to match.
maxNumOfRows - the maximum size of the array to return, or -1 to return all rows.
skipWhere - A flag that controls whether, when a db query is issued to get the matching row(s), the view object's current where-clause is to be included in the query or not.
Returns:
an array of rows matching the alternate key.

findAndSetCurrentRowByKey

public void findAndSetCurrentRowByKey(Key key,
                                      int rangeIndex)
Specified by:
findAndSetCurrentRowByKey in interface WSRowSetIteratorMarshaller

needsRefresh

public boolean needsRefresh()
Specified by:
needsRefresh in interface WSRowSetIteratorMarshaller

findByViewCriteria

public RowIterator findByViewCriteria(ViewCriteria criteria,
                                      int maxNumOfRows,
                                      int queryMode)
Description copied from interface: RowIterator
Finds and returns View rows that match the specified View Criteria. See ViewCriteria for details on how to build and use a View Criteria.

The queryMode parameter controls the manner in which the qualifying View rows are searched. See the QUERY_MODE_... constants in ViewObject for different contants that can be specified (they can be OR'ed together).

If QUERY_MODE_SCAN_VIEW_ROWS is specified, the existing View rows in the current Row Set are scanned for matching rows.

If QUERY_MODE_SCAN_ENTITY_ROWS is specified, the Entity cache is searched for qualifying rows. If qualifying rows are found, they are added to the current Row Set. I.e., they become part of the current row collection. Internally, a finder View Object is created to search the Entity cache and to produce View rows from the Entity cache.

If QUERY_MODE_SCAN_DATABASE_TABLES is specified, a database query is issued to find matching rows. The View Criteria is converted into a where-clause. ViewObject.applyViewCriteria(ViewCriteria) on the finder View Object is invoked and the query executed.

Upon completion of this operation, the finder View Object is closed and removed.

Specified by:
findByViewCriteria in interface RowIterator
Parameters:
criteria - the View Criteria to be used to qualify View rows.
maxNumOfRows - the maximum size of the array to return, or -1 to return all rows. If a value other than -1 is specified and if the specified number of rows is reached, the method returns without performing any further operation.
queryMode - the mode in which qualify View rows are scanned. See above for further info.
Returns:
a RowSet (parented by the same View Object as this RowIterator) that contains qualifying rows. For convenience, this RowSet's range size is initialized to -1 (all rows).

findByViewCriteriaWithBindVars

public RowIterator findByViewCriteriaWithBindVars(ViewCriteria criteria,
                                                  int maxNumOfRows,
                                                  int queryMode,
                                                  Variable[] bindVars,
                                                  java.lang.Object[] bindValues)

createKey

public Key createKey(AttributeList nvp)
Description copied from interface: RowIterator
Given a list of name-value pairs, creates a Key object that matches the key structure for the ViewObject for this RowItertor. This Key object could be used as a valid argument to findByKey. This Key will have null values for attributes expected in the key structure for this ViewObject, but not found in the given set of name-value pairs.
Specified by:
createKey in interface RowIterator

findByEntity

public Row[] findByEntity(int eRowHandle,
                          int maxNumOfRows)
Description copied from interface: RowIterator
Finds and returns View rows that use the Entity row, identified by the Entity row handle, eRowHandle.
Specified by:
findByEntity in interface RowIterator
Parameters:
eRowHandle - the Entity row handle.
maxNumOfRows - the maximum size of the row array to return, or -1 to return all rows.
Returns:
an array of View rows that use the Entity row.

getParameters

public java.lang.Object[] getParameters(boolean nullValueFlag)
Returns an array of bind values to be used for binding to the query.

This array is a union of the following set of bind values:

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.

Returns:
an array of the bind values. null if there is no bind value to return.

getParameters

public java.lang.Object[] getParameters(boolean nullValueFlag,
                                        Row[] masterRows)

printActiveObjsTab

public void printActiveObjsTab(java.io.PrintWriter pw)

printRUChain

public void printRUChain(java.io.PrintWriter pw)

printColl

public void printColl(java.io.PrintWriter pw,
                      int printFlag)

getCollMgmtInfo

public int[] getCollMgmtInfo()

getFilteredRows

public Row[] getFilteredRows(RowQualifier qualifier)

getFilteredRowsInRange

public Row[] getFilteredRowsInRange(RowQualifier qualifier)

getFilteredRows

public Row[] getFilteredRows(java.lang.String attrName,
                             java.lang.Object attrValue)
Description copied from interface: RowSetIterator
Returns all rows in this collection whose attribute value matches the value being passed in attrValue.

Note that this method does not affect the current RowSetIterator.

Specified by:
getFilteredRows in interface RowSetIterator
Parameters:
attrName - name of the attribute to be used for filtering.
attrValue - attribute value for filtering.
Returns:
an array of rows that match.

getFilteredRowsInRange

public Row[] getFilteredRowsInRange(java.lang.String attrName,
                                    java.lang.Object attrValue)
Description copied from interface: RowSetIterator
Returns all rows in this range whose attribute value matches the value being passed in attrValue.

This method uses getAllRowsInRange() to retrieve all rows and then match the rows.

Specified by:
getFilteredRowsInRange in interface RowSetIterator
Parameters:
attrName - name of the attribute to be used for filtering.
attrValue - attribute value for filtering.
Returns:
an array of rows in the current range that match.

setPassivationEnabled

public void setPassivationEnabled(boolean flag)

isPassivationEnabled

public boolean isPassivationEnabled()

setPassivationEnabledInternal

public void setPassivationEnabledInternal(boolean flag)

setReceiveAllInsertEvents

public void setReceiveAllInsertEvents(boolean b)
Internal: Applications should not use this method.

getVariableManager

public VariableValueManager getVariableManager()
Description copied from interface: VariableManagerOwnerBase
Returns this object's current Variable Value Manager. It will return null if Variable Value Manager has been initialized.

When a framework object is first created, its Variable Value Manager may be null. This method does not initialize (create) the Variable Value Manager.

VariableManagerOwnerBase.ensureVariableManager() in contrast, ensures that the Variable Value Manager is initialized (created).

Specified by:
getVariableManager in interface VariableManagerOwnerBase
Returns:
this object's current Variable Value Manager. May return null if one was not yet initialized.

hasVariables

public boolean hasVariables()
Description copied from interface: VariableManagerOwnerBase
Returns a flag indicating whether this object has Variables or not.
Specified by:
hasVariables in interface VariableManagerOwnerBase
Returns:
the flag indicating whether this object has Variables.

ensureVariableManager

public VariableValueManager ensureVariableManager()
Description copied from interface: VariableManagerOwnerBase
Returns this object's Variable Value Manager. If this object current has no Variable Value Manager, it will initialize (create) one.
Specified by:
ensureVariableManager in interface VariableManagerOwnerBase
Returns:
this object's Variable Value Manager. Will create a Variable Value Manager if this object had no Variable Value Manager.

getMessageBundleClass

public java.lang.Class getMessageBundleClass()
Description copied from class: RowSetHelper
Internal: Applications should not use this method.

Returns the class of the reference object.

Specified by:
getMessageBundleClass in interface VariableManagerOwnerBase
Specified by:
getMessageBundleClass in class RowSetHelper
Returns:
the class of the reference object.

getResourceBundleDef

public ResourceBundleDef getResourceBundleDef()
Specified by:
getResourceBundleDef in interface VariableManagerOwnerBase

cancelQuery

public boolean cancelQuery()
Description copied from interface: RowSet
Cancels a running query.
Specified by:
cancelQuery in interface RowSet
Returns:
a flag indicating whether the request to cancel was honored or not. It will return false if the JDBC statement is not executing a query.

deepCopy

public RowSet deepCopy(java.util.HashMap voAttrMap,
                       long options)
Description copied from interface: RowSet
This method performs a copy of view rows and the Entity row references of the view rows that belong to this RowSet. To avoid unique key constraint violations, the values of the key attributes are not copied.

voAttrMap attribute could be used to specify a subset of the attributes that need to be copied. The map consists of name value pairs of the view object name and its attributes.

By including the name of the Accessor in the voAttrMap as a key, deep copy could be used to copy rows obtained by traversing the view links.

Example 1: Deep copy a OrderLine RowSet copying attributes value of Item ID, Order ID and Description of a OrderLine view row.

     voOrderLine     = myAM.findViewObject("OrderLine");
     attrFilter      = new HashMap();
     filterAttrDefs  = new ArrayList();
     filterAttrDefs.add("ItemID");
     filterAttrDefs.add("OrderID");
     filterAttrDefs.add("Description");
     attrFilter.put(voOrderLine.getDefFullName(), 
                   (String[]) filterAttrDefs.toArray(new String[filterAttrDefs.size()]));
     RowSet rsOrderLinesCopy = rsOrderLines.deepCopy(attrFilter, RowSet.COPY_OPT_ALL_ROWS);
 
Row API could be used to set the primary keys on the newly created rows and eventually the transaction commit would insert the rows in the database.

Example 2: Deep copy a set of Orders and their Lines. Copy the Customer attribute from an Order and Item ID, Description from Order Lines.

     voOrder         = myAM.findViewObject("Order");
     voOrderLine     = myAM.findViewObject("OrderLine");
     attrFilter      = new HashMap();
     filterAttrDefs  = new ArrayList();
     filterAttrDefs.add("Customer");
     // The name of the Order Line Accessor
     filterAttrDefs.add("Lines");
     attrFilter.put(voOrder.getDefFullName(), 
                   (String[]) filterAttrDefs.toArray(new String[filterAttrDefs.size()]));
     filterAttrDefs  = new ArrayList();
     filterAttrDefs.add("ItemID");
     filterAttrDefs.add("Description");
     attrFilter.put(voOrderLine.getDefFullName(), 
                   (String[]) filterAttrDefs.toArray(new String[filterAttrDefs.size()]));
     RowSet rsCopy = rs.deepCopy(attrFilter, RowSet.COPY_OPT_ALL_ROWS);
 
For each Order row in the copied rowset the accessor could be used to get its Order Lines. If there is Cascade update set on the association, setting the Order number on an Order row would update the foreign key in its Order Line rows.
Specified by:
deepCopy in interface RowSet
Parameters:
voAttrMap - a name value pair of a View Object name and an array of its AttributeDef objects or an array of attribute names. A null value for this parameter results in copying all the non-key attribute values of this RowSet. View Links are not traversed for a null value.
options - valid values are RowSet.COPY_OPT_ALL_ROWS and RowSet.COPY_OPT_LIMIT_RANGE.
Returns:
a deep copy of the RowSet

getProperty

public java.lang.Object getProperty(java.lang.String hintName)
Description copied from interface: Properties
Retrieves the specified property, if it exists.
Specified by:
getProperty in interface Properties
Parameters:
hintName - Property name.
Returns:
the value of the property, if any, otherwise null.

getProperties

public java.util.Hashtable getProperties()
Description copied from interface: Properties
Gets the table of properties.
Specified by:
getProperties in interface Properties
Returns:
a hashtable of properties.

preFetchRowsByKeys

public void preFetchRowsByKeys(AttributeDef[] keyAttrs,
                               Key[] keys)

preFetchRowsByKeys

public void preFetchRowsByKeys(AttributeDef[] keyAttrs,
                               Key[] keys,
                               Row parentRow)

getFullName

public java.lang.String getFullName()

writeXML

public final Node writeXML(long options,
                           java.util.HashMap voAttrRules)
Description copied from interface: XMLInterface
Renders data in a canonical XML-format. The classes ViewObjectImpl 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:

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.

Specified by:
writeXML in interface XMLInterface
Parameters:
options - a set of bit flags that will control the writeXML
voAttrRules - HashMap containing Definition names of ViewObjects and an array of AttributeDef to render for a ViewObject of that definition type.

writeXML

public Node writeXML(int depthCount,
                     long options)
Description copied from interface: XMLInterface
Renders data in a canonical XML-format. The classes ViewObjectImpl 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:

Specified by:
writeXML in interface XMLInterface
Parameters:
depthCount - represents to what level the rendering should recurse.
options - a set of bit flags that will control the writeXML behavior.

writeXML

public Node writeXML(long options,
                     java.util.HashMap map,
                     XSLStylesheet xslt)
Specified by:
writeXML in interface XMLInterface

writeXML

public Node writeXML(int depthCount,
                     long options,
                     XSLStylesheet xslt)
Specified by:
writeXML in interface XMLInterface

readXML

public void readXML(Element elem,
                    int depthCount,
                    XSLStylesheet xslt)
Specified by:
readXML in interface XMLInterface

getElementTagName

public java.lang.String getElementTagName()
Specified by:
getElementTagName in interface XmlSerializable

writeAsXml

public void writeAsXml(XmlOutput out,
                       Node node,
                       Criteria rules)
Specified by:
writeAsXml in interface XmlSerializable

readXML

public void readXML(Element elem,
                    int depthCount)
Specified by:
readXML in interface XMLInterface

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


Copyright © 1997, 2011, Oracle. All rights reserved.