-->
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: callback to entity to change it's state on Save
PostPosted: Fri Feb 09, 2007 6:04 am 
Newbie

Joined: Mon Jan 29, 2007 9:50 am
Posts: 7
Hello,

I'd like my entity to gent notified before insert, as some business rules must be applied (generate some custom unique indentifier)

I've tried to use an Interceptor, but the onSave method gets called AFTER the entity state has been extracted as Object[], so changing the state means changing those objects, not just calling the entity setters from my business code.

Using the validate method doesn't seem a solution as this is expected not to change the state.

Any suggestion ?


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.