| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0 which is available at |
| http://www.eclipse.org/legal/epl-2.0, |
| or the Eclipse Distribution License v. 1.0 which is available at |
| http://www.eclipse.org/org/documents/edl-v10.php. |
| |
| SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause |
| |
| --> |
| |
| <object-persistence version="Eclipse Persistence Services - 1.1.2.v20090612-r4475" xmlns="http://www.eclipse.org/eclipselink/xsds/persistence" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:eclipselink="http://www.eclipse.org/eclipselink/xsds/persistence"> |
| <name>employee</name> |
| <class-mapping-descriptors> |
| <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
| <class>model.dynamic.employee.Address</class> |
| <alias>Address</alias> |
| <primary-key> |
| <field table="DX_ADDRESS" name="ADDR_ID" xsi:type="column"/> |
| </primary-key> |
| <events xsi:type="event-policy"/> |
| <querying xsi:type="query-policy"/> |
| <attribute-mappings> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>city</attribute-name> |
| <field table="DX_ADDRESS" name="CITY" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>country</attribute-name> |
| <field table="DX_ADDRESS" name="COUNTRY" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>id</attribute-name> |
| <field table="DX_ADDRESS" name="ADDR_ID" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>postalCode</attribute-name> |
| <field table="DX_ADDRESS" name="PCODE" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>street</attribute-name> |
| <field table="DX_ADDRESS" name="STREET" xsi:type="column"/> |
| </attribute-mapping> |
| </attribute-mappings> |
| <descriptor-type>independent</descriptor-type> |
| <sequencing> |
| <sequence-name>DX_ADDR_SEQ</sequence-name> |
| <sequence-field table="DX_ADDRESS" name="ADDR_ID" xsi:type="column"/> |
| </sequencing> |
| <instantiation/> |
| <copying xsi:type="instantiation-copy-policy"/> |
| <tables> |
| <table name="DX_ADDRESS"/> |
| </tables> |
| </class-mapping-descriptor> |
| <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
| <class>model.dynamic.employee.Employee</class> |
| <alias>Employee</alias> |
| <primary-key> |
| <field table="DX_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </primary-key> |
| <events xsi:type="event-policy"/> |
| <querying xsi:type="query-policy"/> |
| <attribute-mappings> |
| <attribute-mapping xsi:type="one-to-one-mapping"> |
| <attribute-name>address</attribute-name> |
| <reference-class>model.dynamic.employee.Address</reference-class> |
| <foreign-key> |
| <field-reference> |
| <source-field table="DX_EMPLOYEE" name="ADDR_FK" xsi:type="column"/> |
| <target-field table="DX_ADDRESS" name="ADDR_ID" xsi:type="column"/> |
| </field-reference> |
| </foreign-key> |
| <foreign-key-fields> |
| <field table="DX_EMPLOYEE" name="ADDR_FK" xsi:type="column"/> |
| </foreign-key-fields> |
| <indirection xsi:type="value-holder-indirection-policy"/> |
| <selection-query xsi:type="read-object-query"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>firstName</attribute-name> |
| <field table="DX_EMPLOYEE" name="F_NAME" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>id</attribute-name> |
| <field table="DX_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>lastName</attribute-name> |
| <field table="DX_EMPLOYEE" name="L_NAME" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="aggregate-object-mapping"> |
| <attribute-name>period</attribute-name> |
| <reference-class>model.dynamic.employee.EmploymentPeriod</reference-class> |
| <allow-null>false</allow-null> |
| <field-translations> |
| <field-translation> |
| <source-field name="endDate->DIRECT" xsi:type="column"/> |
| <target-field table="DX_EMPLOYEE" name="END_DATE" xsi:type="column"/> |
| </field-translation> |
| <field-translation> |
| <source-field name="startDate->DIRECT" xsi:type="column"/> |
| <target-field table="DX_EMPLOYEE" name="START_DATE" xsi:type="column"/> |
| </field-translation> |
| </field-translations> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>salary</attribute-name> |
| <field table="DX_SALARY" name="SALARY" xsi:type="column"/> |
| </attribute-mapping> |
| </attribute-mappings> |
| <descriptor-type>independent</descriptor-type> |
| <sequencing> |
| <sequence-name>DX_EMP_SEQ</sequence-name> |
| <sequence-field table="DX_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </sequencing> |
| <instantiation/> |
| <copying xsi:type="instantiation-copy-policy"/> |
| <tables> |
| <table name="DX_EMPLOYEE"/> |
| <table name="DX_SALARY"/> |
| </tables> |
| </class-mapping-descriptor> |
| <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
| <class>model.dynamic.employee.EmploymentPeriod</class> |
| <alias>EmploymentPeriod</alias> |
| <events xsi:type="event-policy"/> |
| <querying xsi:type="query-policy"/> |
| <attribute-mappings> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>endDate</attribute-name> |
| <field name="endDate->DIRECT" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>startDate</attribute-name> |
| <field name="startDate->DIRECT" xsi:type="column"/> |
| </attribute-mapping> |
| </attribute-mappings> |
| <descriptor-type>aggregate</descriptor-type> |
| <caching> |
| <cache-size>-1</cache-size> |
| </caching> |
| <remote-caching> |
| <cache-size>-1</cache-size> |
| </remote-caching> |
| <instantiation/> |
| <copying xsi:type="instantiation-copy-policy"/> |
| </class-mapping-descriptor> |
| </class-mapping-descriptors> |
| <login xsi:type="database-login"> |
| <platform-class>org.eclipse.persistence.platform.database.OraclePlatform</platform-class> |
| <user-name></user-name> |
| </login> |
| </object-persistence> |