E
Elhanan
hi..
i have the following model,
a Breif, has several AssuredPersons, and several Polices.
each Polices has a Plan.
BUT
an AssuredPerson can have several Plans, from different Polices.
so i was thinking how can i can persists this, how can i be fexible and
allow a person to add a plan to a policy, or allow a policy to add a
plan and relate to a person, and how would i persists this with
hibernate.
so i came up with this:
i would have a PersonPlanLink class which holds a refence to one
AssuredPerson, one Refernce to Policy Class, and would be stored as
collection inside the Brief class. (a bi-di association in hibernate
no?)
so, the AssuredPerson class will have to have a refernce to it's Brief
class, and the Policy Class willl have a reference to it's Breif class
as well, each will recieve a message to a plan, but internally they
will delegate this to the brief class, which really is going to manage
the collection, and have package level setters and getters for
hibernate to persist (is this ok with hibernate?)
also when each one willl be requested to get it's own childen (getPlans
for AssuredPerson) they will query the Brief inorder to get it.
what do you think?
i have the following model,
a Breif, has several AssuredPersons, and several Polices.
each Polices has a Plan.
BUT
an AssuredPerson can have several Plans, from different Polices.
so i was thinking how can i can persists this, how can i be fexible and
allow a person to add a plan to a policy, or allow a policy to add a
plan and relate to a person, and how would i persists this with
hibernate.
so i came up with this:
i would have a PersonPlanLink class which holds a refence to one
AssuredPerson, one Refernce to Policy Class, and would be stored as
collection inside the Brief class. (a bi-di association in hibernate
no?)
so, the AssuredPerson class will have to have a refernce to it's Brief
class, and the Policy Class willl have a reference to it's Breif class
as well, each will recieve a message to a plan, but internally they
will delegate this to the brief class, which really is going to manage
the collection, and have package level setters and getters for
hibernate to persist (is this ok with hibernate?)
also when each one willl be requested to get it's own childen (getPlans
for AssuredPerson) they will query the Brief inorder to get it.
what do you think?