Some cool new features with 12c...
- Data Object Inheritance
- Data Object Business methods
-- Covered in a previous blog post
- Enumerations
Data Object Inheritance
Inheritance enables you to reuse the data and behavior defined in a business object.
This avoids duplicating data structures and scripts, making maintenance easier and
less error-prone.
To use inheritance you create a business object as the child of another business object
that defines the attributes and methods that you want to reuse. The latter is called the
parent object.
Here is the context sensitive menu for the business object -
No opportunity here to create a Child Business Object.
Now let's look at another business object -
Now, I can create the child object.
As you can see, I can add attributes and methods to the child object.
Enumerations
You can use enumerations to model a collection of values of the same type.
Enumerations enable you to check and restrict the values of a certain argument at
compile time, avoiding bugs and errors in runtime.
Example:
Now let's validate our incoming order country attribute against the enumeration.
I can add a couple of entries here -
No comments:
Post a Comment