KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > dictionary > M2ClassAssociation


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.dictionary;
18
19
20 /**
21  * Abstract Association Definition.
22  *
23  * @author David Caruana
24  *
25  */

26 public abstract class M2ClassAssociation
27 {
28     private String JavaDoc name = null;
29     private Boolean JavaDoc isProtected = null;
30     private String JavaDoc title = null;
31     private String JavaDoc description = null;
32     private String JavaDoc sourceRoleName = null;
33     private Boolean JavaDoc isSourceMandatory = null;
34     private Boolean JavaDoc isSourceMany = null;
35     private String JavaDoc targetClassName = null;
36     private String JavaDoc targetRoleName = null;
37     private Boolean JavaDoc isTargetMandatory = null;
38     private Boolean JavaDoc isTargetMany = null;
39     
40     
41     /*package*/ M2ClassAssociation()
42     {
43     }
44     
45     
46     /*package*/ M2ClassAssociation(String JavaDoc name)
47     {
48         this.name = name;
49     }
50     
51     
52     public boolean isChild()
53     {
54         return this instanceof M2ChildAssociation;
55     }
56     
57
58     public String JavaDoc getName()
59     {
60         return name;
61     }
62     
63     
64     public void setName(String JavaDoc name)
65     {
66         this.name = name;
67     }
68
69     
70     public boolean isProtected()
71     {
72         return isProtected == null ? false : isProtected;
73     }
74     
75     
76     public void setProtected(boolean isProtected)
77     {
78         this.isProtected = isProtected;
79     }
80     
81     
82     public String JavaDoc getTitle()
83     {
84         return title;
85     }
86     
87     
88     public void setTitle(String JavaDoc title)
89     {
90         this.title = title;
91     }
92     
93     
94     public String JavaDoc getDescription()
95     {
96         return description;
97     }
98     
99     
100     public void setDescription(String JavaDoc description)
101     {
102         this.description = description;
103     }
104     
105     
106     public String JavaDoc getSourceRoleName()
107     {
108         return sourceRoleName;
109     }
110     
111     
112     public void setSourceRoleName(String JavaDoc name)
113     {
114         this.sourceRoleName = name;
115     }
116
117
118     public boolean isSourceMandatory()
119     {
120         return isSourceMandatory == null ? true : isSourceMandatory;
121     }
122     
123     
124     public void setSourceMandatory(boolean isSourceMandatory)
125     {
126         this.isSourceMandatory = isSourceMandatory;
127     }
128     
129     
130     public boolean isSourceMany()
131     {
132         return isSourceMany == null ? false : isSourceMany;
133     }
134     
135     
136     public void setSourceMany(boolean isSourceMany)
137     {
138         this.isSourceMany = isSourceMany;
139     }
140     
141     
142     public String JavaDoc getTargetClassName()
143     {
144         return targetClassName;
145     }
146     
147     
148     public void setTargetClassName(String JavaDoc targetClassName)
149     {
150         this.targetClassName = targetClassName;
151     }
152
153     
154     public String JavaDoc getTargetRoleName()
155     {
156         return targetRoleName;
157     }
158     
159     
160     public void setTargetRoleName(String JavaDoc name)
161     {
162         this.targetRoleName = name;
163     }
164
165     
166     public boolean isTargetMandatory()
167     {
168         return isTargetMandatory == null ? false : isTargetMandatory;
169     }
170     
171     
172     public void setTargetMandatory(boolean isTargetMandatory)
173     {
174         this.isTargetMandatory = isTargetMandatory;
175     }
176     
177     
178     public boolean isTargetMany()
179     {
180         return isTargetMany == null ? true : isTargetMany;
181     }
182     
183     
184     public void setTargetMany(boolean isTargetMany)
185     {
186         this.isTargetMany = isTargetMany;
187     }
188     
189 }
190
Popular Tags