If you have two view object instances in your data model, you can place
the view object instances into a master-detail relationship at runtime
by using createViewLinkBetweenViewObjects()
.
Note: This is the most flexible, but the most complex, way to create view link instances dynamically. If you have a view link definition or association that might be appropriate, we recommend that you use another method. For more information, see the related topics list.
To add a view link instance with a new view object attribute-based definition at runtime:
String
containing the name you want to give the
view link instance in the data model. For example, if this instance is
to be called CustOrdLink1
, you would use the following
code:
String vlInstanceName = "CustOrdLink1";
String accessorName = "Orders";
String
containing the parametrized WHERE clause
for the view link (for more information, see the related topics list).
If you want to use Oracle ADF Business Components' default SQL, you
can assign a value of null
to the String
.
For example, either of the following would be acceptable:
String whereClause = null;
String whereClause = ":1 = Orders.ORDER_ID";
Note: The rules for custom WHERE clauses are the same as when you create them during design time. See the related topics list for details.
createViewLinkBetweenViewObjects()
:
ViewLink vl = myAM.createViewLinkBetweenViewObjects(
vlInstanceName, accessorName,
allCustVO, masterAttributeArray, custOrdVO, detailAttributeArray,
whereClause);
Ways to Change View Object
Relationships at Runtime
Adding
a View Link Instance Based on a Predefined View Link at Runtime
Adding a View Link Instance with a New Association-Based Definition at Runtime
Removing a View Link Instance at Runtime
About Oracle ADF View Links
About View
Objects
About Application Modules
About View Object and View Link Instances
Finding View Object Instances in the Data Model
Traversing View Links
Changing View Link
SQL
Copyright © 1997, 2004, Oracle. All rights reserved.