260 total views, 7 views today

ADF Synchronize with Database

We may have change the database table structure after created the Entity and View Object in the model project. After any changes made to the table, we need to synchronize the Entity object back from the database table. ADF Synchronize with Database provides this exact functionality

ADF Synchronize Entity Object – Example

I have created an Entity Object of Country table and created  App module Java classes. After those objects had been created, I added a column called ‘Extra Column’ of varchar datatype. Now I want to synchronize the extra column to my Entity object.

Restart the JDeveloper after you made any changes to the database table.

Right-click on the Entity object you want to sync and select Synchronize with Entity Object. As you see in the below image, the country EO object has only three attributes.

080316_0243_ADFSynchron1 Synchronize ADF Entity Object with database table

It displays the list of changes going to happen to the EO. Click the button ‘Synchronize All‘; Click ‘Yes’ or ‘Ok’ for the next upcoming popups

080316_0243_ADFSynchron2 Synchronize ADF Entity Object with database table

As see the entity object below, an extra column was added to it

080316_0243_ADFSynchron3 Synchronize ADF Entity Object with database table

Time to Synchronize View Object

The ADF synchronization won’t affect the View objects. We have to do it manually by opening the view object and select ‘Add attribute from Entity’ as shown below

080316_0243_ADFSynchron4 Synchronize ADF Entity Object with database table

Move the column you need from left to right and click Ok.

080316_0243_ADFSynchron5 Synchronize ADF Entity Object with database table

adf synchronize with database

See the below view object; the extra column is added to it

080316_0243_ADFSynchron6 Synchronize ADF Entity Object with database table

adf synchronize with database

If you have created any App Module Java class or EO/VO Java class. Manipulate the methods manually. For example, if a column was deleted after the entity object was created then delete the getter setter methods manually.

govindan Synchronize ADF Entity Object with database table
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
govindan Synchronize ADF Entity Object with database table
Connect me
By | 2016-12-15T21:38:54+00:00 August 2nd, 2016|Categories: ADF|Tags: , , , , |0 Comments
Like us on Facebook.
Connect!