| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Copyright (c) 2018 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. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"> |
| <display-name>DataRegistryJAR</display-name> |
| <enterprise-beans> |
| <entity> |
| <ejb-name>OrderBean</ejb-name> |
| <local-home>dataregistry.LocalOrderHome</local-home> |
| <local>dataregistry.LocalOrder</local> |
| <ejb-class>dataregistry.OrderBean</ejb-class> |
| <persistence-type>Container</persistence-type> |
| <prim-key-class>java.lang.Integer</prim-key-class> |
| <reentrant>false</reentrant> |
| <cmp-version>2.x</cmp-version> |
| <abstract-schema-name>Order</abstract-schema-name> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>discount</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>orderId</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>shipmentInfo</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>status</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>lastUpdate</field-name> |
| </cmp-field> |
| <primkey-field>orderId</primkey-field> |
| <security-identity> |
| <use-caller-identity/> |
| </security-identity> |
| <query> |
| <query-method> |
| <method-name>ejbSelectAll</method-name> |
| <method-params/> |
| </query-method> |
| <result-type-mapping>Local</result-type-mapping> |
| <ejb-ql>SELECT OBJECT(o) |
| FROM Order o</ejb-ql> |
| </query> |
| </entity> |
| <entity> |
| <ejb-name>VendorPartBean</ejb-name> |
| <local-home>dataregistry.LocalVendorPartHome</local-home> |
| <local>dataregistry.LocalVendorPart</local> |
| <ejb-class>dataregistry.VendorPartBean</ejb-class> |
| <persistence-type>Container</persistence-type> |
| <prim-key-class>java.lang.Object</prim-key-class> |
| <reentrant>false</reentrant> |
| <cmp-version>2.x</cmp-version> |
| <abstract-schema-name>VendorPart</abstract-schema-name> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>price</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>description</field-name> |
| </cmp-field> |
| <security-identity> |
| <use-caller-identity/> |
| </security-identity> |
| <query> |
| <query-method> |
| <method-name>ejbSelectTotalPricePerVendor</method-name> |
| <method-params> |
| <method-param>int</method-param> |
| </method-params> |
| </query-method> |
| <ejb-ql>SELECT SUM(vp.price) |
| FROM VendorPart vp |
| WHERE vp.vendor.vendorId = ?1</ejb-ql> |
| </query> |
| <query> |
| <query-method> |
| <method-name>ejbSelectAvgPrice</method-name> |
| <method-params/> |
| </query-method> |
| <ejb-ql>SELECT AVG(vp.price) |
| FROM VendorPart vp</ejb-ql> |
| </query> |
| </entity> |
| <entity> |
| <ejb-name>LineItemBean</ejb-name> |
| <local-home>dataregistry.LocalLineItemHome</local-home> |
| <local>dataregistry.LocalLineItem</local> |
| <ejb-class>dataregistry.LineItemBean</ejb-class> |
| <persistence-type>Container</persistence-type> |
| <prim-key-class>dataregistry.LineItemKey</prim-key-class> |
| <reentrant>false</reentrant> |
| <cmp-version>2.x</cmp-version> |
| <abstract-schema-name>LineItem</abstract-schema-name> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>orderId</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>itemId</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>quantity</field-name> |
| </cmp-field> |
| <security-identity> |
| <use-caller-identity/> |
| </security-identity> |
| <query> |
| <query-method> |
| <method-name>findAll</method-name> |
| <method-params/> |
| </query-method> |
| <ejb-ql>SELECT OBJECT(l) |
| FROM LineItem l</ejb-ql> |
| </query> |
| </entity> |
| <entity> |
| <ejb-name>PartBean</ejb-name> |
| <local-home>dataregistry.LocalPartHome</local-home> |
| <local>dataregistry.LocalPart</local> |
| <ejb-class>dataregistry.PartBean</ejb-class> |
| <persistence-type>Container</persistence-type> |
| <prim-key-class>dataregistry.PartKey</prim-key-class> |
| <reentrant>false</reentrant> |
| <cmp-version>2.x</cmp-version> |
| <abstract-schema-name>Part</abstract-schema-name> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>drawing</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>partNumber</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>revisionDate</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>description</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>revision</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>specification</field-name> |
| </cmp-field> |
| <security-identity> |
| <use-caller-identity/> |
| </security-identity> |
| </entity> |
| <entity> |
| <ejb-name>VendorBean</ejb-name> |
| <local-home>dataregistry.LocalVendorHome</local-home> |
| <local>dataregistry.LocalVendor</local> |
| <ejb-class>dataregistry.VendorBean</ejb-class> |
| <persistence-type>Container</persistence-type> |
| <prim-key-class>dataregistry.VendorKey</prim-key-class> |
| <reentrant>false</reentrant> |
| <cmp-version>2.x</cmp-version> |
| <abstract-schema-name>Vendor</abstract-schema-name> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>phone</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>contact</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>vendorId</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>address</field-name> |
| </cmp-field> |
| <cmp-field> |
| <description>no description</description> |
| <field-name>name</field-name> |
| </cmp-field> |
| <security-identity> |
| <use-caller-identity/> |
| </security-identity> |
| <query> |
| <query-method> |
| <method-name>findByPartialName</method-name> |
| <method-params> |
| <method-param>java.lang.String</method-param> |
| </method-params> |
| </query-method> |
| <ejb-ql>SELECT OBJECT(v) FROM Vendor v |
| WHERE LOCATE(?1, v.name) > 0</ejb-ql> |
| </query> |
| <query> |
| <query-method> |
| <method-name>findByOrder</method-name> |
| <method-params> |
| <method-param>java.lang.Integer</method-param> |
| </method-params> |
| </query-method> |
| <ejb-ql>SELECT DISTINCT |
| l.vendorPart.vendor |
| FROM Order o, IN(o.lineItems) AS l |
| WHERE o.orderId = ?1 ORDER BY l.vendorPart.vendor.name</ejb-ql> |
| </query> |
| </entity> |
| </enterprise-beans> |
| <relationships> |
| <ejb-relation> |
| <ejb-relationship-role> |
| <multiplicity>Many</multiplicity> |
| <relationship-role-source> |
| <ejb-name>LineItemBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>vendorPart</cmr-field-name> |
| </cmr-field> |
| </ejb-relationship-role> |
| <ejb-relationship-role> |
| <multiplicity>One</multiplicity> |
| <relationship-role-source> |
| <ejb-name>VendorPartBean</ejb-name> |
| </relationship-role-source> |
| </ejb-relationship-role> |
| </ejb-relation> |
| <ejb-relation> |
| <ejb-relationship-role> |
| <multiplicity>One</multiplicity> |
| <relationship-role-source> |
| <ejb-name>OrderBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>lineItems</cmr-field-name> |
| <cmr-field-type>java.util.Collection</cmr-field-type> |
| </cmr-field> |
| </ejb-relationship-role> |
| <ejb-relationship-role> |
| <multiplicity>Many</multiplicity> |
| <cascade-delete/> |
| <relationship-role-source> |
| <ejb-name>LineItemBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>order</cmr-field-name> |
| </cmr-field> |
| </ejb-relationship-role> |
| </ejb-relation> |
| <ejb-relation> |
| <ejb-relationship-role> |
| <multiplicity>One</multiplicity> |
| <relationship-role-source> |
| <ejb-name>VendorPartBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>part</cmr-field-name> |
| </cmr-field> |
| </ejb-relationship-role> |
| <ejb-relationship-role> |
| <multiplicity>One</multiplicity> |
| <relationship-role-source> |
| <ejb-name>PartBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>vendorPart</cmr-field-name> |
| </cmr-field> |
| </ejb-relationship-role> |
| </ejb-relation> |
| <ejb-relation> |
| <ejb-relationship-role> |
| <multiplicity>Many</multiplicity> |
| <cascade-delete/> |
| <relationship-role-source> |
| <ejb-name>VendorPartBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>vendor</cmr-field-name> |
| </cmr-field> |
| </ejb-relationship-role> |
| <ejb-relationship-role> |
| <multiplicity>One</multiplicity> |
| <relationship-role-source> |
| <ejb-name>VendorBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>vendorParts</cmr-field-name> |
| <cmr-field-type>java.util.Collection</cmr-field-type> |
| </cmr-field> |
| </ejb-relationship-role> |
| </ejb-relation> |
| <ejb-relation> |
| <ejb-relationship-role> |
| <multiplicity>Many</multiplicity> |
| <relationship-role-source> |
| <ejb-name>PartBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>bomPart</cmr-field-name> |
| </cmr-field> |
| </ejb-relationship-role> |
| <ejb-relationship-role> |
| <multiplicity>One</multiplicity> |
| <relationship-role-source> |
| <ejb-name>PartBean</ejb-name> |
| </relationship-role-source> |
| <cmr-field> |
| <cmr-field-name>parts</cmr-field-name> |
| <cmr-field-type>java.util.Collection</cmr-field-type> |
| </cmr-field> |
| </ejb-relationship-role> |
| </ejb-relation> |
| </relationships> |
| <assembly-descriptor> |
| <container-transaction> |
| <method> |
| <ejb-name>OrderBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getDiscount</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>OrderBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>remove</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>OrderBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>calculateAmmount</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>OrderBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getOrderId</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>OrderBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getNextId</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>OrderBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>setDiscount</method-name> |
| <method-params> |
| <method-param>int</method-param> |
| </method-params> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>VendorPartBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>remove</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>VendorPartBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getPrice</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>LineItemBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>remove</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>LineItemBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getVendorPart</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>LineItemBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getQuantity</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>PartBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>setBomPart</method-name> |
| <method-params> |
| <method-param>dataregistry.LocalPart</method-param> |
| </method-params> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>PartBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>remove</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>PartBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getVendorPart</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>PartBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getParts</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>VendorBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getVendorId</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>VendorBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getName</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>VendorBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>remove</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>VendorBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>addVendorPart</method-name> |
| <method-params> |
| <method-param>dataregistry.LocalVendorPart</method-param> |
| </method-params> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| <container-transaction> |
| <method> |
| <ejb-name>VendorBean</ejb-name> |
| <method-intf>Local</method-intf> |
| <method-name>getContact</method-name> |
| </method> |
| <trans-attribute>Required</trans-attribute> |
| </container-transaction> |
| </assembly-descriptor> |
| </ejb-jar> |