11 August, 2011

ADF Business Component Base Classes


Inroduction
ADF business component is ADF framework that we can use in Model view. It manages connection with database.
It is ready developed and you can customize it to get your customized framework.
It is contains several main classes that are essential for Model components that are illustrated in below picture.
For opening the below window Open Jdeveloper>Tools>Preference


As we noticed there are classes dedicated to Entity Object, View Object, Application Module.
I will clarify every one of them at next section.



ADFBC Framework classes
EntityCache
    It maintains the entity cache and it has the updated values for each entity row.When ever an attribute is changed at the end its pushed to the entity cache.

EntityImpl
   It has generic getAttribute and setAttribute methods to set or get any attribute.When ever a separate implementation class is generated for an Entity Object the class extends EntityImpl and custom get and set methods can be generated in the extension class.This can be controlled from JDeveloper by selecting Generate accessor checkbox.

ViewObjectImpl
   It represents a VO.It has all the information related to the VO level like bindVariables,query etc.When ever a VO is executed to get results,The ViewObjectImpl's executeQuery or executeQueryForCollection method gets invoked.

ViewRowImpl
     It is a representation of a VO row or the result row.Similar to getAttribute and setAttribute in EO,get and set methods specific to each attribute can be generated in VORowImpl too.

ApplicationModuleImpl
     It has the Application Module related methods like beforeCommit,afterCommit etc.

Thanks
Mahmoud A. El-Sayed

1 comment:

ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...