-->
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: Quick Q about setter method signatures
PostPosted: Tue Oct 25, 2005 3:55 am 
Beginner
Beginner

Joined: Sat Oct 22, 2005 11:16 pm
Posts: 40
I'm using Hibernate 3, and I have a quick question about setters.

The standard setter signature is:

Code:
void setColor(String color);


which has a return type of void. Can I use other return types, like could I do this:

Code:
String setColor(String color);


I assume that Hibernate doesn't care what the return type is, right?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 25, 2005 4:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
have you tried it ?

I dont think it will pick it up since its not per-spec.

but since you can write your own PropertyAccessor implementation and use that for access attribute then you could do it your self ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Quick Q about setter method signatures
PostPosted: Tue Oct 25, 2005 6:28 am 
Newbie

Joined: Mon Oct 24, 2005 6:43 am
Posts: 6
What if ? access="field" hope it this helps.

Regards
Ramesh


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