3.9 Create Custom Business Components
JDeveloper can be used to extend the application by creating custom business components.
When creating custom business components in JDeveloper, JDeveloper must be launched in the Default role. This role is used for creating new custom objects that needs to be added to the application. The same workspace that was created for customization can be used. After the custom business components are created, switch to the Customization Developer role, to make changes to existing artifacts to integrate the new custom artifacts into the application.
Task: Create Custom Entity Objects
An entity object represents a row in a database table, and encapsulates the business logic and database storage details of business entities.
In JDeveloper, entity objects can be created using the Create Entity Object wizard, which can be launched from the New Gallery. In the Application Navigator, right-click the project that has to be added to the entity object, and choose New. Then in the New Gallery, expand Business Tier, click ADF Business Components, choose Entity Object, and click OK. Follow the prompts in the wizard to create an entity object.
Task: Create Custom View Objects
A view object represents a SQL query and also collaborates with entity objects to consistently validate and save the changes when end users modify data in the UI.
In JDeveloper, view objects can be created using the Create View Object wizard, which can be launched from the New Gallery. In the Application Navigator, right-click the project that has to be added to the view object, and choose New. Then in the New Gallery, expand Business Tier, click ADF Business Components, choose View Object, and click OK. Follow the prompts in the wizard to create a view object.
Task: Create Custom Application Modules
An application module encapsulates an active data model and the business functions for a logical unit of work related to an end-user task.
In JDeveloper, application modules can be created using the Create Application Module wizard, which can be launched from the New Gallery. In the Application Navigator, right-click the project that has to be added to the application module, and choose New. Then in the New Gallery, expand Business Tier, click ADF Business Components, choose Application Module, and click OK. Follow the prompts in the wizard to create an application module.
Task: Add Validation
In JDeveloper, declarative validation rules can be created for entity objects and view objects to help ensure the integrity of the data. To do this, open the entity object or view object in the overview editor, and click the Business Rules navigation tab. Then select the attribute for which validation needs to be provided, click the Create new validator icon, and use the Add Validation Rule dialog to configure the rule.
Parent topic: Application Artifacts