Why don't you override the Object.hashcode() method on your VO and call it and save the value when you retrieve the record. Call it again when the user submits their changes.
If the values are different, the a change was made.

-Richard


Sent from my iPhone

On Mar 31, 2009, at 4:54 AM, Jasmin Mehta <[email protected]> wrote:


I thought the Subject line of my question earlier was kind of misleading. Here is the same question with suitable subject line.


From:   Jasmin Mehta <[email protected]>
To:     [email protected]
Date:   03/31/2009 07:50 AM
Subject:        Check database before INSERT in iBatis




Hi,

I have customer registration web application. Where it takes 3 pages to complete the process before submit. Once customer is registered, i.e. the records are inserted into 3 different tables then user can edit the registration.

Right now, I have a code that retrieves the record from each table and store it into Value Object class (model) and keep that into session until I update the records at the end of 3 pages. I update the record only if any value is different from VO to new ActionForm being edited else not updating.

Is there any shorter way of doing this task in iBatis?

Thanks
Jasmin

*** *** *** *********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or agency to whom they are addressed.
If you have received this email in error please notify the Navy
Exchange Service Command e-mail administrator. This footnote
also confirms that this email message has been scanned for the
presence of computer viruses.

Thank You!
*** *** *** *********************************************************************


Reply via email to