Hello,
I am kind of new to Hibernate.
I have a class ShipData with such fields:private String name_;
private ContactInfo contact_;
private String registerNumber_;
private String imoNumber_;
private String flag_;
private DateRange classPeriod_;
private String id_;
private Owner owner_;
The classes Owner, ContactInfo and DateRange have just java basic type fields. They do not have matching tables in database, even ShipData does not have(The Db tables are already there, and not allowed to change, java classes are designed accordingly). For mapping of Owner.class , I created OwnerType implementing UserType interface. ContactInfo and DateRange have also respective classes extending UserType interface. So, my real question is that, having those classes already which implemented UserType class, I don't want to list all the column names in ShipDataType(implementing UserType). I want to somehow reuse the already created UserType classes, how can I do this?
I hope my problem is obvious enough.
Thanks
Sunay
|