If you have some, but not complete, information about the WHERE clause you want for a view object definition, you can dynamically set individual WHERE clause parameters in particular view object instances at runtime.
To parametrize the WHERE clause in a view object definition:
ORDER_TOTAL > :1 + :2
:1
is the first parameter, and :2
is the
second parameter.
If you are running against a non-Oracle database, you will need to use ?-style parameters:
ORDER_TOTAL > ? + ?
In this case, the first ?
is the first parameter, and
the second ?
is the second parameter.
To specify parameter values for a particular view object instance at runtime:
Object
(usually a
String
) containing the value of the parameters:
String firstParam = "500";
String secondParam = "1000";
ordVO.setWhereClauseParam(0, firstParam);
ordVO.setWhereClauseParams(
{
firstParam,
secondParam
}
);
Ways to Change View Object Queries at
Runtime
About View Objects
About View Object and View Link Instances
Specifying a Custom Query for a View Object Definition
Finding View Object Instances in the Data Model
Developing Oracle ADF Business Components for Oracle9i Lite and Non-Oracle
Datasources
About Modeling
Business Components
Copyright © 1997, 2004, Oracle. All rights reserved.