1 package com.bonevich.erj.mof.impl.model;
2 import java.lang.reflect.Method;
3 import java.util.*;
4
5 public abstract class ErjAttributeTypeImpl extends ru.novosoft.mdf.impl.MDFObjectImpl implements com.bonevich.erj.mof.interfaces.model.AttributeType, com.bonevich.erj.mof.impl.model.ErjAttributeTypeImplHelper
6 {
7 public ErjAttributeTypeImpl(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.AttributeType && com.bonevich.erj.mof.interfaces.model.AttributeType.class.isAssignableFrom(base))
15 {
16 com.bonevich.erj.mof.impl.model.ErjAttributeTypeImplHelper src = (com.bonevich.erj.mof.impl.model.ErjAttributeTypeImplHelper)srcarg;
17 {
18 List c = new ArrayList( src.getAttributes111() );
19 src.getAttributes111().clear();
20 collectionSetting(_attributes111, c);
21 }
22 }
23 }
24 // implementing: com.bonevich.erj.mof.interfaces.model.AttributeType
25 private java.util.List _attributes111 = new ru.novosoft.mdf.impl.MDFFeatureListImpl( this, 104, true);
26 public java.util.List getAttributes111()
27 {
28 checkExists();
29 return _attributes111;
30 }
31 public Set mdfGetElementContents()
32 {
33 Set ret = super.mdfGetElementContents();
34 ret.remove( null );
35 return ret;
36 }
37 public Class mdfGetInterfaceClass()
38 {
39 return com.bonevich.erj.mof.interfaces.model.AttributeType.class;
40 }
41 protected void cleanup()
42 {
43 _attributes111.clear();
44 super.cleanup();
45 }
46 public void canBeElementAdded( ru.novosoft.mdf.impl.MDFListImpl list, int collectionId, Object newElement )
47 {
48 switch( collectionId )
49 {
50
51 case 104:
52 if (newElement == null)
53 {
54 throw new NullPointerException();
55 }
56 if (mdfGetOutermostPackage() != ((ru.novosoft.mdf.impl.MDFBaseObjectImpl)newElement).mdfGetOutermostPackage())
57 {
58 throw new javax.jmi.reflect.ClosureViolationException( null, null );
59 }
60 if (list.contains( newElement ))
61 {
62 throw new javax.jmi.reflect.DuplicateException( null, null);
63 }
64 if ( ! (newElement instanceof com.bonevich.erj.mof.interfaces.model.Attribute) )
65 {
66 throw new javax.jmi.reflect.TypeMismatchException( null, null, null );
67 }
68 break;
69 default: super.canBeElementAdded( list, collectionId, newElement );
70 }
71 }
72 public void elementAdded( ru.novosoft.mdf.impl.MDFListImpl list, int collectionId, int position, Object newElement )
73 {
74 switch( collectionId )
75 {
76 case 104 :
77 {
78 ((com.bonevich.erj.mof.impl.model.ErjAttributeImpl)newElement).internalRefByType112(this);
79 if (needUndo())
80 {
81 logItemAddAt((ru.novosoft.mdf.impl.MDFListImpl)_attributes111,_addAtMethod, _removeAtMethod, newElement, position);
82 }
83 if ( needEvent() )
84 {
85 fireItemAddAt("com.bonevich.erj.mof.interfaces.model.Types.attributes", newElement, position);
86 }
87 }
88 break;
89 default: super.elementAdded( list, collectionId, position, newElement );
90 }
91 }
92 public void elementRemoved( ru.novosoft.mdf.impl.MDFListImpl list, int collectionId, int position, Object removedObject )
93 {
94 switch( collectionId )
95 {
96 case 104 :
97 {
98 ((com.bonevich.erj.mof.impl.model.ErjAttributeImpl)removedObject).internalUnrefByType112(this);
99 if ( needUndo() )
100 {
101 logItemRemoveAt((ru.novosoft.mdf.impl.MDFListImpl)_attributes111,_removeAtMethod, _addAtMethod, removedObject, position);
102 }
103 if ( needEvent() )
104 {
105 fireItemRemoveAt("com.bonevich.erj.mof.interfaces.model.Types.attributes", removedObject, position);
106 }
107 }
108 break;
109 default: super.elementRemoved( list, collectionId, position, removedObject );
110 }
111 }
112 public void elementSetAt(ru.novosoft.mdf.impl.MDFListImpl list, int collectionId, int position, Object removed, Object added)
113 {
114 switch(collectionId)
115 {
116 case 104:
117 {
118 ((com.bonevich.erj.mof.impl.model.ErjAttributeImpl)added).internalRefByType112(this);
119 ((com.bonevich.erj.mof.impl.model.ErjAttributeImpl)removed).internalUnrefByType112(this);
120 if (needUndo())
121 {
122 logItemSetAt((ru.novosoft.mdf.impl.MDFListImpl)_attributes111,_setAtMethod, removed, added, position);
123 }
124 if ( needEvent() )
125 {
126 fireItemSetAt("com.bonevich.erj.mof.interfaces.model.Types.attributes", removed, added, position);
127 }
128 }
129 break;
130 }
131 }
132 public void mdfSetValue(String feature, Object value)
133 {
134 if ("com.bonevich.erj.mof.interfaces.model.Types.attributes".equals(feature))
135 {
136 collectionSetting(_attributes111, (java.util.Collection)value);
137 return;
138 }
139 super.mdfSetValue(feature, value);
140 }
141 public Class mdfGetFeatureElementType(String k)
142 {
143 if ("com.bonevich.erj.mof.interfaces.model.Types.attributes".equals(k))
144 {
145 return com.bonevich.erj.mof.interfaces.model.Attribute.class;
146 }
147 return super.mdfGetFeatureElementType(k);
148 }
149 public Class mdfGetFeatureType(String k)
150 {
151 if ("com.bonevich.erj.mof.interfaces.model.Types.attributes".equals(k))
152 {
153 return java.util.List.class;
154 }
155 return super.mdfGetFeatureType(k);
156 }
157 public Object mdfGetValue(String feature)
158 {
159 if ("com.bonevich.erj.mof.interfaces.model.Types.attributes".equals(feature))
160 {
161 return getAttributes111();
162 }
163 return super.mdfGetValue( feature );
164 }
165 public void mdfRemoveValue(String feature, Object existingValue)
166 {
167 if ("com.bonevich.erj.mof.interfaces.model.Types.attributes".equals(feature))
168 {
169 _attributes111.remove(((com.bonevich.erj.mof.interfaces.model.Attribute)existingValue));
170 return;
171 }
172 super.mdfRemoveValue(feature, existingValue);
173 }
174 public Object refGetValue(javax.jmi.reflect.RefObject feature)
175 {
176 return super.refGetValue(feature);
177 }
178 public Object refGetValue(String feature)
179 {
180 return mdfGetValue(feature);
181 }
182 public void refSetValue(javax.jmi.reflect.RefObject feature, Object value)
183 {
184
185 {
186 super.refSetValue( feature, value );
187 }
188 }
189 public void refSetValue(String feature, Object value)
190 {
191 mdfSetValue(feature, value);
192 }
193 public Object refInvokeOperation(javax.jmi.reflect.RefObject requestedOperation, java.util.List args)
194 {
195 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
196 }
197 public Object refInvokeOperation(String requestedOperation, java.util.List args)
198 {
199 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
200 }
201 public javax.jmi.reflect.RefObject refMetaObject()
202 {
203 return refGetClass().refMetaObject();
204 }
205 public javax.jmi.reflect.RefPackage refImmediatePackage()
206 {
207 return refGetClass().refImmediatePackage();
208 }
209 public javax.jmi.reflect.RefPackage refOutermostPackage()
210 {
211 return refGetClass().refOutermostPackage();
212 }
213 public String refMofId()
214 {
215 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
216 }
217 private ru.novosoft.mdf.ext.MDFClass thisCls = null;
218 public javax.jmi.reflect.RefClass refGetClass()
219 {
220 if (thisCls == null)
221 {
222 thisCls = (ru.novosoft.mdf.ext.MDFClass)repository.getMetaObject( com.bonevich.erj.mof.interfaces.model.AttributeTypeClass.class );
223 }
224 return thisCls;
225 }
226 public java.util.Collection refVerify( boolean f )
227 {
228 throw new RuntimeException(" !!! NOT IMPLEMENTED !!!");
229 }
230 public java.util.List internalGetOppositeCollection( int collectionId, Object o )
231 {
232 switch( collectionId )
233 {
234 }
235 return super.internalGetOppositeCollection( collectionId, o );
236 }
237 }
This page was automatically generated by Maven