Using Hibernate's JPA annotations, I've mapped a class to an existing table. The table represents insurance plans. There are only minor differences among the types of plan--not enough to justify an inheritance relationship. The problem with this table is depending on the type of plan, one of three columns represents the maximum value that can be contributed to the plan. I can't change this because other applications depend on this arrangement. Depending on the type of plan, I would like to map the appropriate maximum value column to a single property in my class. In other words, I want a single property that represents the maximum no matter what insurance plan type. Can Hibernate easily help with this?
|