Hi,
I have a scenario where I have 2 labels that need to be configured. The names of the labels are 'Out Data' and 'In Data'. I only have one field in the database called 'Data'. Whether it is 'Out' or 'In' is decided at the runtime by the value of an Enum 'Scenario'. However, I need to actually show the user Out Data&In Data so that he can select 1 or both of them. I heard that calculated field concept it JPA will assist in this. Is this true or is there some other way that I can achieve this. Below is some sample code.
Date Field
@Override
@Convert("DateTimeConverter")
@Column(name = "DATE")
public DateTime getDate() {
return date;
}
Scenario
@Override
@Convert("EnumConverter")
@Column(name = "SCENARIO")
public Scenario getScenario() {
return scenario;
}
Scenario is an enum with values OUT(1),IN(2),