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: subset of usertype values?
PostPosted: Fri Jun 02, 2006 8:15 am 
Regular
Regular

Joined: Mon Mar 06, 2006 6:18 am
Posts: 95
Location: Bern, Switzerland
hi all


in my hibernate mapping file there are defined several subclasses. A few of them are using the userType KursArtUT. In some definitions i want to allow only a subset of possibilities which are defined in KursArtUT.
Is this possible?

My UserType has the following definitions:
Code:
   public static final KursArt JAHRESKURS = new KursArt(new Integer(0));

   public static final KursArt SAISONKURS = new KursArt(new Integer(1));

   public static final KursArt HALBER_SAISONKURS = new KursArt(new Integer(2));


If my property can only use JAHRESKURS and SAISONKURS for example, and not HALBER_SAISONKURS, how is this implemented?

Should i create a Superclass with all common options and several subclasses of the usertype?

Any tipps/help appreciated

Regards
Angela


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 07, 2006 1:25 am 
Regular
Regular

Joined: Mon Mar 06, 2006 6:18 am
Posts: 95
Location: Bern, Switzerland
no ideas? :-/


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.