Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.server.ejb.facade
Class FinderViewImpl

`java.lang.Object
oracle.jbo.common.NamedObjectImpl
oracle.jbo.server.NamedObjectImpl
oracle.jbo.server.ComponentObjectImpl
oracle.jbo.server.ViewObjectImpl
oracle.jbo.server.ejb.facade.FinderViewImpl`

All Implemented Interfaces:
  ComponentObject, EntityListener, java.util.EventListener, NavigatableRowIterator, Properties, RowIterator, RowMatchBindValueSupplier, RowSet, RowSetIterator, StructureDef, TransactionListener, TransactionPostListener, VariableManagerOwner, ViewCriteriaManager, ViewObject, ViewObjectDynAttr, WSRowSetIteratorMarshaller, WSRowSetMarshaller, XMLInterface

Direct Known Subclasses:
  CmrAccessorViewImpl

public abstract class FinderViewImpl
extends ViewObjectImpl

Abstract base class for Finder-Based View Object. This class extends ``ViewObjectImpl``. Beyond the base `ViewObjectImpl` functionality, this class is responsible for interacting with the Local Entity Bean Home to execute the designated Local Entity Bean finder and managing the result collection.

When the user builds an EJB Finder View Object for a Local Entity Bean, a subclass of this class is generated.

Field Summary

Fields inherited from class oracle.jbo.server.ViewObjectImpl
`DATA_ROWKEYTAG, FETCH_ALL, FETCH_AS_NEEDED, FETCH_DEFAULT, FULLSQL_MODE_AUGMENTATION, FULLSQL_MODE_NO_AUGMENTATION, mAssocClause, mAssocFromClause, mAssocRefs, mAttrDefs, mAttrDefsForExtendedVOs, mAttrDefsTab, mAutoPostChanges, mChangedAttrIndices, mChgAttrIndUseCount, mDefaultMaxActiveNodes, mDefaultMaxRowsPerNode, MIN_ACTIVE_NODES, MIN_ROWS_PER_NODE, mKeyAttrRefs, mOptimizerHint, mOrderBy, mUsePersColl, mUserDefinedQuery, mViewDef, mViewRowSet, mWhere, NEW_ROW_HANDLE, NEW_ROW_INDEX, NEW_ROW_TRACKER, QC_TAG, TRANSIENT_DATA_ROWTAG, XML_ELEM_PASSIVATE_TRANSIENT`

Fields inherited from class oracle.jbo.common.NamedObjectImpl
`mFullName, mObjName, mParent, mProperties`

Fields inherited from interface oracle.jbo.ViewObject
`QUERY_MODE_SCAN_DATABASE_TABLES, QUERY_MODE_SCAN_ENTITY_ROWS, QUERY_MODE_SCAN_VIEW_ROWS, QUERY_TIMEOUT_WAIT_FOREVER`

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
`FinderViewImpl()` Constructs a Finder-Based View Object.

Method Summary
`protected boolean` | `addViewCriteriaToWhereClause()` Overrides the base implementation of `addViewCriteriaToWhereClause()`.
`void` | `applyViewCriteria(ViewCriteria criteria)` Overrides the base implementation of `applyViewCriteria(oracle.jbo.ViewCriteria)`.
`protected oracle.jbo.server.ejb.facade.VOForEntityBeanUserData` | `createFinderUserData()`
`protected ViewRowImpl` | `createRowFromResultSet(java.lang.Object qc, java.sql.ResultSet resultSet)` Overrides the base implementation of `createRowFromResultSet(Object, java.sql.ResultSet)`.
`protected ViewRowSetImpl` | `createViewLinkAccessorRS(AssociationDefImpl assocDef, ViewObjectImpl accessorVO, Row masterRow, java.lang.Object[] values)`
`protected ViewObjectImpl` | `createViewLinkAccessorVO(AssociationDefImpl assocDef, java.lang.String voName, ViewDefImpl vDef, ViewLinkDefImpl vlDef)`
`protected java.util.Collection` | `executeFinder(java.lang.Object qc, java.lang.Object[] params, int noUserParams)` Calls the Local Entity Bean finder and returns a collection of Entity Beans.
`protected void` | `executeQueryForCollection(java.lang.Object qc, java.lang.Object[] params, int noUserParams)` Overrides the base implementation of `executeQueryForCollection(Object, Object[], int)`.
`protected java.util.Collection` | `findFromEJBBean(java.lang.Object qc, java.lang.Object[] params, int noUserParams)` An abstract method that calls the designated Local Entity Bean finder.
`protected abstract javax.ejb.EJBLocalHome` | `getEJBLocalHome()` An abstract method which returns the Entity Bean Home reference.
`long` | `getQueryHitCount(ViewRowSetImpl viewRowSet)` Overrides the base implementation of `getQueryHitCount(oracle.jbo.server.ViewRowSetImpl)`.
`long` | `getQueryHitCount(ViewRowSetImpl viewRowSet, Row[] masterRows)`
`protected boolean` | `hasNextForCollection(java.lang.Object qc)` Overrides the base implementation of `hasNextForCollection(Object)`.
`protected void` | `processWhereClause(java.lang.Object qc)` Processes the complete where-clause for this Finder-Based View Object.
`protected void` | `releaseUserDataForCollection(java.lang.Object qc, java.lang.Object data)`
`void` | `remove()` Removes this View Object from its containing application module.
`protected Row[]` | `retrieveByKey(ViewRowSetImpl rs, Key key, int maxNumOfRows)` Overrides the base implementation of `retrieveByKey(ViewRowSetImpl, Key, int)`.
`protected abstract void` | `setEJBLocalHome(javax.ejb.EJBLocalHome ejbHome)` An abstract method which stores the Entity Bean Home reference.
`protected void` | `setupEJBHome(javax.naming.Context ic)` Sets up the Entity Bean Home.
`protected javax.naming.Context` | `setupInitialContext()` Creates the initial context in preparation for setting up of the Entity Bean Home.

