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?
|