The following is the table i am trying to map
TABLE: VEHICLE
COLUMNS:
MARKET(PK)
SYSTEM_ID(PK)
YEAR(PK)
MODEL_CODE(PK)
START_DATE(PK)
END_DATE(PK)
AMOUNT
...... and so on
This table already exists and I have no control over changing it.
Similarly, I already have objects defined and cannot change those either becoz they are used by different teams.
This is the object i want to map it to
public class Vehicle extends RulesCommon {
private String market = null;
private int programId = 0;
private String modelYear = null;
private String bodyModel = null;
private DateRange range = new DateRange();
private double payment = 0.0;
... etc...
}
public class DateRange
{
private Date startDate = null;
private Date endDate = null;
.... methods.....
}
As u can see above, the vehicle object has a primary key which is composite, of which part of it (DateRange) is in another object.
I tried different things but nothing worked. Any help would be appreciated.
Thanks
|