First page Back Continue Last page Text

oracle adf workshop

Notes:


Creating a Business Component That Extends Another

Whenever you create a new business component, you can extend an existing one to create a customized version of the original. For example, you may have a View Object (VO) named DepartmentsVO and another named DepartmentsByLocationVO that extends the DepartmentsVO view object to add a named bind variable called TheLocation and to customize the WHERE clause to reference that bind variable.

This component inheritance facility is available to all component types, not just View Objects. When one component extends another, the extended component inherits all the metadata and behavior from the parent that it extends. In the extended component, you can add new features or customize existing features of the parent component both through metadata and Java code.

To create a component that extends another, on the Name page of the component wizard, provide the fully qualified name of the component that you want to extend in the Extends field. Then continue to create the extended component as usual. But you must override the discriminator column and set its default value as applicable for that subtype.

When you create an extended entity or VO, you can introduce new attributes, new associations or view links, new validators, and new custom code. You can override certain declarative aspects of existing attributes and any method from the parent component’s class.