blob: 870f65c979f80c1068de446a964c924d7bdad904 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<orm xmlns="https://db.apache.org/jdo/xmlns/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://db.apache.org/jdo/xmlns/orm
https://db.apache.org/jdo/xmlns/orm_3_2.xsd">
<!--
This file contains the schema information when an implementation
has application identity.
Inheritance mapping:
Person has inheritance strategy "new-table".
Employee has inheritance strategy "subclass-table".
PartTimeEmployee and FullTimeEmployee has inheritance strategy "new-table".
Insurance has inheritance strategy "subclass-table".
MedicalInsurance and DentalInsurance have inheritance strategy "new-table".
-->
<package name="org.apache.jdo.tck.pc.company">
<class name="Company" table="companies">
<field name="companyid" column="ID"/>
<field name="name" column="NAME"/>
<field name="founded" column="FOUNDEDDATE"/>
<field name="address">
<embedded null-indicator-column="COUNTRY">
<field name="addrid" column="ADDRID"/>
<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="MeetingRoom" table="meetingrooms">
<field name="roomid" column="ID"/>
<field name="name" column="NAME"/>
</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"/>
<field name="fundedEmps" mapped-by="fundingDept"/>
<field name="employeeOfTheMonth" column="EMP_OF_THE_MONTH"/>
<field name="meetingRooms" table="department_rooms">
<join column="DEPTID"/>
<element column="ROOMID"/>
<order column="ROOM_ORDER"/>
</field>
</class>
<class name="PartTimeEmployee" table="parttimeemployees">
<inheritance strategy="new-table">
<join column="PERSONID"/>
</inheritance>
<field name="wage" column="WAGE"/>
</class>
<class name="FullTimeEmployee" table="fulltimeemployees">
<inheritance strategy="new-table">
<join column="PERSONID"/>
</inheritance>
<field name="salary" column="SALARY"/>
</class>
<class name="Employee">
<inheritance strategy="subclass-table"/>
<field name="hiredate" column="HIREDATE"/>
<field name="weeklyhours" column="WEEKLYHOURS"/>
<field name="dentalInsurance" mapped-by="employee"/>
<field name="medicalInsurance" mapped-by="employee"/>
<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" mapped-by="mentor"/>
<field name="hradvisor" column="HRADVISOR">
<foreign-key/>
</field>
<field name="reviewedProjects" mapped-by="reviewers">
</field>
<field name="projects" mapped-by="members"/>
<field name="team" mapped-by="manager"/>
<field name="hradvisees" mapped-by="hradvisor"/>
</class>
<class name="Person" table="persons">
<inheritance strategy="new-table"/>
<field name="personid" column="PERSONID"/>
<field name="firstname" column="FIRSTNAME"/>
<field name="lastname" column="LASTNAME"/>
<field name="middlename" column="MIDDLENAME"/>
<field name="birthdate" column="BIRTHDATE"/>
<field name="address">
<embedded null-indicator-column="COUNTRY">
<field name="addrid" column="ADDRID"/>
<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" table="employee_phoneno_type" >
<join column="EMPID"/>
<key column="TYPE"/>
<value column="PHONENO"/>
</field>
</class>
<class name="Insurance">
<inheritance strategy="subclass-table"/>
<field name="insid" column="INSID"/>
<field name="carrier" column="CARRIER"/>
<field name="employee" column="EMPLOYEE">
<foreign-key/>
</field>
</class>
<class name="DentalInsurance" table="dentalinsurance">
<inheritance strategy="new-table"/>
<field name="lifetimeOrthoBenefit" column="LIFETIME_ORTHO_BENEFIT"/>
</class>
<class name="MedicalInsurance" table="medicalinsurance">
<inheritance strategy="new-table"/>
<field name="planType" column="PLANTYPE"/>
</class>
<class name="Project" table="projects">
<field name="projid" column="PROJID"/>
<field name="name" column="NAME"/>
<field name="budget">
<column name="BUDGET" jdbc-type="DECIMAL" length="11" scale="2"/>
</field>
<field name="reviewers" table="project_reviewer">
<join column="PROJID">
<foreign-key name="PR_PROJ_FK"/>
</join>
<element column="REVIEWER">
<foreign-key name="PR_REV_FK"/>
</element>
</field>
<field name="members" table="project_member">
<join column="PROJID"/>
<element column="MEMBER"/>
</field>
</class>
</package>
</orm>