<?xml version="1.0" encoding="UTF-8"?>
<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>Crime Portal</display-name>
    <enterprise-beans>
        <session>
            <description>JUnit Session Bean Test Runner</description>
            <ejb-name>EJBTestRunnerEJB</ejb-name>
            <home>org.jboss.test.util.ejb.EJBTestRunnerHome</home>
            <remote>org.jboss.test.util.ejb.EJBTestRunner</remote>
            <ejb-class>org.jboss.test.util.ejb.EJBTestRunnerBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Bean</transaction-type>
        </session>
        <session>
            <ejb-name>ReadAheadEJB</ejb-name>
            <local-home>org.jboss.cmp2.crimeportal.ReadAheadHome</local-home>
            <local>org.jboss.cmp2.crimeportal.ReadAhead</local>
            <ejb-class>org.jboss.cmp2.crimeportal.ReadAheadBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Container</transaction-type>
        </session>
        <entity>
            <display-name>Organization Entity Bean</display-name>
            <ejb-name>OrganizationEJB</ejb-name>
            <local-home>org.jboss.cmp2.crimeportal.OrganizationHome</local-home>
            <local>org.jboss.cmp2.crimeportal.Organization</local>
            <ejb-class>org.jboss.cmp2.crimeportal.OrganizationBean</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>java.lang.String</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-version>2.x</cmp-version>
            <abstract-schema-name>organization</abstract-schema-name>
            <cmp-field>
                <field-name>name</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>description</field-name>
            </cmp-field>
            <primkey-field>name</primkey-field>
            <query>
                <query-method>
                    <method-name>ejbSelectOperatingZipCodes_declaredsql</method-name>
                    <method-params>
                        <method-param>java.lang.String</method-param>
                    </method-params>
                </query-method>
                <ejb-ql/>
            </query>
        </entity>
        <entity>
            <display-name>Gangster Entity Bean</display-name>
            <ejb-name>GangsterEJB</ejb-name>
            <local-home>org.jboss.cmp2.crimeportal.GangsterHome</local-home>
            <local>org.jboss.cmp2.crimeportal.Gangster</local>
            <ejb-class>org.jboss.cmp2.crimeportal.GangsterBean</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>gangster</abstract-schema-name>
            <cmp-field>
                <field-name>gangsterId</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>name</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>nickName</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>badness</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>contactInfo</field-name>
            </cmp-field>
            <primkey-field>gangsterId</primkey-field>
            <query>
                <query-method>
                    <method-name>findBadDudes_ejbql</method-name>
                    <method-params>
                        <method-param>int</method-param>
                    </method-params>
                </query-method>
                <ejb-ql><![CDATA[
               SELECT OBJECT(g)
               FROM gangster g
               WHERE g.badness > ?1
            ]]></ejb-ql>
            </query>
            <query>
                <query-method>
                    <method-name>findBadDudes_jbossql</method-name>
                    <method-params>
                        <method-param>int</method-param>
                    </method-params>
                </query-method>
                <ejb-ql/>
            </query>
            <query>
                <query-method>
                    <method-name>findBadDudes_declaredsql</method-name>
                    <method-params>
                        <method-param>int</method-param>
                    </method-params>
                </query-method>
                <ejb-ql/>
            </query>
            <query>
                <query-method>
                    <method-name>ejbSelectBoss_ejbql</method-name>
                    <method-params>
                        <method-param>java.lang.String</method-param>
                    </method-params>
                </query-method>
                <ejb-ql><![CDATA[
               SELECT DISTINCT underling.organization.theBoss
               FROM gangster underling
               WHERE underling.name = ?1 OR underling.nickName = ?1
            ]]></ejb-ql>
            </query>
            <query>
                <query-method>
                    <method-name>ejbSelectBoss_declaredsql</method-name>
                    <method-params>
                        <method-param>java.lang.String</method-param>
                    </method-params>
                </query-method>
                <ejb-ql/>
            </query>
            <query>
                <query-method>
                    <method-name>ejbSelectAccomplices</method-name>
                    <method-params>
                        <method-param>org.jboss.cmp2.crimeportal.Gangster</method-param>
                    </method-params>
                </query-method>
                <ejb-ql><![CDATA[
               SELECT DISTINCT OBJECT(g)
               FROM gangster g, IN(g.jobs) j, IN(j.gangsters) accomplice
               WHERE g = ?1 AND accomplice <> ?1
            ]]></ejb-ql>
            </query>
            <query>
                <query-method>
                    <method-name>ejbSelectGeneric</method-name>
                    <method-params>
                        <method-param>java.lang.String</method-param>
                        <method-param>java.lang.Object[]</method-param>
                    </method-params>
                </query-method>
                <ejb-ql/>
            </query>
            <query>
                <query-method>
                    <method-name>findAll_none</method-name>
                    <method-params/>
                </query-method>
                <ejb-ql/>
            </query>
            <query>
                <query-method>
                    <method-name>findAll_onfind</method-name>
                    <method-params/>
                </query-method>
                <ejb-ql/>
            </query>
            <query>
                <query-method>
                    <method-name>findAll_onload</method-name>
                    <method-params/>
                </query-method>
                <ejb-ql/>
            </query>
            <query>
                <query-method>
                    <method-name>findFour</method-name>
                    <method-params/>
                </query-method>
                <ejb-ql/>
            </query>
        </entity>
        <entity>
            <display-name>Job Entity Bean</display-name>
            <ejb-name>JobEJB</ejb-name>
            <local-home>org.jboss.cmp2.crimeportal.JobHome</local-home>
            <local>org.jboss.cmp2.crimeportal.Job</local>
            <ejb-class>org.jboss.cmp2.crimeportal.JobBean</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>java.lang.String</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-version>2.x</cmp-version>
            <abstract-schema-name>job</abstract-schema-name>
            <cmp-field>
                <field-name>name</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>score</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>setupCost</field-name>
            </cmp-field>
            <primkey-field>name</primkey-field>
        </entity>
        <entity>
            <ejb-name>LocationEJB</ejb-name>
            <local-home>org.jboss.cmp2.crimeportal.LocationHome</local-home>
            <local>org.jboss.cmp2.crimeportal.Location</local>
            <ejb-class>org.jboss.cmp2.crimeportal.LocationBean</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>location</abstract-schema-name>
            <cmp-field>
                <field-name>locationID</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>description</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>street</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>city</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>state</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>zipCode</field-name>
            </cmp-field>
            <primkey-field>locationID</primkey-field>
        </entity>
    </enterprise-beans>
    <relationships>
        <ejb-relation>
            <ejb-relation-name>Organization-Gangster</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>org-has-gangsters</ejb-relationship-role-name>
                <multiplicity>One</multiplicity>
                <relationship-role-source>
                    <ejb-name>OrganizationEJB</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>memberGangsters</cmr-field-name>
                    <cmr-field-type>java.util.Set</cmr-field-type>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>gangster-belongs-to-org</ejb-relationship-role-name>
                <multiplicity>Many</multiplicity>
                <cascade-delete/>
                <relationship-role-source>
                    <ejb-name>GangsterEJB</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>organization</cmr-field-name>
                </cmr-field>
            </ejb-relationship-role>
        </ejb-relation>
        <ejb-relation>
            <ejb-relation-name>Gangster-Jobs</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>gangster-has-jobs</ejb-relationship-role-name>
                <multiplicity>Many</multiplicity>
                <relationship-role-source>
                    <ejb-name>GangsterEJB</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>jobs</cmr-field-name>
                    <cmr-field-type>java.util.Set</cmr-field-type>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>job-has-gangsters</ejb-relationship-role-name>
                <multiplicity>Many</multiplicity>
                <relationship-role-source>
                    <ejb-name>JobEJB</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>gangsters</cmr-field-name>
                    <cmr-field-type>java.util.Set</cmr-field-type>
                </cmr-field>
            </ejb-relationship-role>
        </ejb-relation>
        <ejb-relation>
            <ejb-relation-name>Organization-Boss</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>organization-has-a-boss</ejb-relationship-role-name>
                <multiplicity>One</multiplicity>
                <relationship-role-source>
                    <ejb-name>OrganizationEJB</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>theBoss</cmr-field-name>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>boss-runs-an-organization</ejb-relationship-role-name>
                <multiplicity>One</multiplicity>
                <relationship-role-source>
                    <ejb-name>GangsterEJB</ejb-name>
                </relationship-role-source>
            </ejb-relationship-role>
        </ejb-relation>
        <ejb-relation>
            <ejb-relation-name>Gangster-Enemies</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>gangster-has-enemies</ejb-relationship-role-name>
                <multiplicity>Many</multiplicity>
                <relationship-role-source>
                    <ejb-name>GangsterEJB</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>enemies</cmr-field-name>
                    <cmr-field-type>java.util.Set</cmr-field-type>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>enemy-to-gangsters</ejb-relationship-role-name>
                <multiplicity>Many</multiplicity>
                <relationship-role-source>
                    <ejb-name>GangsterEJB</ejb-name>
                </relationship-role-source>
            </ejb-relationship-role>
        </ejb-relation>
        <ejb-relation>
            <ejb-relation-name>Gangster-Hangout</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>gangster-has-a-hangout</ejb-relationship-role-name>
                <multiplicity>One</multiplicity>
                <relationship-role-source>
                    <ejb-name>GangsterEJB</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>hangout</cmr-field-name>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>hangout-for-a-gangster</ejb-relationship-role-name>
                <multiplicity>One</multiplicity>
                <relationship-role-source>
                    <ejb-name>LocationEJB</ejb-name>
                </relationship-role-source>
            </ejb-relationship-role>
        </ejb-relation>
    </relationships>
    <assembly-descriptor>
        <container-transaction>
            <method>
                <ejb-name>OrganizationEJB</ejb-name>
                <method-name>*</method-name>
            </method>
            <method>
                <ejb-name>GangsterEJB</ejb-name>
                <method-name>*</method-name>
            </method>
            <method>
                <ejb-name>JobEJB</ejb-name>
                <method-name>*</method-name>
            </method>
            <method>
                <ejb-name>LocationEJB</ejb-name>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
        <container-transaction>
            <method>
                <ejb-name>ReadAheadEJB</ejb-name>
                <method-name>createGangsterHtmlTable_none</method-name>
            </method>
            <method>
                <ejb-name>ReadAheadEJB</ejb-name>
                <method-name>createGangsterHtmlTable_onload</method-name>
            </method>
            <method>
                <ejb-name>ReadAheadEJB</ejb-name>
                <method-name>createGangsterHtmlTable_onfind</method-name>
            </method>
            <method>
                <ejb-name>ReadAheadEJB</ejb-name>
                <method-name>createGangsterHangoutHtmlTable</method-name>
            </method>
            <trans-attribute>RequiresNew</trans-attribute>
        </container-transaction>
        <container-transaction>
            <method>
                <ejb-name>ReadAheadEJB</ejb-name>
                <method-name>createGangsterHtmlTable_no_tx</method-name>
            </method>
            <method>
                <ejb-name>ReadAheadEJB</ejb-name>
                <method-name>createGangsterHtmlTable_with_tx</method-name>
            </method>
            <trans-attribute>NotSupported</trans-attribute>
        </container-transaction>
    </assembly-descriptor>
</ejb-jar>
