In ADF, Business rules are customized mostly at entity level because the entity object definition performs DML operations like INSERT, UPDATE, DELETE
We can customize business rules or any validations on attribute & row level by extending a class from oracle.jbo.server.EntityImpl
for example
If u want to customize a attribute of an Entity Object.
Then it has to be done in the respective EOimpl class which extends Entity object class (oracle.jbo.server.EntityImpl)
Here i want to set an attribute value to be displayed in uppercase. change the getter method as follows.
The extended class contains type safe getters & setters for each attribute like getFirstName, setFirstName etc...
Typesafe getters and setters are ideal places to put attribute-level business rules, such as validation logic.
They contain calls to the methods
For more information : Implementing Business Rules
We can customize business rules or any validations on attribute & row level by extending a class from oracle.jbo.server.EntityImpl
for example
If u want to customize a attribute of an Entity Object.
Then it has to be done in the respective EOimpl class which extends Entity object class (oracle.jbo.server.EntityImpl)
Here i want to set an attribute value to be displayed in uppercase. change the getter method as follows.
The extended class contains type safe getters & setters for each attribute like getFirstName, setFirstName etc...
Typesafe getters and setters are ideal places to put attribute-level business rules, such as validation logic.
They contain calls to the methods
EntityImpl.getAttributeInternal()
and EntityImpl.setAttributeInternal()
respectively, and by wrapping that call in additional code (such as an
if-then block), you can place conditions on attribute change or access,
or enforce logic before or after the attribute is accessed or changed.For more information : Implementing Business Rules
No comments:
Post a Comment