Methods inherited from class oracle.jbo.server.ViewObjectImpl
`activateCurrentRow, activateIteratorState, activateNewRowTracker, activateNewRowTracker, activateState, activateState, activateState, activateTransientAttribute, activateTransients, activateTransients, addDynamicAttribute, addListener, addManagementListener, addOrderByClause, addQueryMode, addRowSet, addViewLink, addWhereClause, afterCommit, afterEntityRemove, afterRemove, afterRollback, appendXMLElementNodes, appendXMLElementNodes, beforeCommit, beforeEntityRemove, beforeRollback, bindParametersForCollection, bindRangePagingParams, buildFromClause, buildKey, buildNewCollection, buildOrderByClause, buildQualifyingRowFilters, buildQuery, buildRangePagingQuery, buildRowFilter, buildViewCriteriaClauses, buildWhereClause, cancelQuery, checkPassivateViewAttributes, clearCache, clearViewCriterias, closeFreedStatements, closeRowSet, closeRowSetIterator, createAndInitRow, createDetailRowSet, createFinderVO, createInstance, createInstanceFromResultSet, createKey, createNewRowForCollection, createRow, createRowSet, createRowSetIterator, createViewCriteria, createViewLinkScanBaseRS, createXMLDefinition, criteriaChanged, defineNamedWhereClauseParam, doesRowFilterMatch, dumpQCs, enumerateRowsInRange, executeDetailQuery, executeEmptyRowSet, executeQuery, findAndSetCurrentRowByKey, findAttributeDef, findByEntity, findByKey, findByKey, findByViewCriteria, findInCacheByKey, findRowInQCs, findRowSet, findRowSetIterator, findViewLinkAccessor, findViewLinkAccessorVO, first, getAccessMode, getAllCachedQueryCollections, getAllRowsInRange, getAllViewCriteriaNames, getAllViewCriterias, getApplicationModule, getApplyViewCriteriaNames, getApplyViewCriterias, getAssociationClause, getAttrDefsForEntityAttr, getAttributeCount, getAttributeDef, getAttributeDefs, getAttributeIndexOf, getAttrIndicesForEntityAttr, getBindingStyle, getByKeyFinderRS, getCachedQueryCollection, getCalculatedAttributeCount, getCliIteratorState, getCurrentRow, getCurrentRowIndex, getCurrentRowSlot, getDBTransaction, getDefaultRowSet, getDefFullName, getDefName, getDeleteParticipants, getDetailEstimatedRowCount, getDetailRowSets, getDiscrColLoadIndices, getDynamicAttributeCount, getDynamicAttributeOffset, getEntityDef, getEntityDefCount, getEntityDefs, getEstimatedRangePageCount, getEstimatedRowCount, getFetchedRowCount, getFetchMode, getFetchSize, getFilteredRows, getFilteredRows, getFilteredRowsInRange, getFilteredRowsInRange, getFullSqlMode, getImplObject, getInsertParticipants, getIterMode, getKeyAttributeDefs, getLockParticipants, getMasterRowSetIterators, getMaxFetchSize, getNextRangeSet, getOrderByClause, getParametersAsStorageTypes, getPreparedStatement, getPreviousRangeSet, getPrimaryKeys, getPropertiesMap, getProperty, getProxyClassName, getProxyInterfaceName, getQualifyingRowFilters, getQuery, getQueryCollection, getQueryMode, getQueryOptimizerHint, getQueryTimeOut, getRangeIndexOf, getRangeSize, getRangeStart, getRow, getRowAtRangeIndex, getRowClass, getRowComparator, getRowCount, getRowCountInRange, getRowFilters, getRowFilterValues, getRowFromHandle, getRowMatch, getRowMatchBindValue, getRowMatchFromViewCriteria, getRowProxyClassName, getRowQualifier, getRowSet, getRowSetImpl, getRowSetIterator, getRowSetIterators, getRowSets, getScanRowFilterAttributeDefs, getSignature, getSortBy, getSortCriteria, getSyncLock, getTransPostHandle, getUserDataForCollection, getUserDefinedQuery, getViewAttributeDefImpls, getViewCriteria, getViewCriteria, getViewCriteriaClause, getViewCriteriaClause, getViewDef, getViewLinkDestinationAttributes, getViewLinkNames, getViewLinks, getViewObject, getWhereClause, getWhereClauseParams, getXMLElementTag, getXMLRowElementTag, handleActivatedRowNotFound, hasDefaultRowSet, hasNext, hasPrevious, initFromDef, insertRow, insertRowAtRangeIndex, isAssociationConsistent, isAutoPostChanges, isCollectionPresent, isDynamicAttribute, isDynamicAttribute, isExecuted, isFetchComplete, isForeignKey, isForScan, isForwardOnly, isInternal, isManageRowsByKey, isMaxFetchSizeExceeded, isNameGenerated, isPassivatableTransientAttribute, isPassivationEnabled, isPostedToDB, isQueryChanged, isRangeAtBottom, isRangeAtTop, isReadOnly, isRowValidation, isTransientTransactionListener, isTransientTransactionPostListener, isViewLinkAccessorRetained, last, lookupAttributeDef, markQueryCollectionDirty, next, notifyRowDeleted, notifyRowInserted, notifyRowUpdated, passivateNewRowTracker, passivateState, passivateState, passivateState, passivateTransients, passivateTransients, populateAttributeForRow, postChanges, prepareForActivation, prepareForBatchMode, prepareForPassivation, previous, printXMLDefinition, processSortCriteria, putViewCriteria, readFromXml, readRowXML, readRowXML, readXML, readXML, refreshCollection, refreshWhereClauseParams, removeApplyViewCriteriaName, removeCurrentRow, removeCurrentRowAndRetain, removeCurrentRowFromCollection, removeListener, removeManagementListener, removeMasterRowSetIterator, removeNamedWhereClauseParam, removeRowHandle, removeRowSet, removeViewCriteria, reset, resetSession, retrieveByKey, rowQualifies, scrollRange, scrollRangeTo, scrollToRangePage, setAccessMode, setApplyViewCriteriaName, setApplyViewCriteriaNames, setAssociationConsistent, setAutoPostChanges, setBindingStyle, setCurrentRow, setCurrentRowAtRangeIndex, setFetchCompleteForCollection, setFetchMode, setFetchSize, setForwardOnly, setFullSqlMode, setIterMode, setKeyAttributeDefs, setListenToEntityEvents, setManageRowsByKey, setMasterRowSetIterator, setMaxFetchSize, setNamedWhereClauseParam, setNestedSelectForFullSql, setOrderByClause, setPassivatableTransientAttribute, setPassivationEnabled, setPostedToDB, setProxyClassName, setQuery, setQueryAsChanged, setQueryChanged, setQueryMode, setQueryOptimizerHint, setQueryTimeOut, setRangeSize, setRangeStart, setResultSetForCollection, setRowFilterValues, setRowMatch, setRowMatchFromViewCriteria, setRowQualifier, setRowValidation, setSortBy, setTransPostHandle, setUserDataForCollection, setViewCriteriaAdapter, setViewLinkAccessorRetained, setWhereClause, setWhereClauseParam, setWhereClauseParams, showCursorUsage, skipNamedWhereClauseParam, sortRows, sourceChanged, updateRowSetFromXML, validate, writeXML, writeXML, writeXML, writeXML`

