Hi folks,
I have a schema where all of the classes are defined in 5 interfaces.
There is one base interface: ItemInterface, and 4 sub-interfaces:
GroupInterface, SubSectionInterface, SectionInterface, and
CategoryInterface. The only difference between the sub-interfaces is the
collection of objects which they will contain. Categories will contain
Sections, Sections will contain SubSections, SubSections will contain
Groups, and Groups will contain Items. For the concrete class
implementations I have the following:
public class ItemImpl implements ItemInterface
public class GroupImpl extends ItemImpl implements GroupInterface
public class SubSectionImpl extends ItemImpl implements SubSectionInterface
public class SectionImpl extends ItemImpl implements SectionInterface
public class CategoryImpl extends ItemImpl implements CategoryInterface
So, now to the O/R mapping for OJB. I looked at the advanced O/R page
and have some questions:
1) To start, I have a CD for ItemInterface that looks like:
<class-descriptor class="ItemInterface">
<extent-class class-ref="ItemImpl" />
</class-descriptor>
Now the questions is: Do I need to include an extent descriptor for the
sub interfaces and the sub classes as well, or does that depend on how
the queries will be genereated?
2) Should I define a CD for each sub-interface as well and list the
concrete class? And, for the class ItemImpl I take it I should include
all of the sub-classes in an extent descritot as well?
3) Since the only thing that seperates the sub classes from each other
is the collection of objects that they are allowed to contain (see
above) is it best to map all of the classes onto one table and add an
ojbConcreteClass data member to the ItemImpl class?
Thanks,
Tony
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>