1 package com.bonevich.erj.mof.impl.model;
2 import java.lang.reflect.Method;
3 import java.util.*;
4
5 public abstract class ErjModelElementImpl extends ru.novosoft.mdf.impl.MDFObjectImpl implements com.bonevich.erj.mof.interfaces.model.ModelElement
6 {
7 public ErjModelElementImpl(ru.novosoft.mdf.impl.MDFOutermostPackageImpl r)
8 {
9 super(r);
10 }
11 protected void mdfReplaceData( ru.novosoft.mdf.ext.MDFObject srcarg, Class base)
12 {
13 super.mdfReplaceData(srcarg, base);
14 if (srcarg instanceof com.bonevich.erj.mof.interfaces.model.ModelElement && com.bonevich.erj.mof.interfaces.model.ModelElement.class.isAssignableFrom(base))
15 {
16 com.bonevich.erj.mof.impl.model.ErjModelElementImpl src = (com.bonevich.erj.mof.impl.model.ErjModelElementImpl)srcarg;
17 setName(src.getName());
18 setIdentifier(src.getIdentifier());
19 setDescription(src.getDescription());
20 }
21 }
22 // implementing: com.bonevich.erj.mof.interfaces.model.ModelElement
23 public Set mdfGetElementContents()
24 {
25 Set ret = super.mdfGetElementContents();
26 ret.remove( null );
27 return ret;
28 }
29 public Class mdfGetInterfaceClass()
30 {
31 return com.bonevich.erj.mof.interfaces.model.ModelElement.class;
32 }
33 protected void cleanup()
34 {
35 super.cleanup();
36 }
37 public void canBeElementAdded( ru.novosoft.mdf.impl.MDFListImpl list, int collectionId, Object newElement )
38 {
39 switch( collectionId )
40 {
41 default: super.canBeElementAdded( list, collectionId, newElement );
42 }
43 }
44 public void elementAdded( ru.novosoft.mdf.impl.MDFListImpl list, int collectionId, int position, Object newElement )
45 {
46 switch( collectionId )
47 {
48 default: super.elementAdded( list, collectionId, position, newElement );
49 }
50 }
51 public void elementRemoved( ru.novosoft.mdf.impl.MDFListImpl list, int collectionId, int position, Object removedObject )
52 {
53 switch( collectionId )
54 {
55 default: super.elementRemoved( list, collectionId, position, removedObject );
56 }
57 }
58 public void mdfSetValue(String feature, Object value)
59 {
60 if ("identifier".equals(feature))
61 {
62 setIdentifier(((String)value));
63 return;
64 }
65 if ("description".equals(feature))
66 {
67 setDescription(((String)value));
68 return;
69 }
70 if ("name".equals(feature))
71 {
72 setName(((String)value));
73 return;
74 }
75 super.mdfSetValue(feature, value);
76 }
77 public Class mdfGetFeatureElementType(String k)
78 {
79 return super.mdfGetFeatureElementType(k);
80 }
81 public Class mdfGetFeatureType(String k)
82 {
83 if ("identifier".equals(k))
84 {
85 return String.class;
86 }
87 if ("description".equals(k))
88 {
89 return String.class;
90 }
91 if ("name".equals(k))
92 {
93 return String.class;
94 }
95 return super.mdfGetFeatureType(k);
96 }
97 public Object mdfGetValue(String feature)
98 {
99 if ("identifier".equals(feature))
100 {
101 return getIdentifier();
102 }
103 if ("description".equals(feature))
104 {
105 return getDescription();
106 }
107 if ("name".equals(feature))
108 {
109 return getName();
110 }
111 return super.mdfGetValue( feature );
112 }
113 public void mdfRemoveValue(String feature, Object existingValue)
114 {
115 super.mdfRemoveValue(feature, existingValue);
116 }
117 private String _name108 = null;
118 private final static Method _name108_setMethod = mdfGetMethod1(com.bonevich.erj.mof.impl.model.ErjModelElementImpl.class, "setName", String.class);
119 public final String getName()
120 {
121 checkExists();
122 return ((String)_name108);
123 }
124 public final void setName(String newValue)
125 {
126 operationStarted();
127 try
128 {
129 if (_name108 != ((String)newValue))
130 {
131 String __saved = _name108;
132 _name108 = ((String)newValue);
133 if (needUndo())
134 {
135 logPropertySet(_name108_setMethod, __saved, ((String)newValue));
136 }
137 if (needEvent())
138 {
139 firePropertySet("name", __saved, ((String)newValue));
140 }
141 }
142 }
143 finally
144 {
145 operationFinished();
146 }
147 }
148 private String _identifier109 = null;
149 private final static Method _identifier109_setMethod = mdfGetMethod1(com.bonevich.erj.mof.impl.model.ErjModelElementImpl.class, "setIdentifier", String.class);
150 public final String getIdentifier()
151 {
152 checkExists();
153 return ((String)_identifier109);
154 }
155 public final void setIdentifier(String newValue)
156 {
157 operationStarted();
158 try
159 {
160 if (_identifier109 != ((String)newValue))
161 {
162 String __saved = _identifier109;
163 _identifier109 = ((String)newValue);
164 if (needUndo())
165 {
166 logPropertySet(_identifier109_setMethod, __saved, ((String)newValue));
167 }
168 if (needEvent())
169 {
170 firePropertySet("identifier", __saved, ((String)newValue));
171 }
172 }
173 }
174 finally
175 {
176 operationFinished();
177 }
178 }
179 private String _description110 = null;
180 private final static Method _description110_setMethod = mdfGetMethod1(com.bonevich.erj.mof.impl.model.ErjModelElementImpl.class, "setDescription", String.class);
181 public final String getDescription()
182 {
183 checkExists();
184 return ((String)_description110);
185 }
186 public final void setDescription(String newValue)
187 {
188 operationStarted();
189 try
190 {
191 if (_description110 != ((String)newValue))
192 {
193 String __saved = _description110;
194 _description110 = ((String)newValue);
195 if (needUndo())
196 {
197 logPropertySet(_description110_setMethod, __saved, ((String)newValue));
198 }
199 if (needEvent())
200 {
201 firePropertySet("description", __saved, ((String)newValue));
202 }
203 }
204 }
205 finally
206 {
207 operationFinished();
208 }
209 }
210 public Object refGetValue(javax.jmi.reflect.RefObject feature)
211 {
212 if (ru.novosoft.mdf.impl.MDFBaseObjectImpl.checkQualifiedName( feature, "ErjInfoModel","ModelElement","name"))
213 {
214 return getName();
215 }
216 if (ru.novosoft.mdf.impl.MDFBaseObjectImpl.checkQualifiedName( feature, "ErjInfoModel","ModelElement","identifier"))
217 {
218 return getIdentifier();
219 }
220 if (ru.novosoft.mdf.impl.MDFBaseObjectImpl.checkQualifiedName( feature, "ErjInfoModel","ModelElement","description"))
221 {
222 return getDescription();
223 }
224 return super.refGetValue(feature);
225 }
226 public Object refGetValue(String feature)
227 {
228 return mdfGetValue(feature);
229 }
230 public void refSetValue(javax.jmi.reflect.RefObject feature, Object value)
231 {
232 if(ru.novosoft.mdf.impl.MDFBaseObjectImpl.checkQualifiedName( feature, "ErjInfoModel","ModelElement","name" ))
233 {
234 setName((String) value);
235 }
236 else if(ru.novosoft.mdf.impl.MDFBaseObjectImpl.checkQualifiedName( feature, "ErjInfoModel","ModelElement","identifier" ))
237 {
238 setIdentifier((String) value);
239 }
240 else if(ru.novosoft.mdf.impl.MDFBaseObjectImpl.checkQualifiedName( feature, "ErjInfoModel","ModelElement","description" ))
241 {
242 setDescription((String) value);
243 }
244 else
245 {
246 super.refSetValue( feature, value );
247 }
248 }
249 public void refSetValue(String feature, Object value)
250 {
251 mdfSetValue(feature, value);
252 }
253 public Object refInvokeOperation(javax.jmi.reflect.RefObject requestedOperation, java.util.List args)
254 {
255 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
256 }
257 public Object refInvokeOperation(String requestedOperation, java.util.List args)
258 {
259 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
260 }
261 public javax.jmi.reflect.RefObject refMetaObject()
262 {
263 return refGetClass().refMetaObject();
264 }
265 public javax.jmi.reflect.RefPackage refImmediatePackage()
266 {
267 return refGetClass().refImmediatePackage();
268 }
269 public javax.jmi.reflect.RefPackage refOutermostPackage()
270 {
271 return refGetClass().refOutermostPackage();
272 }
273 public String refMofId()
274 {
275 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
276 }
277 private ru.novosoft.mdf.ext.MDFClass thisCls = null;
278 public javax.jmi.reflect.RefClass refGetClass()
279 {
280 if (thisCls == null)
281 {
282 thisCls = (ru.novosoft.mdf.ext.MDFClass)repository.getMetaObject( com.bonevich.erj.mof.interfaces.model.ModelElementClass.class );
283 }
284 return thisCls;
285 }
286 public java.util.Collection refVerify( boolean f )
287 {
288 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
289 }
290 public java.util.List internalGetOppositeCollection( int collectionId, Object o )
291 {
292 switch( collectionId )
293 {
294 }
295 return super.internalGetOppositeCollection( collectionId, o );
296 }
297 }
This page was automatically generated by Maven