You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Dougall Squair <Do...@metcash.com> on 2003/05/22 03:13:34 UTC

Field conversion for Enumerated types

Hi, 

I have a number of enumerated types which extend the abstract class
org.apache.commons.lang.enum.ValuedEnum
is there an easy way to convert them to and from the JDBC type of Int.  I
have looked at the
field conversion interface but it looks like I would need to write a
specific implementation for each 
of my enumerations.


Dougall



Re: Field conversion for Enumerated types

Posted by Thomas Mahler <th...@web.de>.
Hi Dougall,

There is no automatic conversion support for enumerations.
You have to write your own conversion classes.

If you are willing to share your code we'll add it to the distribution!

cheers,
Thomas

Dougall Squair wrote:
> Hi, 
> 
> I have a number of enumerated types which extend the abstract class
> org.apache.commons.lang.enum.ValuedEnum
> is there an easy way to convert them to and from the JDBC type of Int.  I
> have looked at the
> field conversion interface but it looks like I would need to write a
> specific implementation for each 
> of my enumerations.
> 
> 
> Dougall
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
>