|
Oracle9i Business Components for Java API Reference Oracle9i Jdeveloper (9.0.4) B10391-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
Abstract base class for Finder-Based View Object. This class extends
. Beyond the base ViewObjectImpl
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.common.NamedObjectImpl |
mFullName, mObjName, mParent, mProperties |
Fields inherited from interface oracle.jbo.RowSet |
FORWARD_ONLY, RANGE_PAGING, RANGE_PAGING_AUTO_POST, SCROLLABLE |
Fields inherited from interface oracle.jbo.RowIterator |
ITER_MODE_LAST_PAGE_FULL, ITER_MODE_LAST_PAGE_PARTIAL, SLOT_BEFORE_FIRST, SLOT_BEYOND_LAST, SLOT_DELETED, SLOT_VALID |
Fields inherited from interface oracle.jbo.XMLInterface |
XML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT, XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE |
Constructor Summary | |
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 ViewRowImpl |
createRowFromResultSet(java.lang.Object qc, java.sql.ResultSet resultSet) Overrides the base implementation of createRowFromResultSet(Object, java.sql.ResultSet) . |
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 abstract 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 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) . |
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 Row[] |
retrieveByKey(ViewRowSetImpl rs, Key key, int maxNumOfRows) Overrides the base implementation of retrieveByKey(ViewRowSetImpl, Key, int) . |
protected abstract void |
setEJBLocalHome(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.ComponentObjectImpl |
addListener, create, createRef, getCompListeners, getCompListenersList, getRootApplicationModule, 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.RowSet |
getName |
Methods inherited from interface oracle.jbo.Properties |
getProperties, refreshProperty |
Methods inherited from interface oracle.jbo.ComponentObject |
getFullName, getName |
Constructor Detail |
public FinderViewImpl()
Method Detail |
public void applyViewCriteria(ViewCriteria criteria)
applyViewCriteria(oracle.jbo.ViewCriteria)
.
It call
to mark the View Criteria to be used for in memory row filtering. Then, it calls the base implementation.ViewCriteria.setCriteriaForQuery(boolean)
applyViewCriteria
in interface ViewObject
applyViewCriteria
in class ViewObjectImpl
criteria
- the View Criteria.protected boolean addViewCriteriaToWhereClause()
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.
addViewCriteriaToWhereClause
in class ViewObjectImpl
true
.protected void processWhereClause(java.lang.Object qc)
It uses
to filter rows.RowQualifier
qc
- the Query Collection.protected java.util.Collection executeFinder(java.lang.Object qc, java.lang.Object[] params, int noUserParams)
findFromEJBBean(Object, Object[], int)
.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.protected void executeQueryForCollection(java.lang.Object qc, java.lang.Object[] params, int noUserParams)
executeQueryForCollection(Object, Object[], int)
.
It calls processWhereClause(Object)
to set up the in-memory expression filter.
executeQueryForCollection
in class ViewObjectImpl
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.protected javax.naming.Context setupInitialContext() throws javax.naming.NamingException
javax.naming.NamingException
- if something goes wrong while setting up the initial context.protected void setupEJBHome(javax.naming.Context ic) throws javax.naming.NamingException
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)
.
ic
- the initial context.javax.naming.NamingException
protected abstract EJBLocalHome getEJBLocalHome()
A subclass of this class has an implementation of this method which returns the Entity Bean Home reference.
protected abstract void setEJBLocalHome(EJBLocalHome ejbHome)
A subclass of this class has an implementation of this method which assigns ejbHome
to a field of that subclass.
ejbHome
- the Entity Bean Local Home to be stored.protected abstract java.util.Collection findFromEJBBean(java.lang.Object qc, java.lang.Object[] params, int noUserParams)
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.
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.protected boolean hasNextForCollection(java.lang.Object qc)
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.hasNextForCollection
in class ViewObjectImpl
qc
- the Query Collection.true
if the collection has more rows. false
otherwise.protected ViewRowImpl createRowFromResultSet(java.lang.Object qc, java.sql.ResultSet resultSet)
createRowFromResultSet(Object, java.sql.ResultSet)
. Creates a View Row from the next Entity Bean and returns it.createRowFromResultSet
in class ViewObjectImpl
qc
- the Query Collection.resultSet
- the JDBC Result Set object. Not used in FinderViewImpl
.public long getQueryHitCount(ViewRowSetImpl viewRowSet)
getQueryHitCount(oracle.jbo.server.ViewRowSetImpl)
. It returns the number of rows in the collection.getQueryHitCount
in class ViewObjectImpl
viewRowSet
- the Row Set whose row count is to be computed.protected Row[] retrieveByKey(ViewRowSetImpl rs, Key key, int maxNumOfRows)
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.
retrieveByKey
in class ViewObjectImpl
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.
|
Oracle9i Business Components for Java API Reference Oracle9i Jdeveloper (9.0.4) B10391-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2003, Oracle. All rights reserved.