-->
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: Case insensitive @Enumerable
PostPosted: Wed Oct 17, 2007 7:51 am 
Newbie

Joined: Mon Oct 15, 2007 9:59 am
Posts: 1
Hi, I've got a little problem with my client's database. They've two different systems writing to the same database. However, one system writes a column (which can have one of three predetermined string-values, example RED, GREEN, BLUE) with uppercase letters, the other system (for some reason) writes all those strings in lowercase letters (example: red, green, blue).

Since enum's in Java are case-sensitive this of course means that I would have to implement the enum like this:

enum Colors {
RED,
red,
GREEN,
green,
BLUE,
blue
}

This, of course, is not really desirable. Is there a way (besides implementing a lot of EJB QL's containing UPPER(t.color) or implementing it as a normal String property and then have the get-method return a case insensitive-enum) around this?


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.