blob: 52908894ad2fd8a0f2fdf1fc3fca52df8c643fa6 [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, Employee, and Insurance have inheritance strategy "new-table".
PartTimeEmployee, FullTimeEmployee, MedicalInsurance, and DentalInsurance
have inheritance strategy "superclass-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">
<inheritance strategy="superclass-table"/>
<field name="wage" column="WAGE"/>
</class>
<class name="FullTimeEmployee">
<inheritance strategy="superclass-table"/>
<field name="salary" column="SALARY"/>
</class>
<class name="Employee" table="employees">
<inheritance strategy="new-table">
<join column="PERSONID"/>
<discriminator strategy="class-name" column="DISCRIMINATOR"
indexed="true"/>
</inheritance>
<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" table="insuranceplans">
<inheritance strategy="new-table">
<discriminator strategy="class-name" column="DISCRIMINATOR"
indexed="true"/>
</inheritance>
<field name="insid" column="INSID"/>
<field name="carrier" column="CARRIER"/>
<field name="employee" column="EMPLOYEE">
<foreign-key/>
</field>
</class>
<class name="DentalInsurance">
<inheritance strategy="superclass-table"/>
<field name="lifetimeOrthoBenefit" column="LIFETIME_ORTHO_BENEFIT"/>
</class>
<class name="MedicalInsurance">
<inheritance strategy="superclass-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>