> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: Friday, December 18, 2009 1:59 PM
> To: [email protected]
> Subject: Re: How to get hardcoded ordinal values to map to specific
> Enum values?
> 
> Hi,
> 
> I haven't used this, but it seems that you should start looking at
> EnumValueHandler:
>
http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa
> /jdbc/meta/strats/EnumValueHandler.html
> 
> Does anyone here know where to find examples of annotating a field
> with a custom ValueHandler?

After some searches, I think this is probably a good example:
<http://webspherepersistence.blogspot.com/2009/04/custom-orm-with-openjp
a.html>.  I'll move forward with this and see how it goes.

> On Dec 18, 2009, at 11:01 AM, KARR, DAVID (ATTCINW) wrote:
> 
> >> -----Original Message-----
> >> From: Daryl Stultz [mailto:[email protected]]
> >> Sent: Thursday, December 17, 2009 6:52 PM
> >> To: [email protected]
> >> Subject: Re: How to get hardcoded ordinal values to map to specific
> >> Enum values?
> >>
> >> On Thu, Dec 17, 2009 at 6:31 PM, Craig L Russell
> >> <[email protected]>wrote:
> >>
> >>> You would need your own value type as an extra attribute of your
> >> Enum
> >>> class, and then use a special OpenJPA mapping to get the values to
> >> and from
> >>> the database.
> >>>
> >>
> >> Maybe it's the "special OpenJPA mapping" info the OP is looking
> >> for. I
> >> know
> >> I'm interested in it.
> >
> > Yes, I'm probably going to have to find a reasonable solution for
> > this.
> > My database stores the custom ordinal values, and I have to map to a
> > real Enum value.
> >
> 
> Craig L Russell
> Architect, Sun Java Enterprise System http://db.apache.org/jdo
> 408 276-5638 mailto:[email protected]
> P.S. A good JDO? O, Gasp!

Reply via email to