-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Experience with attribut protocol?
PostPosted: Tue Sep 16, 2003 4:11 am 
Regular
Regular

Joined: Mon Sep 08, 2003 4:53 am
Posts: 70
Location: Germany
I want to write a protocol every time an objects persistent state has changed. The protocol should contain the old and the new value of every member variable of the object, even some information of collections (e.g. the unique key or a short string information of the objects in the collection).

This is easy, if a new object is stored or if a persistant object is deleted. But it's not so easy, if a persistant object is updated.

At the moment I try to write the protocol in hibernates LifeCycle Callbacks onSave, onUpdate and onDelete. But I don't see how to get the old values of the member variables there.

Does anybody have experience with this topic? Thanks for any help or idea!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2003 11:15 am 
Beginner
Beginner

Joined: Tue Aug 26, 2003 1:02 pm
Posts: 34
Location: Akron, OH
Maybe Interceptor.flushDirty(...)?
http://www.hibernate.org/hib_docs/api/n ... eptor.html


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 19, 2003 6:44 am 
Regular
Regular

Joined: Mon Sep 08, 2003 4:53 am
Posts: 70
Location: Germany
Thanks, it seems to work very well!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.