persistence@glassfish.java.net

[FWD: [nbj2ee] Lookup table with enum]

From: Dru Devore <ddevore_at_duckhouse.us>
Date: Tue, 11 Mar 2008 10:35:22 -0700
I just realized I sent this message to the wrong address.

-------- Original Message --------
Subject: [nbj2ee] Lookup table with enum
From: Dru Devore <ddevore@duckhouse.us>
Date: Tue, March 11, 2008 10:08 am
To: NBJ2ee <nbj2ee@netbeans.org>

I have a table with a link into a lookup table. The lookup has a int for the id and a string for the display value. The 2 tables are linked using the id (primary key) on the lookup table. I want to represent the lookup table as an enum in code.

Can I tell the entity to look at the string value in the lookup table and associate it with the correct enum?
or
Do I have to use the ordinal value option? (which will basically make the lookup table useless)


---
Dru Devore