Hi,
My domain model consist of a bridge pattern
Code:
interface IEntity {
getId();
getName();
}
class OneEntityImpl implements IEntity{
OrgInteface oi;
getName(){
return oi.getName();
}
getId(){
return oi.getId();
}
}
class TwoEntityImpl implements IEntity{
ProjInteface pi;
getName(){
return pi.getName();
}
getId(){
return pi.getId();
}
}
Class ReferringClass {
Ientity entity;
}
Class OrgInterFaceImpl{
}
ProjInterFaceImpl{
}
Basically my referring class will be accessing OrgInterfaceImpl or ProjInterfaceImpl throgh an inteface Ientity. I will be having tables for OrgInterFaceImpl and ProjIntefaceImpl.
I am not sure,I have conveyed the picture clearly :)
How can I map my Referring class to either of these i.e OrgInterfaceImpl/ProjInterfaceImpl ?
Thanks in advance