By design, Oracle ADF does not allow clients to directly access entity objects. Because entity objects are business domain components, they are intended to encapsulate logic about datasource entities, not provide services to client programs. For more information, see the related topics list.
However, you may have methods affecting particular datasource entities that you want to expose to clients. If you have such a method, you must create a delegator method on a view row class for a view object with a usage of the entity.
To create a delegator method:
get<Entity>()
accessor and call
its method.
For example, if the entity object Employees
contains a
method grantRaise()
, you could create the following
method on the view row class for any view object containing a usage
of Employees
:
public void grantRaise(int percent)
{
getEmployees().grantRaise(percent);
}
Creating Business Components Service
Methods for Clients
About
Business Components Service Methods
About Oracle ADF Business Domain Components, Data Model Components, and
Organizational Components
About
Oracle ADF Entity Objects
About
Oracle ADF View Objects
About View
Object Java Classes
Copyright © 1997, 2004, Oracle. All rights reserved.