-->
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.  [ 1 post ] 
Author Message
 Post subject: Interceptors and Effective Dating
PostPosted: Tue Dec 28, 2010 2:03 pm 
Regular
Regular

Joined: Tue Nov 30, 2004 4:23 pm
Posts: 62
We essentially have multiple objects in our model and some objects extend an EffectiveEntity to signify that they are constrained by what is necessary for effective dating.

This means the following:
INSERT
1) A new record is a default insert.

DELETE
1) A delete is actually an update, updating the expDate.

UPDATE - The most complicate
1) A record has been updated.
2) Use the record information to do a get on the original record (previous state).
3) Run an update on the original record to change its expDate (expiring that record).
4) Take the record that was updated (from step 1) and detach it.
5) Make the detached object insertable (also update the effDate).
6) Run an insert on this new effDated record.
- So I updated the original record to make it ineffective and inserted the newly effective record.

Is this something I can use Hibernate Interceptors to do so that I can intercept an update command
and run an effective dated update/insert?

Thanks,

Jay


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

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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.