db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdo-comm...@db.apache.org
Subject [Apache JDO Wiki] New: DefaultMappingMetadata
Date Wed, 09 Feb 2005 22:36:36 GMT
   Date: 2005-02-09T14:36:36
   Editor: MichelleCaisse
   Wiki: Apache JDO Wiki
   Page: DefaultMappingMetadata
   URL: http://wiki.apache.org/jdo/DefaultMappingMetadata

   no comment

New Page:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN"
"http://java.sun.com/dtd/jdo_1_0.dtd">

<orm>
    <package name="org.apache.jdo.tck.pc.company">

        <class name="Address" table="address"/>

        <class name="Company" table="companies">
            <field name="companyid" column="id"/>                
            <field name="name" column="name"/>                
            <field name="founded" column="foundeddate"/>                
            <field name="address">
                <embedded>
                    <field name="street" column="street"/>
                    <field name="city" column="city"/>
                    <field name="state" column="state"/>
                    <field name="zipcode" column="zipcode"/>
                    <field name="country" column="country"/>
                </embedded>
            </field>
            <field name="departments" mapped-by="company"/>
        </class>

        <class name="DentalInsurance">
            <inheritance strategy="superclass-table"/>
            <field name="lifetimeOrthoBenefit" column="lifetimeOrthoBenefit"/>
        </class>

        <class name="Department" table="departments">
            <field name="deptid" column="id"/>
            <field name="name" column="name"/>
            <field name="company" column="companyid"/>
            <field name="employees" mapped-by="department">
                <foreign-key/>
            </field>
            <field name="fundedEmps" mapped-by="fundingDept"/>
        </class>

        <class name="Employee" table="employees">
            <inheritance strategy="new-table">
                <discriminator strategy="classname" column="discriminator"/>
            </inheritance>
            <field name="hiredate" column="hiredate"/>
            <field name="weeklyhours" column="weeklyhours"/>
            <field name="dentalInsurance" column="dentalinsurance">
                <foreign-key/>
            </field>
            <field name="medicalInsurance" column="medicalinsurance">
                <foreign-key/>
            </field>
            <field name="department" column="department">
                <foreign-key/>
            </field>
            <field name="fundingDept" column="fundingdept">
                <foreign-key/>
            </field>
            <field name="manager" column="manager">
                <foreign-key/>
            </field>
            <field name="mentor" column="mentor">
                <foreign-key/>
            </field>
            <field name="protege" column="protege">
                <foreign-key/>
            </field>
            <field name="hradvisor" column="hradvisor">
                <foreign-key/>
            </field>
            <field name="reviewedProjects" mapped-by="reviewers"/>
            <field name="projects" mapped-by="members"/>
            <field name="team" mapped-by="manager"/>
            <field name="hradvisees" mapped-by="hradvisor"/>
        </class>

        <class name="FullTimeEmployee" table="employees">
            <inheritance strategy="superclass-table"/>
        </class>

        <class name="Insurance" table="insuranceplans">
            <inheritance strategy="new-table">
                <discriminator strategy="classname" column="discriminator"/>
            <inheritance/>
            <field name="insid" column="insid"/>
            <field name="carrier" column="carrier"/>
            <field name="employee" mapped-by="dentalInsurance"/>
            <field name="employee" mapped-by="medicalInsurance"/>
        </class>

        <class name="MedicalInsurance">
            <inheritance strategy="superclass-table"/>
            <field name="planType" column="planType"/>
        </class>

        <class name="PartTimeEmployee" table="employees">
            <inheritance strategy="superclass-table"/>
        </class>

        <class name="Person" table="employees">
            <inheritance strategy="no-table"/>
            <field name="middlename"/>
            <field name="address">
                <embedded>
                    <field name="street" column="street"/>
                    <field name="city" column="city"/>
                    <field name="state" column="state"/>
                    <field name="zipcode" column="zipcode"/>
                    <field name="country" column="country"/>
                </embedded>
            </field>
    	    <field name="phoneNumbers" >
                <join table="employee_phoneno_type" column="personid" target="empid"/>
                <key column="type"/>
                <value column="phoneno"/>
            </field>
        </class>

        <class name="Project" table="projects">
            <field name="projid" column="projid"/>
            <field name="name" column="name"/>
            <field name="budget" column="budget"/>
            <field name="reviewers">
                <join table="project_reviewer" column="projid"/>
                <element column="reviewer">
            </field>
            <field name="members">
                <join table="project_member" column="projid"/>
                <element column="member"/>
            </field>
        </class>
    </package>
</orm>


Mime
View raw message