Time for action – generating a Java API for DeptEO
In our previous exercise, we
did not select the options to generate the Java API in Create Component Wizard. The following steps will show how to generate a Java API for the EmpEO.xml
file:
Select the
EmpEO.xml
file from theModel
project in the Projects pane.Click on the Java tab and then click on the pencil icon. This will open the option to select the Java class files:
Check the Generate Entity Object Class EmpEOImpl checkbox. This will create the
EmpEOImpl
class that will extend theEntityImpl
class.Select the Accessors option to generate the attribute's
getter
andsetter
methods; Create Method will generate thecreate()
method; Data Manipulation Methods will create thelock()
anddoDML()
methods and Remove Method will create theremove()
method.Checking the Generate Entity Collection Class EmpEOCollImpl checkbox will create the
EmpEOCollImpl
class that will cache the queried entity row. This class will extend theEntityCache
class to...