Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Specifying Superclass in OXM

Hi Rick,

I like Doug's suggestion of:

<java-type name="model.LargeProject" extends="model.Project"


On 27/09/2010 3:41 PM, douglas clarke wrote:
A little odd that we would use "java-type" and "super-class".

I would suggest either "super-type" or "extends"

<java-type name="model.LargeProject" super-type="model.Project"
<java-type name="model.LargeProject" extends="model.Project"


On 27/09/2010 2:10 PM, Rick Barkhouse wrote:
Hi all,

We currently do not have any way in OXM to specify the superclass of a particular java-type.  This information will be needed for Dynamic JAXB because there will be no underlying Java model to introspect.

I don't think there is a real parallel to the JPA style of specifying inheritance in ORM (e.g. mapped-superclass, inheritance strategy etc), I think we could simply add a "super-class" attribute.  For example:
        <java-type name="" xml-discriminator-node="@ptype" xml-discriminator-value="P">
                <xml-element java-attribute="id" type="java.lang.Integer"/>
                <xml-element java-attribute="desc" type="java.lang.String"/>

        <java-type name="" super-class="" xml-discriminator-value="L">
                <xml-element java-attribute="budget" type="java.lang.Double"/>
Any objections to adding super-class ?  Non-Dynamic users would not need to specify this attribute, but if they did it would override the actual superclass.

Rick Barkhouse | Software Developer, EclipseLink | 613.288.4613
Oracle Development
45 O'Connor Street, Suite 400 | Ottawa, Ontario K1P 1A4

Back to the top