The
documentation for the enum data type includes ways to do this. All PHP, but the logic will be the same in
Java.
Personally, I would use a seperate table to store the enumerated values and a foreign key to refer to them and just not bother with the enum data type. I can't see how it is useful without being able to get the values easily in a non-database specific way (that way you don't have to change your Java code if you start using a differernt database).