Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/Examples/DBWS/ExistingMappingFiles"
< EclipseLink | Examples | DBWS
Line 5: | Line 5: | ||
: identical case-sensitive aliases for Descriptors that are common between the projects | : identical case-sensitive aliases for Descriptors that are common between the projects | ||
− | <source lang="xml"> | + | <source lang="xml" enclose="div"> |
− | <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> | + | <?xml version="1.0" encoding="UTF-8"?> |
− | + | <object-persistence version="Eclipse Persistence Services - some version (some build date)" 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>SomeORProject</name> | |
− | + | <class-mapping-descriptors> | |
− | <class-mapping-descriptor xsi:type="xml-class-mapping-descriptor"> | + | <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
− | + | <class>some.package.SomeClass</class> | |
− | + | <alias>SomeAlias</alias> | |
+ | ... | ||
+ | |||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <object-persistence version="Eclipse Persistence Services - some version (some build date)" 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>SomeOXProject</name> | ||
+ | <class-mapping-descriptor xsi:type="xml-class-mapping-descriptor"> | ||
+ | <class>some.package.SomeClass</class> | ||
+ | <alias>SomeAlias</alias> | ||
+ | ... | ||
</source> | </source> | ||
Any existing named queries from the EclipseLink ORM map may be exposed as query operations for the EclipseLink DBWS service; additional Insert/Update/Delete/Query operations can be added. Pre-existing domain classes can be bundled with the service so that they are available at runtime. | Any existing named queries from the EclipseLink ORM map may be exposed as query operations for the EclipseLink DBWS service; additional Insert/Update/Delete/Query operations can be added. Pre-existing domain classes can be bundled with the service so that they are available at runtime. |
Revision as of 14:59, 3 June 2009
Use of pre-existing EclipseLink ORM and OXM mappings
A DBWS service may be constructed using pre-existing EclipseLink ORM and OXM maps (both Project classes and Project deployment XML are supported) with the following naming convention:
- identical case-sensitive aliases for Descriptors that are common between the projects
<?xml version="1.0" encoding="UTF-8"?>
<object-persistence version="Eclipse Persistence Services - some version (some build date)" 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>SomeORProject</name>
<class-mapping-descriptors>
<class-mapping-descriptor xsi:type="relational-class-mapping-descriptor">
<class>some.package.SomeClass</class>
<alias>SomeAlias</alias>
...
<?xml version="1.0" encoding="UTF-8"?>
<object-persistence version="Eclipse Persistence Services - some version (some build date)" 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>SomeOXProject</name>
<class-mapping-descriptor xsi:type="xml-class-mapping-descriptor">
<class>some.package.SomeClass</class>
<alias>SomeAlias</alias>
...
<object-persistence version="Eclipse Persistence Services - some version (some build date)" 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>SomeORProject</name>
<class-mapping-descriptors>
<class-mapping-descriptor xsi:type="relational-class-mapping-descriptor">
<class>some.package.SomeClass</class>
<alias>SomeAlias</alias>
...
<?xml version="1.0" encoding="UTF-8"?>
<object-persistence version="Eclipse Persistence Services - some version (some build date)" 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>SomeOXProject</name>
<class-mapping-descriptor xsi:type="xml-class-mapping-descriptor">
<class>some.package.SomeClass</class>
<alias>SomeAlias</alias>
...
Any existing named queries from the EclipseLink ORM map may be exposed as query operations for the EclipseLink DBWS service; additional Insert/Update/Delete/Query operations can be added. Pre-existing domain classes can be bundled with the service so that they are available at runtime.