-->
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: Custom YesNoType and UserType
PostPosted: Fri Mar 25, 2011 4:41 pm 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
I need to customize the Y/N chars in YesNoType so I ended up doing a

extends AbstractSingleColumnStandardBasicType<Boolean> implements PrimitiveType<Boolean>, DiscriminatorType<Boolean>

and passing along a new BooleanTypeDescriptor in the super-constructor and overloading ObjectToSQLString just like YesNoType does

Question 1: Is this the recommended approach? There is no way to extend YesNoType anymore?

Then I'd like to use Envers with it and it likes to work with UserType so I add an implements UserType and end up with anothe 10 or so methods to implement

Question 2: Is there no simpler way of doing this? Is the UserType so different from the normal type implementation hierarchy on purpose or am I missing something?
I initialliy thought I would just extend YesNoType, override the yes and no values used add implements UserType and have the interface methods already implemented by the YesNoType hierarchy but apparently not

Thanks in advance,
Nik


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.