First page Back Continue Last page Text

oracle adf workshop


Coding: The Java Classes

There are three base Java classes that implement entity objects: This is the entity object class. At run time, one entity object is instantiated for each row of data. This class contains methods to get and set entity attribute values. All entity object classes extend this class. The class provides methods to insert, update, delete, and lock rows. The ADF Business Components technology uses this class to manage instances of each entity. When you generate the entity object class, you can also generate:

Accessors: Generate typesafe accessors for the entity object’s attributes.

Data Manipulation Methods: Generate methods to override DML methods, such as lock() and doDML().

Create Method: Select to override the create() method to modify or add initialization features to the create logic.

Remove Method: Select to override the remove() method to modify or add clean-up code to the remove logic.

EntityDefImpl: This is the entity definition class. At run time, one entity definition is instantiated for each entity. You can add methods to this class that are used by all entity object instances. For example, you could override a method to globally change the default format mask for number attributes.