Hi, I am looking to implement something in Hibernate. Not sure if I am going in the right direction. I have a class Task that looks something like this:
Code:
@Entity
@Table(name="task")
public class Task {
@Id
private Long id;
public void setId(Long Id) {this.id = id;}
public Long getId() {return this.id;}
@Column(name="type_id", nullable=false)
private CustomEnumType customEnumType;
}
The idea is that this Class (along with the related classes) is going to be a shared component that other apps are going to use in our team. And each team is free to extend the CustomEnumType (that extends EnumType) to provide their own set of enumerations. Since hibernate requires all the entity mappings to be done in classes only (and not interfaces), I am kind of stuck in making this a generic and re-usable component. Any suggestions or ideas?
Thanks