Skip to Main Content

Java Programming

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!

Object Checksum or Reliable deep Clone and equals?

807588Feb 12 2009 — edited Feb 12 2009
Hi I am trying to check to see if an object has changed during execution.

The simplest option would of course be to use a flag e.g: changed, however the objects are entity beans and contain collections therefore it would be difficult to enforce this changed flag on those objects as they can be "got" and manipulated directly.

What would be useful would be if I could create a checksum of the object to start and then compare that later. Or another way would be through a deep clone using seriliization however when comparing the two objects (original and clone) they always appear to be different even if nothing has changed.

So in summary is it possible to apply a checksum to an object?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2009
Added on Feb 12 2009
4 comments
666 views