Friends and experts I need your help in learning OAF.
I am new to OAF and want to know more info about the following java classes.
When I created a simple search page with EO, VO and AM, the following java classes are created.
I want to know
what is it?
what we do with that ?
where we use that?
Any sample scripts if possible?
Please correct me if I am wrong,I know that we use this one for manipulating data for a particular row ,operations such as getattribut,setattribute, delete ,update, insert. There are various methods got created when you create the EO if you select options on the " Generate Method " during step 4 on EO wizard.
Entity Objects are basically based on one table which encapsulate the business rules. These objects are used by OAF page to perform update/insert/delete operations .
Inside EOImpl.java you will find setter() and getter () methods in java we call it as accessor and mutator , each attribute in EO is mapped to column in the data base table .
You can also generate a create () method Validate () method .
Eg : To get the sequence value in OAF you can use Create() method .
VOImpl (VO) : It just consist of an Data base sql query , you might have noticed while executing a query eg : VO.executeQuery() ;
to perform any validation it provides iteration over and access to the view rows in its result set.
VoRowImpl : Represents a single row in a view object .
You will understand better when you writing a code using voimpl /voRowimpl objects
It basically performs the Business logic , we will define all our methods to implement business logic .
Eg : you can call a method from controller and define the method Amimpl.java , you can use of initializing the query or
you do DML operation , etc ...
In summery : The main reason why we have java file distribute across EO , VO , AM is because OAF is designed with MVC design pattern ,
in other words we have to isolate the responsibility of code in each layer ( Model , View , Controller ) .Its bad practice to write
the entire code in one single class file .
Eg : Controller class should accept the parameter from user and pass these parameters BC4J files ( AMImpl.java ) and its Job of the AMImpl.java
to perform the business logic and return the result back to to controller .
To enforce the coding standard of MVC design pattern we have these java files EO , VO , AM , CO . with more practice you will understand the various
methods defined in each of these java files .