Hi Raymond,

here is my approach to implemen t this:
1. store your BookingStatus fields as INTEGER columns
2. in the field-descriptors of those fields declare to use a ConversionStrategy.
3. Implement your own ConversionStrategy that reads an int value from
and maps it to the corresponding BookingSstatus.
The Conversion must also do the reverse, i.e map from BookingSttus to
int.


details are explained here: http://db.apache.org/ojb/jdbc-types.html

-- Thomas

Raymond Barlow wrote:
Hi all,

I've got a field in a class that I would like to persist. The field datatype is BookingStatus. BookingStatus is defined as follows:

public class BookingStatus
{

   private BookingStatus(){};
     public static final BookingStatus NEW       = new BookingStatus();
   public static final BookingStatus CONFIRMED = new BookingStatus();
   public static final BookingStatus CANCELLED = new BookingStatus();
   public static final BookingStatus COMPLETE  = new BookingStatus();
  }

How do I setup the repostory_user.xml to use this datatype? Is this possible or must I stick to 'primitive typed instance variables'?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to