EJBRelationshipRole
This type is a class for model objects.
@version 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:
Package: ejbProduct-LineItem ... product-has-lineitems One ProductEJB
Classifier ID: -1
Instance class name: * Unspecified *
Instance class: * Unspecified *
Reference attributes having this type:
CMRField.role
RoleSource.role
Collection attributes having this type:
EJBRelation.relationshipRoles
Attributes Summary description : EString @version J2EE1.4 deprecated, becomes descriptions The description is used by the ejb-jar file producer to provide text describing the ejb relationship role. The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents. roleName : EString Defines a name for a role that is unique within an ejb-relation. Different relationships can use the same name for a role. multiplicity : MultiplicityKind Describes the multiplicity of the role that participates in a relation. The multiplicity element must be one of the two following: One Many cascadeDelete : EBoolean 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 Cascade delete can only be specified for an EJBRelationshipRole contained in an EJBrelation in which the other EJBRelationshipRole element specifies a multiplicity of One. relationship : EJBRelation @ * No description is available * source : RoleSource @ Designates the source of a role that participates in a relationship. A relationship-role-source element uniquely identifies an entity bean. @migration EJB1.1: was ibmejbext::EjbRelationshipRole::sourceEJBName, but that may not be sufficient, as this can now refer to dependent class names or ejb refs cmrField : CMRField @ A declaration of the CMRField, if any, by means of which the other side of the relationship is accessed from the perspective of the role source @migration EJB1.1: Used to be handled via ibmejbext::EjbRole::attributes list descriptions : Description * @version J2EE1.4
Attribute Details
description - @version J2EE1.4 deprecated, becomes descriptions The description is used by the ejb-jar file producer to provide text describing the ejb relationship role. The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents.
Data Type: EString
Default value: unspecified
Required: false
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
roleName - Defines a name for a role that is unique within an ejb-relation. Different relationships can use the same name for a role.
Data Type: EString
Default value: unspecified
Required: false
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
multiplicity - Describes the multiplicity of the role that participates in a relation. The multiplicity element must be one of the two following: One Many
Data Type: MultiplicityKind
Default value: unspecified
Allowed values:
0 - One
1 - Many
Required: false
Changeable: true
Unsettable: true
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
cascadeDelete - 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 Cascade delete can only be specified for an EJBRelationshipRole contained in an EJBrelation in which the other EJBRelationshipRole element specifies a multiplicity of One.
Data Type: EBoolean
Default value: unspecified
Required: false
Changeable: true
Unsettable: true
Many: false
Ordered: true
Lower bound: 0
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
relationship - * No description is available *
Reference Type: EJBRelation @
Containment: false
Container: true
Required: true
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 1
Upper bound: 1
Unique: true
Derived: false
Transient: true
Volatile: false
Opposite: EJBRelation.relationshipRoles
source - Designates the source of a role that participates in a relationship. A relationship-role-source element uniquely identifies an entity bean. @migration EJB1.1: was ibmejbext::EjbRelationshipRole::sourceEJBName, but that may not be sufficient, as this can now refer to dependent class names or ejb refs
Reference Type: RoleSource @
Containment: true
Container: false
Required: true
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 1
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
Opposite: RoleSource.role
cmrField - A declaration of the CMRField, if any, by means of which the other side of the relationship is accessed from the perspective of the role source @migration EJB1.1: Used to be handled via ibmejbext::EjbRole::attributes list
Reference Type: CMRField @
Containment: true
Container: false
Required: true
Changeable: true
Unsettable: false
Many: false
Ordered: true
Lower bound: 1
Upper bound: 1
Unique: true
Derived: false
Transient: false
Volatile: false
Opposite: CMRField.role
descriptions - @version J2EE1.4
Reference Type: Description *
Containment: true
Container: false
Required: false
Changeable: true
Unsettable: false
Many: true
Ordered: true
Lower bound: 0
Upper bound: Unbounded
Unique: true
Derived: false
Transient: false
Volatile: false
(C) COPYRIGHT International Business Machines Corp. 1996-2006