1
2
3
4
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import org.andromda.core.metafacade.ModelValidationMessage;
9 import org.andromda.metafacades.uml.EntityAttribute;
10 import org.andromda.metafacades.uml.TypeMappings;
11 import org.omg.uml.foundation.core.Attribute;
12
13
14
15
16
17
18
19 public abstract class EntityAttributeLogic
20 extends AttributeFacadeLogicImpl
21 implements EntityAttribute
22 {
23
24
25
26
27 protected Object metaObject;
28
29
30
31
32
33 protected EntityAttributeLogic(Object metaObjectIn, String context)
34 {
35 super((Attribute)metaObjectIn, getContext(context));
36 this.metaObject = metaObjectIn;
37 }
38
39
40
41
42
43
44 private static String getContext(String context)
45 {
46 if (context == null)
47 {
48 context = "org.andromda.metafacades.uml.EntityAttribute";
49 }
50 return context;
51 }
52
53
54
55
56 @Override
57 public void resetMetafacadeContext(String context)
58 {
59 if (!this.contextRoot)
60 {
61 context = getContext(context);
62 setMetafacadeContext (context);
63 }
64 }
65
66
67
68
69
70 public boolean isEntityAttributeMetaType()
71 {
72 return true;
73 }
74
75
76
77
78
79
80
81 protected abstract String handleGetColumnLength();
82
83 private String __columnLength1a;
84 private boolean __columnLength1aSet = false;
85
86
87
88
89
90 public final String getColumnLength()
91 {
92 String columnLength1a = this.__columnLength1a;
93 if (!this.__columnLength1aSet)
94 {
95
96 columnLength1a = handleGetColumnLength();
97
98 this.__columnLength1a = columnLength1a;
99 if (isMetafacadePropertyCachingEnabled())
100 {
101 this.__columnLength1aSet = true;
102 }
103 }
104 return columnLength1a;
105 }
106
107
108
109
110
111 protected abstract String handleGetColumnName();
112
113 private String __columnName2a;
114 private boolean __columnName2aSet = false;
115
116
117
118
119
120 public final String getColumnName()
121 {
122 String columnName2a = this.__columnName2a;
123 if (!this.__columnName2aSet)
124 {
125
126 columnName2a = handleGetColumnName();
127
128 this.__columnName2a = columnName2a;
129 if (isMetafacadePropertyCachingEnabled())
130 {
131 this.__columnName2aSet = true;
132 }
133 }
134 return columnName2a;
135 }
136
137
138
139
140
141 protected abstract TypeMappings handleGetJdbcMappings();
142
143 private TypeMappings __jdbcMappings3a;
144 private boolean __jdbcMappings3aSet = false;
145
146
147
148
149
150 public final TypeMappings getJdbcMappings()
151 {
152 TypeMappings jdbcMappings3a = this.__jdbcMappings3a;
153 if (!this.__jdbcMappings3aSet)
154 {
155
156 jdbcMappings3a = handleGetJdbcMappings();
157
158 this.__jdbcMappings3a = jdbcMappings3a;
159 if (isMetafacadePropertyCachingEnabled())
160 {
161 this.__jdbcMappings3aSet = true;
162 }
163 }
164 return jdbcMappings3a;
165 }
166
167
168
169
170
171 protected abstract String handleGetJdbcType();
172
173 private String __jdbcType4a;
174 private boolean __jdbcType4aSet = false;
175
176
177
178
179
180 public final String getJdbcType()
181 {
182 String jdbcType4a = this.__jdbcType4a;
183 if (!this.__jdbcType4aSet)
184 {
185
186 jdbcType4a = handleGetJdbcType();
187
188 this.__jdbcType4a = jdbcType4a;
189 if (isMetafacadePropertyCachingEnabled())
190 {
191 this.__jdbcType4aSet = true;
192 }
193 }
194 return jdbcType4a;
195 }
196
197
198
199
200
201 protected abstract TypeMappings handleGetSqlMappings();
202
203 private TypeMappings __sqlMappings5a;
204 private boolean __sqlMappings5aSet = false;
205
206
207
208
209
210 public final TypeMappings getSqlMappings()
211 {
212 TypeMappings sqlMappings5a = this.__sqlMappings5a;
213 if (!this.__sqlMappings5aSet)
214 {
215
216 sqlMappings5a = handleGetSqlMappings();
217
218 this.__sqlMappings5a = sqlMappings5a;
219 if (isMetafacadePropertyCachingEnabled())
220 {
221 this.__sqlMappings5aSet = true;
222 }
223 }
224 return sqlMappings5a;
225 }
226
227
228
229
230
231 protected abstract String handleGetSqlType();
232
233 private String __sqlType6a;
234 private boolean __sqlType6aSet = false;
235
236
237
238
239
240 public final String getSqlType()
241 {
242 String sqlType6a = this.__sqlType6a;
243 if (!this.__sqlType6aSet)
244 {
245
246 sqlType6a = handleGetSqlType();
247
248 this.__sqlType6a = sqlType6a;
249 if (isMetafacadePropertyCachingEnabled())
250 {
251 this.__sqlType6aSet = true;
252 }
253 }
254 return sqlType6a;
255 }
256
257
258
259
260
261 protected abstract boolean handleIsIdentifier();
262
263 private boolean __identifier7a;
264 private boolean __identifier7aSet = false;
265
266
267
268
269
270 public final boolean isIdentifier()
271 {
272 boolean identifier7a = this.__identifier7a;
273 if (!this.__identifier7aSet)
274 {
275
276 identifier7a = handleIsIdentifier();
277
278 this.__identifier7a = identifier7a;
279 if (isMetafacadePropertyCachingEnabled())
280 {
281 this.__identifier7aSet = true;
282 }
283 }
284 return identifier7a;
285 }
286
287
288
289
290
291 protected abstract String handleGetColumnIndex();
292
293 private String __columnIndex8a;
294 private boolean __columnIndex8aSet = false;
295
296
297
298
299
300 public final String getColumnIndex()
301 {
302 String columnIndex8a = this.__columnIndex8a;
303 if (!this.__columnIndex8aSet)
304 {
305
306 columnIndex8a = handleGetColumnIndex();
307
308 this.__columnIndex8a = columnIndex8a;
309 if (isMetafacadePropertyCachingEnabled())
310 {
311 this.__columnIndex8aSet = true;
312 }
313 }
314 return columnIndex8a;
315 }
316
317
318
319
320
321 protected abstract boolean handleIsTransient();
322
323 private boolean __transient9a;
324 private boolean __transient9aSet = false;
325
326
327
328
329
330 public final boolean isTransient()
331 {
332 boolean transient9a = this.__transient9a;
333 if (!this.__transient9aSet)
334 {
335
336 transient9a = handleIsTransient();
337
338 this.__transient9a = transient9a;
339 if (isMetafacadePropertyCachingEnabled())
340 {
341 this.__transient9aSet = true;
342 }
343 }
344 return transient9a;
345 }
346
347
348
349
350
351 protected abstract String handleGetUniqueGroup();
352
353 private String __uniqueGroup10a;
354 private boolean __uniqueGroup10aSet = false;
355
356
357
358
359
360 public final String getUniqueGroup()
361 {
362 String uniqueGroup10a = this.__uniqueGroup10a;
363 if (!this.__uniqueGroup10aSet)
364 {
365
366 uniqueGroup10a = handleGetUniqueGroup();
367
368 this.__uniqueGroup10a = uniqueGroup10a;
369 if (isMetafacadePropertyCachingEnabled())
370 {
371 this.__uniqueGroup10aSet = true;
372 }
373 }
374 return uniqueGroup10a;
375 }
376
377
378
379
380
381
382
383 @Override
384 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
385 {
386 super.validateInvariants(validationMessages);
387 }
388 }