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.EntityAssociation;
10 import org.omg.uml.foundation.core.UmlAssociation;
11
12
13
14
15
16
17
18 public abstract class EntityAssociationLogic
19 extends AssociationFacadeLogicImpl
20 implements EntityAssociation
21 {
22
23
24
25
26 protected Object metaObject;
27
28
29
30
31
32 protected EntityAssociationLogic(Object metaObjectIn, String context)
33 {
34 super((UmlAssociation)metaObjectIn, getContext(context));
35 this.metaObject = metaObjectIn;
36 }
37
38
39
40
41
42
43 private static String getContext(String context)
44 {
45 if (context == null)
46 {
47 context = "org.andromda.metafacades.uml.EntityAssociation";
48 }
49 return context;
50 }
51
52
53
54
55 @Override
56 public void resetMetafacadeContext(String context)
57 {
58 if (!this.contextRoot)
59 {
60 context = getContext(context);
61 setMetafacadeContext (context);
62 }
63 }
64
65
66
67
68
69 public boolean isEntityAssociationMetaType()
70 {
71 return true;
72 }
73
74
75
76
77
78
79
80 protected abstract String handleGetTableName();
81
82 private String __tableName1a;
83 private boolean __tableName1aSet = false;
84
85
86
87
88
89
90 public final String getTableName()
91 {
92 String tableName1a = this.__tableName1a;
93 if (!this.__tableName1aSet)
94 {
95
96 tableName1a = handleGetTableName();
97
98 this.__tableName1a = tableName1a;
99 if (isMetafacadePropertyCachingEnabled())
100 {
101 this.__tableName1aSet = true;
102 }
103 }
104 return tableName1a;
105 }
106
107
108
109
110
111 protected abstract String handleGetSchema();
112
113 private String __schema2a;
114 private boolean __schema2aSet = false;
115
116
117
118
119
120 public final String getSchema()
121 {
122 String schema2a = this.__schema2a;
123 if (!this.__schema2aSet)
124 {
125
126 schema2a = handleGetSchema();
127
128 this.__schema2a = schema2a;
129 if (isMetafacadePropertyCachingEnabled())
130 {
131 this.__schema2aSet = true;
132 }
133 }
134 return schema2a;
135 }
136
137
138
139
140
141 protected abstract boolean handleIsEntityAssociation();
142
143 private boolean __entityAssociation3a;
144 private boolean __entityAssociation3aSet = false;
145
146
147
148
149
150 public final boolean isEntityAssociation()
151 {
152 boolean entityAssociation3a = this.__entityAssociation3a;
153 if (!this.__entityAssociation3aSet)
154 {
155
156 entityAssociation3a = handleIsEntityAssociation();
157
158 this.__entityAssociation3a = entityAssociation3a;
159 if (isMetafacadePropertyCachingEnabled())
160 {
161 this.__entityAssociation3aSet = true;
162 }
163 }
164 return entityAssociation3a;
165 }
166
167
168
169
170
171 @Override
172 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
173 {
174 super.validateInvariants(validationMessages);
175 }
176 }