1
2
3
4
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import org.andromda.core.metafacade.MetafacadeBase;
9 import org.andromda.core.metafacade.ModelValidationMessage;
10 import org.andromda.metafacades.uml.EntityAttribute;
11 import org.andromda.metafacades.uml.ManageableEntityAssociationEnd;
12 import org.apache.log4j.Logger;
13
14
15
16
17
18
19
20 public abstract class ManageableEntityAssociationEndLogic
21 extends EntityAssociationEndLogicImpl
22 implements ManageableEntityAssociationEnd
23 {
24
25
26
27
28 protected Object metaObject;
29
30
31
32
33
34 protected ManageableEntityAssociationEndLogic(Object metaObjectIn, String context)
35 {
36 super(metaObjectIn, getContext(context));
37 this.metaObject = metaObjectIn;
38 }
39
40
41
42
43 private static final Logger logger = Logger.getLogger(ManageableEntityAssociationEndLogic.class);
44
45
46
47
48
49
50 private static String getContext(String context)
51 {
52 if (context == null)
53 {
54 context = "org.andromda.metafacades.uml.ManageableEntityAssociationEnd";
55 }
56 return context;
57 }
58
59
60
61
62 @Override
63 public void resetMetafacadeContext(String context)
64 {
65 if (!this.contextRoot)
66 {
67 context = getContext(context);
68 setMetafacadeContext (context);
69 }
70 }
71
72
73
74
75
76 public boolean isManageableEntityAssociationEndMetaType()
77 {
78 return true;
79 }
80
81
82
83
84
85
86
87 protected abstract boolean handleIsDisplay();
88
89 private boolean __display1a;
90 private boolean __display1aSet = false;
91
92
93
94
95
96 public final boolean isDisplay()
97 {
98 boolean display1a = this.__display1a;
99 if (!this.__display1aSet)
100 {
101
102 display1a = handleIsDisplay();
103
104 this.__display1a = display1a;
105 if (isMetafacadePropertyCachingEnabled())
106 {
107 this.__display1aSet = true;
108 }
109 }
110 return display1a;
111 }
112
113
114
115 private EntityAttribute __getManageableIdentifier1r;
116 private boolean __getManageableIdentifier1rSet = false;
117
118
119
120
121
122 public final EntityAttribute getManageableIdentifier()
123 {
124 EntityAttribute getManageableIdentifier1r = this.__getManageableIdentifier1r;
125 if (!this.__getManageableIdentifier1rSet)
126 {
127
128 Object result = handleGetManageableIdentifier();
129 MetafacadeBase shieldedResult = this.shieldedElement(result);
130 try
131 {
132 getManageableIdentifier1r = (EntityAttribute)shieldedResult;
133 }
134 catch (ClassCastException ex)
135 {
136
137 ManageableEntityAssociationEndLogic.logger.warn("incorrect metafacade cast for ManageableEntityAssociationEndLogic.getManageableIdentifier EntityAttribute " + result + ": " + shieldedResult);
138 }
139
140 this.__getManageableIdentifier1r = getManageableIdentifier1r;
141 if (isMetafacadePropertyCachingEnabled())
142 {
143 this.__getManageableIdentifier1rSet = true;
144 }
145 }
146 return getManageableIdentifier1r;
147 }
148
149
150
151
152
153 protected abstract Object handleGetManageableIdentifier();
154
155
156
157
158
159 @Override
160 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
161 {
162 super.validateInvariants(validationMessages);
163 }
164 }