KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > dd > EjbRelationshipRole


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.ejb3.dd;
8
9 import java.util.ArrayList JavaDoc;
10 import java.util.List JavaDoc;
11
12 /**
13  * Represents an ejb-relationship-role element of the ejb-jar.xml deployment
14  * descriptor for the 1.4 schema
15  *
16  * @version <tt>$Revision: 1.3.2.1 $</tt>
17  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
18  */

19 public class EjbRelationshipRole
20 {
21
22    private String JavaDoc ejbRelationshipRoleName;
23
24    private String JavaDoc multiplicity;
25
26    private boolean cascadeDelete = false;
27
28    private List JavaDoc ejbRelationshipRoles = new ArrayList JavaDoc();
29
30    private RelationshipRoleSource relationshipRoleSource;;
31
32    private CmrField cmrField;
33
34    public String JavaDoc getEjbRelationshipRoleName()
35    {
36       return ejbRelationshipRoleName;
37    }
38
39    public void setEjbRelationshipRoleName(String JavaDoc ejbRelationName)
40    {
41       this.ejbRelationshipRoleName = ejbRelationName;
42    }
43
44    public String JavaDoc getMultiplicity()
45    {
46       return multiplicity;
47    }
48
49    public void setMultiplicity(String JavaDoc multiplicity)
50    {
51       this.multiplicity = multiplicity;
52    }
53
54    public boolean isCascadeDelete()
55    {
56       return cascadeDelete;
57    }
58
59    public void setCascadeDelete(boolean cascadeDelete)
60    {
61       this.cascadeDelete = cascadeDelete;
62    }
63
64    public List JavaDoc getEjbRelationshipRoles()
65    {
66       return ejbRelationshipRoles;
67    }
68
69    public void setEjbRelationshipRoles(List JavaDoc ejbRelationshipRoles)
70    {
71       this.ejbRelationshipRoles = ejbRelationshipRoles;
72    }
73
74    public void addEjbRelationshipRole(EjbRelationshipRole role)
75    {
76       ejbRelationshipRoles.add(role);
77    }
78
79    public RelationshipRoleSource getRelationshipRoleSource()
80    {
81       return relationshipRoleSource;
82    }
83
84    public void setRelationshipRoleSource(
85          RelationshipRoleSource relationshipRoleSource)
86    {
87       this.relationshipRoleSource = relationshipRoleSource;
88    }
89
90    public CmrField getCmrField()
91    {
92       return cmrField;
93    }
94
95    public void setCmrField(CmrField cmrField)
96    {
97       this.cmrField = cmrField;
98    }
99
100    public String JavaDoc toString()
101    {
102       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
103       sb.append("ejbRelationshipRoleName=").append(ejbRelationshipRoleName);
104       return sb.toString();
105    }
106 }
107
Popular Tags