Skip to main content

Source code file content

Revision: 114

» Project Revision History

» Checkout URL

soatestingutilities / CompositeWithAdapter / HRAccess-or-mappings.xml

Size: 8676 bytes, 1 line
<?xml version="1.0" encoding="UTF-8"?>
<object-persistence xmlns="http://www.eclipse.org/eclipselink/xsds/persistence" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:eclipselink="http://www.eclipse.org/eclipselink/xsds/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="Eclipse Persistence Services - 2.3.1.v20111018-r10243">
   <name>HRAccess-OR</name>
   <class-mapping-descriptors>
      <class-mapping-descriptor xsi:type="object-relational-class-mapping-descriptor">
         <class>HRAccess.Employees</class>
         <alias>EMPLOYEES</alias>
         <primary-key>
            <field table="EMPLOYEES" name="EMPLOYEE_ID" xsi:type="column"/>
         </primary-key>
         <events/>
         <querying>
            <queries>
               <query name="HRAccessSelect" xsi:type="read-all-query">
                  <criteria operator="equal" xsi:type="relation-expression">
                     <left name="employeeId" xsi:type="query-key-expression">
                        <base xsi:type="base-expression"/>
                     </left>
                     <right xsi:type="parameter-expression">
                        <parameter name="empId" xsi:type="column"/>
                     </right>
                  </criteria>
                  <arguments>
                     <argument name="empId">
                        <type>java.lang.String</type>
                     </argument>
                  </arguments>
                  <reference-class>HRAccess.Employees</reference-class>
                  <container xsi:type="list-container-policy">
                     <collection-type>java.util.Vector</collection-type>
                  </container>
               </query>
            </queries>
         </querying>
         <attribute-mappings>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>employeeId</attribute-name>
               <field table="EMPLOYEES" name="EMPLOYEE_ID" xsi:type="column"/>
               <attribute-classification>java.lang.Integer</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>firstName</attribute-name>
               <field table="EMPLOYEES" name="FIRST_NAME" xsi:type="column"/>
               <attribute-classification>java.lang.String</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>lastName</attribute-name>
               <field table="EMPLOYEES" name="LAST_NAME" xsi:type="column"/>
               <attribute-classification>java.lang.String</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>email</attribute-name>
               <field table="EMPLOYEES" name="EMAIL" xsi:type="column"/>
               <attribute-classification>java.lang.String</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>phoneNumber</attribute-name>
               <field table="EMPLOYEES" name="PHONE_NUMBER" xsi:type="column"/>
               <attribute-classification>java.lang.String</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>hireDate</attribute-name>
               <field table="EMPLOYEES" name="HIRE_DATE" xsi:type="column"/>
               <attribute-classification>java.sql.Timestamp</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>jobId</attribute-name>
               <field table="EMPLOYEES" name="JOB_ID" xsi:type="column"/>
               <attribute-classification>java.lang.String</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>salary</attribute-name>
               <field table="EMPLOYEES" name="SALARY" xsi:type="column"/>
               <attribute-classification>java.math.BigDecimal</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>commissionPct</attribute-name>
               <field table="EMPLOYEES" name="COMMISSION_PCT" xsi:type="column"/>
               <attribute-classification>java.math.BigDecimal</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>managerId</attribute-name>
               <read-only>true</read-only>
               <properties>
                  <property name="fkPlaceholder">
                     <value>true</value>
                  </property>
               </properties>
               <field table="EMPLOYEES" name="MANAGER_ID" xsi:type="column"/>
               <attribute-classification>java.lang.Integer</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="direct-mapping">
               <attribute-name>departmentId</attribute-name>
               <field table="EMPLOYEES" name="DEPARTMENT_ID" xsi:type="column"/>
               <attribute-classification>java.lang.Integer</attribute-classification>
            </attribute-mapping>
            <attribute-mapping xsi:type="one-to-one-mapping">
               <attribute-name>managerId</attribute-name>
               <reference-class>HRAccess.Employees</reference-class>
               <private-owned>true</private-owned>
               <foreign-key>
                  <field-reference>
                     <source-field table="EMPLOYEES" name="MANAGER_ID" xsi:type="column"/>
                     <target-field table="EMPLOYEES" name="EMPLOYEE_ID" xsi:type="column"/>
                  </field-reference>
               </foreign-key>
               <foreign-key-fields>
                  <field table="EMPLOYEES" name="MANAGER_ID" xsi:type="column"/>
               </foreign-key-fields>
               <batch-reading>true</batch-reading>
               <indirection xsi:type="value-holder-indirection-policy"/>
               <selection-query xsi:type="read-object-query">
                  <reference-class>HRAccess.Employees</reference-class>
               </selection-query>
            </attribute-mapping>
            <attribute-mapping xsi:type="one-to-many-mapping">
               <attribute-name>employeesCollection</attribute-name>
               <reference-class>HRAccess.Employees</reference-class>
               <private-owned>true</private-owned>
               <target-foreign-key>
                  <field-reference>
                     <source-field table="EMPLOYEES" name="MANAGER_ID" xsi:type="column"/>
                     <target-field table="EMPLOYEES" name="EMPLOYEE_ID" xsi:type="column"/>
                  </field-reference>
               </target-foreign-key>
               <batch-reading>true</batch-reading>
               <container xsi:type="list-container-policy">
                  <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type>
               </container>
               <indirection xsi:type="value-holder-indirection-policy"/>
               <selection-query xsi:type="read-all-query">
                  <reference-class>HRAccess.Employees</reference-class>
                  <container xsi:type="list-container-policy">
                     <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type>
                  </container>
               </selection-query>
            </attribute-mapping>
         </attribute-mappings>
         <descriptor-type>independent</descriptor-type>
         <caching>
            <cache-type>weak-reference</cache-type>
            <cache-size>-1</cache-size>
            <always-refresh>true</always-refresh>
         </caching>
         <remote-caching>
            <cache-type>weak-reference</cache-type>
            <cache-size>-1</cache-size>
         </remote-caching>
         <instantiation/>
         <copying xsi:type="instantiation-copy-policy"/>
         <tables>
            <table name="EMPLOYEES"/>
         </tables>
         <structure>structureName</structure>
      </class-mapping-descriptor>
   </class-mapping-descriptors>
   <login xsi:type="database-login">
      <platform-class>org.eclipse.persistence.platform.database.oracle.Oracle9Platform</platform-class>
      <connection-url></connection-url>
   </login>
</object-persistence>
 
 
Close
loading
Please Confirm
Close