View Full Version : Tracking Object changes
CNemo7539
06-29-2007, 02:59 PM
Hi All!
I have pretty complex domain object and would like to have ability to be able say if object was changed. This is needed because I do not want to perform any business logic if object is unchanged.
The question is if AOP is right approach to do that? If so could somebody point me to the sample?
I believe that in the samples you will find an example where aop is used to set a timestamp whenever a property is changed.
Bruno Baia
07-07-2007, 12:03 AM
Hi,
I believe that in the samples you will find an example where aop is used to set a timestamp whenever a property is changed.
Yep, the Spring.AopQuickStart.Step6 project (from Spring.AopQuickStart sample) using Introduction.
Cheers,
Bruno
CNemo7539
07-16-2007, 09:15 PM
Great!
I finally found a minute to take a look on this. However would be nice if example will show more complex object to track changes of.
I wonder if it will work when I update property on the nested object. Let say I have PostalAddress type and property of that type in Contact instance.
In my understanding mixin in example works on the main object. I simply lost and don't know how to extend example for more complex object.
I see some application for memento pattern. In such case any access to main proxyed object will compare state and update mixin.
Is this way to go? May be kind of coarse and heavy...
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.