blob: a65c9a1aeb38f7ba5c8370842fa4aa6394afb1b4 [file] [log] [blame]
<html lang=en>
<head>
<meta name="Generated by Rational Rose model" content="D:\work\WTP\org.eclipse.jst.j2ee.core\rose\j2ee.mdl">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Description" content="@since J2EE1.3 The ejb-relationship-role element describes a role within a relationship. There are two roles in each relationship. The ejb-relationship-role element 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 relationship-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 that entity bean that participates in the relationship is not aware of the relationship. @invariant multiplicity != null @invariant roleSource != null @invariant Cascade delete can only be specified in an EJBRelationshipRole element in which the roleSource element specifies a dependent object class. @invariant Cascade delete can only be specified for an EJBRelationshipRole contained in an EJBrelation in which the other EJBRelationshipRole element specifies a multiplicity of One. 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 ...">
<meta name="KeyWords" content="EJBRelationshipRole,Class EJBRelationshipRole,j2ee,model j2ee,">
<a href="../../root.html" target=_top><IMG SRC="../../webviewer/home.gif"BORDER=0></a>
</head>
<body bgcolor = "#FFFFFF">
<p><font FACE="Arial, Geneva" SIZE=3><b>Class&nbsp;EJBRelationshipRole&nbsp;{Analysis}</b></font></p>
<font FACE="Arial, Geneva" SIZE=2><b>Documentation</b></font><BR><font FACE="Arial, Geneva" SIZE=2>@since&nbsp;J2EE1.3
<BR>The&nbsp;ejb-relationship-role&nbsp;element&nbsp;describes&nbsp;a&nbsp;role&nbsp;within&nbsp;a&nbsp;relationship.
<BR>There&nbsp;are&nbsp;two&nbsp;roles&nbsp;in&nbsp;each&nbsp;relationship.&nbsp;The&nbsp;ejb-relationship-role&nbsp;element&nbsp;contains&nbsp;an&nbsp;optional&nbsp;description;&nbsp;an&nbsp;optional&nbsp;name&nbsp;for&nbsp;the&nbsp;relationship&nbsp;role;&nbsp;a&nbsp;specification&nbsp;of&nbsp;the&nbsp;multiplicity&nbsp;of&nbsp;the&nbsp;role;&nbsp;an&nbsp;optional&nbsp;specification&nbsp;of&nbsp;cascade-delete&nbsp;functionality&nbsp;for&nbsp;the&nbsp;role;&nbsp;the&nbsp;role&nbsp;source;&nbsp;and&nbsp;a&nbsp;declaration&nbsp;of&nbsp;the&nbsp;cmr-field,&nbsp;if&nbsp;any,&nbsp;by&nbsp;means&nbsp;of&nbsp;which&nbsp;the&nbsp;other&nbsp;side&nbsp;of&nbsp;the&nbsp;relationship&nbsp;is&nbsp;accessed&nbsp;from&nbsp;the&nbsp;perspective&nbsp;of&nbsp;the&nbsp;role&nbsp;source.&nbsp;The&nbsp;multiplicity&nbsp;and&nbsp;relationship-role-source&nbsp;element&nbsp;are&nbsp;mandatory.&nbsp;The&nbsp;relationship-role-source&nbsp;element&nbsp;designates&nbsp;an&nbsp;entity-bean&nbsp;by&nbsp;means&nbsp;of&nbsp;an&nbsp;ejb-name&nbsp;element.&nbsp;For&nbsp;bidirectional&nbsp;relationships,&nbsp;both&nbsp;roles&nbsp;of&nbsp;a&nbsp;relationship&nbsp;must&nbsp;declare&nbsp;a&nbsp;relationship-role-source&nbsp;element&nbsp;that&nbsp;specifies&nbsp;a&nbsp;cmr-field&nbsp;in&nbsp;terms&nbsp;of&nbsp;which&nbsp;the&nbsp;relationship&nbsp;is&nbsp;accessed.&nbsp;The&nbsp;lack&nbsp;of&nbsp;a&nbsp;cmr-field&nbsp;element&nbsp;in&nbsp;an&nbsp;ejb-relationship-role&nbsp;specifies&nbsp;that&nbsp;the&nbsp;relationship&nbsp;is&nbsp;unidirectional&nbsp;in&nbsp;navigability&nbsp;and&nbsp;that&nbsp;entity&nbsp;bean&nbsp;that&nbsp;participates&nbsp;in&nbsp;the&nbsp;relationship&nbsp;is&nbsp;"not&nbsp;aware"&nbsp;of&nbsp;the&nbsp;relationship.
<BR>
<BR>@invariant&nbsp;multiplicity&nbsp;!=&nbsp;null
<BR>@invariant&nbsp;roleSource&nbsp;!=&nbsp;null
<BR>@invariant&nbsp;Cascade&nbsp;delete&nbsp;can&nbsp;only&nbsp;be&nbsp;specified&nbsp;in&nbsp;an&nbsp;EJBRelationshipRole&nbsp;element&nbsp;in&nbsp;which&nbsp;the&nbsp;roleSource&nbsp;element&nbsp;specifies&nbsp;a&nbsp;dependent&nbsp;object&nbsp;class.&nbsp;
<BR>@invariant&nbsp;Cascade&nbsp;delete&nbsp;can&nbsp;only&nbsp;be&nbsp;specified&nbsp;for&nbsp;an&nbsp;EJBRelationshipRole&nbsp;contained&nbsp;in&nbsp;an&nbsp;EJBrelation&nbsp;in&nbsp;which&nbsp;the&nbsp;other&nbsp;EJBRelationshipRole&nbsp;element&nbsp;specifies&nbsp;a&nbsp;multiplicity&nbsp;of&nbsp;One.
<BR>
<BR>Example:
<BR>&lt;ejb-relation&gt;
<BR>&nbsp;&nbsp;&lt;ejb-relation-name&gt;Product-LineItem&lt;/ejb-relation-name&gt;
<BR>&nbsp;&nbsp;&lt;ejb-relationship-role&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;ejb-relationship-role-name&gt;product-has-lineitems&lt;/ejb-relationship-role-name&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;multiplicity&gt;One&lt;/multiplicity&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;relationship-role-source&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ejb-name&gt;ProductEJB&lt;/ejb-name&gt;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/relationship-role-source&gt;
<BR>&nbsp;&nbsp;&lt;/ejb-relationship-role&gt;
<BR>...</font><BR><BR>
</body>
</html>