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

This page was automatically generated by Maven