Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF Datetrack Mode - Update Insert / Extended EntityImpl class

SimoNov 9 2011
Hi All,

Quite a complex one I believe....

I have extended an entity object, to utilise an Oracle stored PL/SQL API procedure to handle my DML insert update and delete operations. In my update procedure, I decide based upon user input whether the update should be a date-tracked 'correct' or a datetracked update.

The date track update essentially end dates the current record and performs a database insert for the new record. This seems to create a problem with my EO, for example, 4 rows now become 5. SO the database is now committed with 5 records, however my form only has 4. I have tried performing an 'execute query' (at this stage declaratively) with a button, but this however does not seem to work...

It definitely seems that the EO and database are now out of sync. Can anyone shed some light on what I need to do here?

I have tried following this note: http://jdeveloperandadf.blogspot.com/2011/01/adf-model-different-date-effective_10.html

which basically requires that the date tracked mode is to be chanegd: vo.setEffectiveDateMode(Row.EFFDT_UPDATE_CHANGE_INSERT_MODE);

Is this the right approach? My belief at this stage, is that this will direct the BC framework to create another entity row, and in theory this will be populated, when I re-execute the VO.

I am currently having trouble with this approach (if correct) as I continue to get a null pointer when trying to get the current row: (note this is performed within the Entity Object Impl override class.



ViewRowImpl vo = this.getCelpayPersonAsgParentVView();
vo.getRowSet().first(); // causes error
vo.setEffectiveDateMode(Row.EFFDT_UPDATE_CHANGE_INSERT_MODE);


Any help on my approach, would be much appreciated.

THanks

Simo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2011
Added on Nov 9 2011
0 comments
225 views