-->
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.  [ 2 posts ] 
Author Message
 Post subject: Detecting setXXX()
PostPosted: Fri Mar 26, 2010 1:17 pm 
Newbie

Joined: Fri Mar 26, 2010 1:11 pm
Posts: 1
Is there a way for Hibernate to detect whether or not a property has had setXXX() called?

For instance, if I have the following class:

Code:

public class A {

   private int user = 0;

   public setUser(int user) {
      this.user = user;
   }

}



Is there a way to throw an error if save(A) or update(A) is called without first calling A.setUser()? Interceptor? Events?


Top
 Profile  
 
 Post subject: Re: Detecting setXXX()
PostPosted: Sat Mar 27, 2010 4:05 am 
Beginner
Beginner

Joined: Wed Jan 07, 2009 7:07 pm
Posts: 26
Can you describe more about your requirement.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.