org.apache.openejb.jee
Class EjbRelationshipRole

java.lang.Object
  extended by org.apache.openejb.jee.EjbRelationshipRole

public class EjbRelationshipRole
extends java.lang.Object

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:

Product-LineItem product-has-lineitems One ProductEJB


Field Summary
protected  EmptyType cascadeDelete
           
protected  CmrField cmrField
           
protected  java.util.List<Text> description
           
protected  java.lang.String ejbRelationshipRoleName
           
protected  java.lang.String id
           
protected  Multiplicity multiplicity
           
protected  RelationshipRoleSource relationshipRoleSource
           
 
Constructor Summary
EjbRelationshipRole()
           
 
Method Summary
 boolean getCascadeDelete()
           
 CmrField getCmrField()
           
 java.util.List<Text> getDescription()
           
 java.lang.String getEjbRelationshipRoleName()
           
 java.lang.String getId()
           
 Multiplicity getMultiplicity()
           
 RelationshipRoleSource getRelationshipRoleSource()
           
 void setCascadeDelete(boolean value)
           
 void setCmrField(CmrField value)
           
 void setEjbRelationshipRoleName(java.lang.String value)
           
 void setId(java.lang.String value)
           
 void setMultiplicity(Multiplicity value)
           
 void setRelationshipRoleSource(RelationshipRoleSource value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

protected java.util.List<Text> description

ejbRelationshipRoleName

protected java.lang.String ejbRelationshipRoleName

multiplicity

protected Multiplicity multiplicity

cascadeDelete

protected EmptyType cascadeDelete

relationshipRoleSource

protected RelationshipRoleSource relationshipRoleSource

cmrField

protected CmrField cmrField

id

protected java.lang.String id
Constructor Detail

EjbRelationshipRole

public EjbRelationshipRole()
Method Detail

getDescription

public java.util.List<Text> getDescription()

getEjbRelationshipRoleName

public java.lang.String getEjbRelationshipRoleName()

setEjbRelationshipRoleName

public void setEjbRelationshipRoleName(java.lang.String value)

getMultiplicity

public Multiplicity getMultiplicity()

setMultiplicity

public void setMultiplicity(Multiplicity value)

getCascadeDelete

public boolean getCascadeDelete()

setCascadeDelete

public void setCascadeDelete(boolean value)

getRelationshipRoleSource

public RelationshipRoleSource getRelationshipRoleSource()

setRelationshipRoleSource

public void setRelationshipRoleSource(RelationshipRoleSource value)

getCmrField

public CmrField getCmrField()

setCmrField

public void setCmrField(CmrField value)

getId

public java.lang.String getId()

setId

public void setId(java.lang.String value)


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.