Methods inherited from class oracle.jbo.server.ComponentObjectImpl
`addListener, create, createRef, ensureVariableManager, getCompListeners, getCompListenersList, getMessageBundleClass, getProxyClassName, getRootApplicationModule, getVariableManager, hasVariables, isDead, isRegWithPiggyMan, setName, setParent`

Methods inherited from class oracle.jbo.server.NamedObjectImpl
`setParent, setPropertiesMap`

Methods inherited from class oracle.jbo.common.NamedObjectImpl
`getFullName, getName, getParent, getProperties, getPropertiesAsStrings, refreshProperty, setFullName, 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.StructureDef
`getFullName, getName`

Methods inherited from interface oracle.jbo.RowSet
`getName`

Methods inherited from interface oracle.jbo.VariableManagerOwner
`ensureVariableManager, getMessageBundleClass, getVariableManager, hasVariables`

Methods inherited from interface oracle.jbo.Properties
`getProperties, refreshProperty`

Methods inherited from interface oracle.jbo.ComponentObject
`getFullName, getName`

Constructor Detail

### FinderViewImpl

    public FinderViewImpl()

  Constructs a Finder-Based View Object.

Method Detail

### applyViewCriteria

    public void applyViewCriteria(ViewCriteria criteria)

  Overrides the base implementation of `applyViewCriteria(oracle.jbo.ViewCriteria)`.

  It call ``ViewCriteria.setCriteriaForQuery(boolean)`` to mark the View Criteria to be used for in memory row filtering. Then, it calls the base implementation.

  Specified by:
    `applyViewCriteria` in interface `ViewObject`
  Overrides:
    `applyViewCriteria` in class `ViewObjectImpl`
  Parameters:
    `criteria` - the View Criteria.

### addViewCriteriaToWhereClause

    protected boolean addViewCriteriaToWhereClause()

  Overrides the base implementation of `addViewCriteriaToWhereClause()`.

  This method is to indicate whether the View Criteria should be appended to the where-clause. For a Finder-Based View Object, a value of `true` is returned, i.e., the clause generated from the View Criteria should be appended to the where-clause.

  The combined where-clause is then passed to the expression evaluator to filter rows in memory.

  Overrides:
    `addViewCriteriaToWhereClause` in class `ViewObjectImpl`
  Returns:
    `true`.

### processWhereClause

    protected void processWhereClause(java.lang.Object qc)

  Processes the complete where-clause for this Finder-Based View Object.

  It uses ``RowQualifier`` to filter rows.

  Parameters:
    `qc` - the Query Collection.

### executeFinder

    protected java.util.Collection executeFinder(java.lang.Object qc,
                                                 java.lang.Object[] params,
                                                 int noUserParams)

  Calls the Local Entity Bean finder and returns a collection of Entity Beans. It uses the abstract method `findFromEJBBean(Object, Object[], int)`.
  Parameters:
    `qc` - the Query Collection.
    `params` - parameter values to be used when calling the finder.
    `noUserParams` - indicates how many of the parameter values in `params` is user specified parameters.

### createFinderUserData

    protected oracle.jbo.server.ejb.facade.VOForEntityBeanUserData createFinderUserData()

### executeQueryForCollection

    protected void executeQueryForCollection(java.lang.Object qc,
                                             java.lang.Object[] params,
                                             int noUserParams)

  Overrides the base implementation of `executeQueryForCollection(Object, Object[], int)`.

  It calls `processWhereClause(Object)` to set up the in-memory expression filter.

  Overrides:
    `executeQueryForCollection` in class `ViewObjectImpl`
  Parameters:
    `qc` - the Query Collection.
    `params` - parameter values to be used when calling the finder.
    `noUserParams` - indicates how many of the parameter values in `params` is user specified parameters.

### setupInitialContext

    protected javax.naming.Context setupInitialContext()
                                                throws javax.naming.NamingException

  Creates the initial context in preparation for setting up of the Entity Bean Home.
  Returns:
    the initial context.
  Throws:
    `javax.naming.NamingException` - if something goes wrong while setting up the initial context.

### setupEJBHome

    protected void setupEJBHome(javax.naming.Context ic)
                         throws javax.naming.NamingException

  Sets up the Entity Bean Home.

  It first tries to get the Entity Bean Home JDNI name from the View Definition. If one is not found, it gets the JNDI name from the primary Entity base of the View Object. It calls an abstract method `setEJBLocalHome(javax.ejb.EJBLocalHome)`.

  Parameters:
    `ic` - the initial context.
  Throws:
    `javax.naming.NamingException`

### getEJBLocalHome

    protected abstract javax.ejb.EJBLocalHome getEJBLocalHome()

  An abstract method which returns the Entity Bean Home reference.

  A subclass of this class has an implementation of this method which returns the Entity Bean Home reference.

  Returns:
    the Entity Bean Home reference.

### setEJBLocalHome

    protected abstract void setEJBLocalHome(javax.ejb.EJBLocalHome ejbHome)

  An abstract method which stores the Entity Bean Home reference.

  A subclass of this class has an implementation of this method which assigns `ejbHome` to a field of that subclass.

  Parameters:
    `ejbHome` - the Entity Bean Local Home to be stored.

### findFromEJBBean

    protected java.util.Collection findFromEJBBean(java.lang.Object qc,
                                                   java.lang.Object[] params,
                                                   int noUserParams)

  An abstract method that calls the designated Local Entity Bean finder.

  A subclass of this class has an implementation of this method which calls the specific finder. Values of `params` are passed to the finder as parameters.

  Parameters:
    `qc` - the Query Collection.
    `params` - parameter values to be used when calling the finder.
    `noUserParams` - indicates how many of the parameter values in `params` is user specified parameters.
  Returns:
    the collection returned by the finder.

### hasNextForCollection

    protected boolean hasNextForCollection(java.lang.Object qc)

  Overrides the base implementation of `hasNextForCollection(Object)`. Determines whether the Query Collection has next row or not from the Entity Bean collection returned from the previous call to the finder.
  Overrides:
    `hasNextForCollection` in class `ViewObjectImpl`
  Parameters:
    `qc` - the Query Collection.
  Returns:
    `true` if the collection has more rows. `false` otherwise.

### createRowFromResultSet

    protected ViewRowImpl createRowFromResultSet(java.lang.Object qc,
                                                 java.sql.ResultSet resultSet)

  Overrides the base implementation of `createRowFromResultSet(Object, java.sql.ResultSet)`. Creates a View Row from the next Entity Bean and returns it.
  Overrides:
    `createRowFromResultSet` in class `ViewObjectImpl`
  Parameters:
    `qc` - the Query Collection.
    `resultSet` - the JDBC Result Set object. Not used in `FinderViewImpl`.
  Returns:
    the View Row.

### createViewLinkAccessorVO

    protected ViewObjectImpl createViewLinkAccessorVO(AssociationDefImpl assocDef,
                                                      java.lang.String voName,
                                                      ViewDefImpl vDef,
                                                      ViewLinkDefImpl vlDef)

  Overrides:
    `createViewLinkAccessorVO` in class `ViewObjectImpl`

### createViewLinkAccessorRS

    protected ViewRowSetImpl createViewLinkAccessorRS(AssociationDefImpl assocDef,
                                                      ViewObjectImpl accessorVO,
                                                      Row masterRow,
                                                      java.lang.Object[] values)

  Overrides:
    `createViewLinkAccessorRS` in class `ViewObjectImpl`

### getQueryHitCount

    public long getQueryHitCount(ViewRowSetImpl viewRowSet)

  Overrides the base implementation of `getQueryHitCount(oracle.jbo.server.ViewRowSetImpl)`. It returns the number of rows in the collection.
  Overrides:
    `getQueryHitCount` in class `ViewObjectImpl`
  Parameters:
    `viewRowSet` - the Row Set whose row count is to be computed.
  Returns:
    the row count.

### getQueryHitCount

    public long getQueryHitCount(ViewRowSetImpl viewRowSet,
                                 Row[] masterRows)

  Overrides:
    `getQueryHitCount` in class `ViewObjectImpl`

### retrieveByKey

    protected Row[] retrieveByKey(ViewRowSetImpl rs,
                                  Key key,
                                  int maxNumOfRows)

  Overrides the base implementation of `retrieveByKey(ViewRowSetImpl, Key, int)`.

  This method is called by `findByKey(Key, int)` when it does not find all the rows in the View Row cache.

  Overrides:
    `retrieveByKey` in class `ViewObjectImpl`
  Parameters:
    `rs` - the View Row Set for which the rows being retrieved.
    `key` - the key to match rows with.
    `maxNumOfRows` - limits the number of rows to return. If `-1`, all matching rows are returned.
  Returns:
    an array of matching rows.

### remove

    public void remove()

  Description copied from class: `ViewObjectImpl`
  Removes this View Object from its containing application module. This method can be used for View Objects created either at Design Time or at runtime.

  If you subclassed View Object to perform some tasks that are not a normal part of the View Object functionality, then you might have to override this method.

  Specified by:
    `remove` in interface `ComponentObject`
  Overrides:
    `remove` in class `ViewObjectImpl`

### releaseUserDataForCollection

    protected void releaseUserDataForCollection(java.lang.Object qc,
                                                java.lang.Object data)

  Overrides:
    `releaseUserDataForCollection` in class `ViewObjectImpl`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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