Databases Reference
In-Depth Information
The message is displayed only when there is no primary key defined in the database
table. ADF will ask if you want to create a primary key named
ROWID
.
The
demobld.sql
file, which we have used to create the
database table, does not include constraint definition.
8.
You can cancel the message and go back to select the
Primary Key
opion for the
Deptno
atribute. This opion was not checked for
EmpEO.xml
, hence we could
see a column called
Rowid
added to the enity object.
Once the primary key opion is checked, we can remove the
Rowid
atribute from
the
EmpEO.xml
file. In reality, the database table will surely have a primary key
deined and most of the ime,
Rowid
will not be generated.
9.
The next screen will provide you with an opion to create a Java class for the enity
object. We will not do any coding in Java right now, so we will skip this secion and
move forward.
10.
The next opion will allow you to create a view object and add the view object to
the applicaion module. Select the
Generate Default View Object
checkbox and
modify the package name from
com.empdirectory.model.entity
to
com.
empdirectory.model.view
. Enter
DeptVO
in the name box.
11.
Check the
Add to Applicaion Module
opion to add the view object to the already
exising
EmpDirectoryModule
module.
You may skip this opion to create the view object from scratch by selecing
DeptEO
ater compleing all the steps.
12.
Click
Next >
to accept the summary and click on the
Finish
buton to create the
DeptEO
enity object.
What just happened?
We have now created an enity object which maps to the
DEPT
table. So, we have the enity
object in the same package in which we had created our enity object for the
EMP
table.
The
DeptEO.xml
ile will have all the columns mapped to the corresponding atributes.
Search WWH ::
Custom Search