-->
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.  [ 5 posts ] 
Author Message
 Post subject: primitive custom type
PostPosted: Thu Aug 19, 2004 7:05 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Is it possible that I make custom type with returnedClass : boolean, integer etc

regards


Top
 Profile  
 
 Post subject: No
PostPosted: Sun Aug 22, 2004 9:40 am 
Beginner
Beginner

Joined: Wed Oct 29, 2003 11:52 am
Posts: 37
Location: Gothenburg, Sweden
I believe not, since there's no way to return primitive arrays (of arbitrary type) in java. only Object[].


Top
 Profile  
 
 Post subject: Re: primitive custom type
PostPosted: Mon Aug 23, 2004 5:59 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
snpesnpe wrote:
Is it possible that I make custom type with returnedClass : boolean, integer etc

regards


The UserType interface doesn't allow you to do so - returns OBJECT...
But this doesn't mean your UserType cannot be applied/connected to a primitive property of your persistent class.

If your UserType returns an Integer object, it can be used to populate an int property - have a look at the Hibernate Integer type...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 23, 2004 7:29 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Is it mean that I set returnedClass to btw Boolean.class and persistent field can be boolean ?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 24, 2004 4:02 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
snpesnpe wrote:
Is it mean that I set returnedClass to btw Boolean.class and persistent field can be boolean ?

Thanks


YES


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.