For your base class you would add the following annotation:
@MappedSuperclass
public class BaseLookup implements Serializable {
@Id
@Column (name="ID")
private Long id;
@Column (name="NAME")
private String name;
@Column
private String tag;
// ...getters, setters and ctors, etc.
}
And for your children classes you would do the following:
@Table(name = "CREDITCARDTYPES")
public class CreditCardTypes extends BaseLookup {
// .. perhaps a few other fields, methods, etc...
@Coulmn (name="FIELD1_COLUMN_NAME")
private String field1;
}
And you could do the second class in the same manner:
@Table(name = "PAYMENTTYPES")
public class PaymentTypes extends BaseLookup {
// .. perhaps a few other fields, methods, etc...
@Coulmn (name="FIELD2_COLUMN_NAME")
private String field2;
}