complexType ejb-relationship-roleType

complexType {http://java.sun.com/xml/ns/j2ee}ejb-relationship-roleType

Abstractfalse (This can be used in an instance)
Target Namespacehttp://java.sun.com/xml/ns/j2ee
Declared Namespacesxmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:j2ee=http://java.sun.com/xml/ns/j2ee
xmlns=http://www.w3.org/2001/XMLSchema


Source

<xsd:complexType name="ejb-relationship-roleType">
    <
xsd:annotation>
        <
xsd:documentation>
The ejb-relationship-roleType describes a role within a
relationship. There are two roles in each relationship.

The ejb-relationship-roleType contains an optional
description; an optional name for the relationship role; a
specification of the multiplicity of the role; an optional
specification of cascade-delete functionality for the role;
the role source; and a declaration of the cmr-field, if any,
by means of which the other side of the relationship is
accessed from the perspective of the role source.

The multiplicity and role-source element are mandatory.

The relationship-role-source element designates an entity
bean by means of an ejb-name element. For bidirectional
relationships, both roles of a relationship must declare a
relationship-role-source element that specifies a cmr-field
in terms of which the relationship is accessed. The lack of
a cmr-field element in an ejb-relationship-role specifies
that the relationship is unidirectional in navigability and
the entity bean that participates in the relationship is
"not aware" of the relationship.

Example:

<ejb-relation>
<ejb-relation-name>Product-LineItem</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>product-has-lineitems
</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>ProductEJB</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
        
</xsd:documentation>
    </
xsd:annotation>
    <
xsd:sequence>
        <
xsd:element name="description" type="j2ee:descriptionType" minOccurs="0"
            
maxOccurs="unbounded"/>
        <
xsd:element name="ejb-relationship-role-name" type="j2ee:string" minOccurs="0">
            <
xsd:annotation>
                <
xsd:documentation>
The ejb-relationship-role-name element defines a
name for a role that is unique within an
ejb-relation. Different relationships can use the
same name for a role.
                
</xsd:documentation>
            </
xsd:annotation>
        </
xsd:element>
        <
xsd:element name="multiplicity" type="j2ee:multiplicityType"/>
        <
xsd:element name="cascade-delete" type="j2ee:emptyType" minOccurs="0">
            <
xsd:annotation>
                <
xsd:documentation>
The cascade-delete element specifies that, within a
particular relationship, the lifetime of one or more
entity beans is dependent upon the lifetime of
another entity bean. The cascade-delete element can
only be specified for an ejb-relationship-role
element contained in an ejb-relation element in
which the other ejb-relationship-role
element specifies a multiplicity of One.
                
</xsd:documentation>
            </
xsd:annotation>
        </
xsd:element>
        <
xsd:element name="relationship-role-source" type="j2ee:relationship-role-sourceType"/>
        <
xsd:element name="cmr-field" type="j2ee:cmr-fieldType" minOccurs="0"/>
    </
xsd:sequence>
    <
xsd:attribute name="id" type="xsd:ID"/>
</
xsd:complexType>


Documentation

	  The ejb-relationship-roleType describes a role within a
	  relationship. There are two roles in each relationship.
	  The ejb-relationship-roleType contains an optional
	  description; an optional name for the relationship role; a
	  specification of the multiplicity of the role; an optional
	  specification of cascade-delete functionality for the role;
	  the role source; and a declaration of the cmr-field, if any,
	  by means of which the other side of the relationship is
	  accessed from the perspective of the role source.
	  The multiplicity and role-source element are mandatory.
	  The relationship-role-source element designates an entity
	  bean by means of an ejb-name element. For bidirectional
	  relationships, both roles of a relationship must declare a
	  relationship-role-source element that specifies a cmr-field
	  in terms of which the relationship is accessed. The lack of
	  a cmr-field element in an ejb-relationship-role specifies
	  that the relationship is unidirectional in navigability and
	  the entity bean that participates in the relationship is
	  "not aware" of the relationship.
	  Example:
	  <ejb-relation>
	      <ejb-relation-name>Product-LineItem</ejb-relation-name>
	      <ejb-relationship-role>
		  <ejb-relationship-role-name>product-has-lineitems
		  </ejb-relationship-role-name>
		  <multiplicity>One</multiplicity>
		  <relationship-role-source>
		  <ejb-name>ProductEJB</ejb-name>
		  </relationship-role-source>
	       </ejb-relationship-role>
	  </ejb-relation>


complexType ejb-relationship-roleType


Stylus Studio XML Schema Library Home
Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio®, a product from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2006 All Rights Reserved.