<?xml version="1.0" encoding="UTF-8"?> | |
<object-persistence version="Eclipse Persistence Services - 1.0.1 (Build 20080905)" 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>MeetInTheMiddle</name> | |
<class-mapping-descriptors> | |
<class-mapping-descriptor xsi:type="xml-class-mapping-descriptor"> | |
<class>com.example.customer.Address</class> | |
<alias>Address</alias> | |
<primary-key> | |
<field name="@id" xsi:type="node"/> | |
</primary-key> | |
<events xsi:type="event-policy"/> | |
<querying xsi:type="query-policy"/> | |
<attribute-mappings> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>id</attribute-name> | |
<field name="@id" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>street</attribute-name> | |
<field name="tns:street/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>city</attribute-name> | |
<field name="tns:city/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>province</attribute-name> | |
<field name="tns:province/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>postalCode</attribute-name> | |
<field name="tns:postal-code/text()" xsi:type="node"/> | |
</attribute-mapping> | |
</attribute-mappings> | |
<descriptor-type>aggregate</descriptor-type> | |
<instantiation/> | |
<copying xsi:type="instantiation-copy-policy"/> | |
<namespace-resolver> | |
<namespaces> | |
<namespace> | |
<prefix>tns</prefix> | |
<namespace-uri>urn:customer</namespace-uri> | |
</namespace> | |
</namespaces> | |
</namespace-resolver> | |
<schema xsi:type="schema-file-reference"> | |
<resource>..\src\xsd\jpadas-customer.xsd</resource> | |
<schema-context>/tns:address</schema-context> | |
<node-type>complex-type</node-type> | |
</schema> | |
</class-mapping-descriptor> | |
<class-mapping-descriptor xsi:type="xml-class-mapping-descriptor"> | |
<class>com.example.customer.Customer</class> | |
<alias>Customer</alias> | |
<events xsi:type="event-policy"/> | |
<querying xsi:type="query-policy"/> | |
<attribute-mappings> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>id</attribute-name> | |
<field name="@id" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>firstName</attribute-name> | |
<field name="tns:first-name/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>lastName</attribute-name> | |
<field name="tns:last-name/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-composite-object-mapping"> | |
<attribute-name>billingAddress</attribute-name> | |
<reference-class>com.example.customer.Address</reference-class> | |
<field name="tns:billing-address" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-composite-object-mapping"> | |
<attribute-name>shippingAddress</attribute-name> | |
<reference-class>com.example.customer.Address</reference-class> | |
<field name="tns:shipping-address" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-composite-collection-mapping"> | |
<attribute-name>phoneNumbers</attribute-name> | |
<reference-class>com.example.customer.PhoneNumber</reference-class> | |
<field name="tns:phone-number" xsi:type="node"/> | |
<container xsi:type="container-policy"> | |
<collection-type>java.util.HashSet</collection-type> | |
</container> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-composite-object-mapping"> | |
<attribute-name>spouse</attribute-name> | |
<reference-class>com.example.customer.Spouse</reference-class> | |
<field name="tns:spouse" xsi:type="node"/> | |
</attribute-mapping> | |
</attribute-mappings> | |
<descriptor-type>aggregate</descriptor-type> | |
<amendment> | |
<amendment-class>com.example.customer.eclipselink.DescriptorAfterLoads</amendment-class> | |
<amendment-method>amendCustomerDescriptor</amendment-method> | |
</amendment> | |
<instantiation/> | |
<copying xsi:type="instantiation-copy-policy"/> | |
<namespace-resolver> | |
<namespaces> | |
<namespace> | |
<prefix>tns</prefix> | |
<namespace-uri>urn:customer</namespace-uri> | |
</namespace> | |
</namespaces> | |
</namespace-resolver> | |
<schema xsi:type="schema-file-reference"> | |
<resource>..\src\xsd\jpadas-customer.xsd</resource> | |
<schema-context>/tns:customer</schema-context> | |
<node-type>complex-type</node-type> | |
</schema> | |
</class-mapping-descriptor> | |
<class-mapping-descriptor xsi:type="xml-class-mapping-descriptor"> | |
<class>com.example.customer.PhoneNumber</class> | |
<alias>PhoneNumber</alias> | |
<primary-key> | |
<field name="@id" xsi:type="node"/> | |
</primary-key> | |
<events xsi:type="event-policy"/> | |
<querying xsi:type="query-policy"/> | |
<attribute-mappings> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>id</attribute-name> | |
<field name="@id" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>type</attribute-name> | |
<field name="tns:type/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>number</attribute-name> | |
<field name="tns:number/text()" xsi:type="node"/> | |
</attribute-mapping> | |
</attribute-mappings> | |
<descriptor-type>aggregate</descriptor-type> | |
<instantiation/> | |
<copying xsi:type="instantiation-copy-policy"/> | |
<namespace-resolver> | |
<namespaces> | |
<namespace> | |
<prefix>tns</prefix> | |
<namespace-uri>urn:customer</namespace-uri> | |
</namespace> | |
</namespaces> | |
</namespace-resolver> | |
<schema xsi:type="schema-file-reference"> | |
<resource>..\src\xsd\jpadas-customer.xsd</resource> | |
<schema-context>/tns:phone-number</schema-context> | |
<node-type>complex-type</node-type> | |
</schema> | |
</class-mapping-descriptor> | |
<class-mapping-descriptor xsi:type="xml-class-mapping-descriptor"> | |
<class>com.example.customer.Spouse</class> | |
<alias>Spouse</alias> | |
<events xsi:type="event-policy"/> | |
<querying xsi:type="query-policy"/> | |
<attribute-mappings> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>id</attribute-name> | |
<field name="@id" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>firstName</attribute-name> | |
<field name="tns:first-name/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-direct-mapping"> | |
<attribute-name>lastName</attribute-name> | |
<field name="tns:last-name/text()" xsi:type="node"/> | |
</attribute-mapping> | |
<attribute-mapping xsi:type="xml-object-reference-mapping"> | |
<attribute-name>address</attribute-name> | |
<reference-class>com.example.customer.Address</reference-class> | |
<source-to-target-key-field-association> | |
<field-reference> | |
<source-field name="tns:mailing-address/text()" xsi:type="node"/> | |
<target-field name="@id" xsi:type="node"/> | |
</field-reference> | |
</source-to-target-key-field-association> | |
<source-to-target-key-fields> | |
<field name="tns:mailing-address/text()" xsi:type="node"/> | |
</source-to-target-key-fields> | |
</attribute-mapping> | |
</attribute-mappings> | |
<descriptor-type>aggregate</descriptor-type> | |
<instantiation/> | |
<copying xsi:type="instantiation-copy-policy"/> | |
<namespace-resolver> | |
<namespaces> | |
<namespace> | |
<prefix>tns</prefix> | |
<namespace-uri>urn:customer</namespace-uri> | |
</namespace> | |
</namespaces> | |
</namespace-resolver> | |
<schema xsi:type="schema-file-reference"> | |
<resource>..\src\xsd\jpadas-customer.xsd</resource> | |
<schema-context>/tns:spouse</schema-context> | |
<node-type>complex-type</node-type> | |
</schema> | |
</class-mapping-descriptor> | |
</class-mapping-descriptors> | |
<login xsi:type="xml-login"> | |
<platform-class>org.eclipse.persistence.oxm.platform.SAXPlatform</platform-class> | |
<user-name></user-name> | |
<password></password> | |
</login> | |
</object-persistence> |