1 package org.omg.mof.Model; 2 3 4 10 11 12 public abstract class ConstantClassPOA extends org.omg.PortableServer.Servant 14 implements org.omg.mof.Model.ConstantClassOperations, org.omg.CORBA.portable.InvokeHandler 15 { 16 17 19 private static java.util.Hashtable _methods = new java.util.Hashtable (); 20 static 21 { 22 _methods.put ("_get_all_of_type_constant", new java.lang.Integer (0)); 23 _methods.put ("_get_all_of_class_constant", new java.lang.Integer (1)); 24 _methods.put ("create_constant", new java.lang.Integer (2)); 25 _methods.put ("_get_all_of_type_typed_element", new java.lang.Integer (3)); 26 _methods.put ("_get_all_of_type_model_element", new java.lang.Integer (4)); 27 _methods.put ("ref_is_instance_of", new java.lang.Integer (5)); 28 _methods.put ("ref_create_instance", new java.lang.Integer (6)); 29 _methods.put ("ref_all_objects", new java.lang.Integer (7)); 30 _methods.put ("ref_set_value", new java.lang.Integer (8)); 31 _methods.put ("ref_value", new java.lang.Integer (9)); 32 _methods.put ("ref_unset_value", new java.lang.Integer (10)); 33 _methods.put ("ref_add_value", new java.lang.Integer (11)); 34 _methods.put ("ref_add_value_before", new java.lang.Integer (12)); 35 _methods.put ("ref_add_value_at", new java.lang.Integer (13)); 36 _methods.put ("ref_modify_value", new java.lang.Integer (14)); 37 _methods.put ("ref_modify_value_at", new java.lang.Integer (15)); 38 _methods.put ("ref_remove_value", new java.lang.Integer (16)); 39 _methods.put ("ref_remove_value_at", new java.lang.Integer (17)); 40 _methods.put ("ref_immediate_composite", new java.lang.Integer (18)); 41 _methods.put ("ref_outermost_composite", new java.lang.Integer (19)); 42 _methods.put ("ref_invoke_operation", new java.lang.Integer (20)); 43 _methods.put ("ref_mof_id", new java.lang.Integer (21)); 44 _methods.put ("ref_meta_object", new java.lang.Integer (22)); 45 _methods.put ("ref_itself", new java.lang.Integer (23)); 46 _methods.put ("ref_immediate_package", new java.lang.Integer (24)); 47 _methods.put ("ref_outermost_package", new java.lang.Integer (25)); 48 _methods.put ("ref_delete", new java.lang.Integer (26)); 49 } 50 51 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 52 org.omg.CORBA.portable.InputStream in, 53 org.omg.CORBA.portable.ResponseHandler $rh) 54 { 55 org.omg.CORBA.portable.OutputStream out = null; 56 java.lang.Integer __method = (java.lang.Integer )_methods.get ($method); 57 if (__method == null) 58 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 59 60 switch (__method.intValue ()) 61 { 62 case 0: { 64 org.omg.mof.Model.Constant $result[] = null; 65 $result = this.all_of_type_constant (); 66 out = $rh.createReply(); 67 org.omg.mof.Model.ConstantSetHelper.write (out, $result); 68 break; 69 } 70 71 case 1: { 73 org.omg.mof.Model.Constant $result[] = null; 74 $result = this.all_of_class_constant (); 75 out = $rh.createReply(); 76 org.omg.mof.Model.ConstantSetHelper.write (out, $result); 77 break; 78 } 79 80 case 2: { 82 try { 83 String name = in.read_string (); 84 String annotation = in.read_string (); 85 org.omg.CORBA.Any value = in.read_any (); 86 org.omg.mof.Model.Constant $result = null; 87 $result = this.create_constant (name, annotation, value); 88 out = $rh.createReply(); 89 org.omg.mof.Model.ConstantHelper.write (out, $result); 90 } catch (org.omg.mof.Reflective.MofError $ex) { 91 out = $rh.createExceptionReply (); 92 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 93 } 94 break; 95 } 96 97 case 3: { 99 org.omg.mof.Model.TypedElement $result[] = null; 100 $result = this.all_of_type_typed_element (); 101 out = $rh.createReply(); 102 org.omg.mof.Model.TypedElementSetHelper.write (out, $result); 103 break; 104 } 105 106 case 4: { 108 org.omg.mof.Model.ModelElement $result[] = null; 109 $result = this.all_of_type_model_element (); 110 out = $rh.createReply(); 111 org.omg.mof.Model.ModelElementSetHelper.write (out, $result); 112 break; 113 } 114 115 case 5: { 117 org.omg.mof.Reflective.RefObject some_class = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 118 boolean consider_subtypes = in.read_boolean (); 119 boolean $result = false; 120 $result = this.ref_is_instance_of (some_class, consider_subtypes); 121 out = $rh.createReply(); 122 out.write_boolean ($result); 123 break; 124 } 125 126 case 6: { 128 try { 129 org.omg.CORBA.Any args[] = org.omg.mof.Reflective.ValueTypeListHelper.read (in); 130 org.omg.mof.Reflective.RefObject $result = null; 131 $result = this.ref_create_instance (args); 132 out = $rh.createReply(); 133 org.omg.mof.Reflective.RefObjectHelper.write (out, $result); 134 } catch (org.omg.mof.Reflective.MofError $ex) { 135 out = $rh.createExceptionReply (); 136 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 137 } 138 break; 139 } 140 141 case 7: { 143 boolean include_subtypes = in.read_boolean (); 144 org.omg.mof.Reflective.RefObject $result[] = null; 145 $result = this.ref_all_objects (include_subtypes); 146 out = $rh.createReply(); 147 org.omg.mof.Reflective.RefObjectSetHelper.write (out, $result); 148 break; 149 } 150 151 case 8: { 153 try { 154 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 155 org.omg.CORBA.Any new_value = org.omg.mof.Reflective._ValueTypeHelper.read (in); 156 this.ref_set_value (feature, new_value); 157 out = $rh.createReply(); 158 } catch (org.omg.mof.Reflective.MofError $ex) { 159 out = $rh.createExceptionReply (); 160 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 161 } 162 break; 163 } 164 165 case 9: { 167 try { 168 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 169 org.omg.CORBA.Any $result = null; 170 $result = this.ref_value (feature); 171 out = $rh.createReply(); 172 out.write_any ($result); 173 } catch (org.omg.mof.Reflective.NotSet $ex) { 174 out = $rh.createExceptionReply (); 175 org.omg.mof.Reflective.NotSetHelper.write (out, $ex); 176 } catch (org.omg.mof.Reflective.MofError $ex) { 177 out = $rh.createExceptionReply (); 178 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 179 } 180 break; 181 } 182 183 case 10: { 185 try { 186 this.ref_unset_value (); 187 out = $rh.createReply(); 188 } catch (org.omg.mof.Reflective.MofError $ex) { 189 out = $rh.createExceptionReply (); 190 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 191 } 192 break; 193 } 194 195 case 11: { 197 try { 198 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 199 org.omg.CORBA.Any new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 200 this.ref_add_value (feature, new_element); 201 out = $rh.createReply(); 202 } catch (org.omg.mof.Reflective.MofError $ex) { 203 out = $rh.createExceptionReply (); 204 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 205 } 206 break; 207 } 208 209 case 12: { 211 try { 212 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 213 org.omg.CORBA.Any new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 214 org.omg.CORBA.Any before_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 215 this.ref_add_value_before (feature, new_element, before_element); 216 out = $rh.createReply(); 217 } catch (org.omg.mof.Reflective.NotFound $ex) { 218 out = $rh.createExceptionReply (); 219 org.omg.mof.Reflective.NotFoundHelper.write (out, $ex); 220 } catch (org.omg.mof.Reflective.MofError $ex) { 221 out = $rh.createExceptionReply (); 222 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 223 } 224 break; 225 } 226 227 case 13: { 229 try { 230 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 231 org.omg.CORBA.Any new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 232 int position = in.read_ulong (); 233 this.ref_add_value_at (feature, new_element, position); 234 out = $rh.createReply(); 235 } catch (org.omg.mof.Reflective.BadPosition $ex) { 236 out = $rh.createExceptionReply (); 237 org.omg.mof.Reflective.BadPositionHelper.write (out, $ex); 238 } catch (org.omg.mof.Reflective.MofError $ex) { 239 out = $rh.createExceptionReply (); 240 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 241 } 242 break; 243 } 244 245 case 14: { 247 try { 248 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 249 org.omg.CORBA.Any old_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 250 org.omg.CORBA.Any new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 251 this.ref_modify_value (feature, old_element, new_element); 252 out = $rh.createReply(); 253 } catch (org.omg.mof.Reflective.NotFound $ex) { 254 out = $rh.createExceptionReply (); 255 org.omg.mof.Reflective.NotFoundHelper.write (out, $ex); 256 } catch (org.omg.mof.Reflective.MofError $ex) { 257 out = $rh.createExceptionReply (); 258 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 259 } 260 break; 261 } 262 263 case 15: { 265 try { 266 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 267 org.omg.CORBA.Any new_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 268 int position = in.read_ulong (); 269 this.ref_modify_value_at (feature, new_element, position); 270 out = $rh.createReply(); 271 } catch (org.omg.mof.Reflective.BadPosition $ex) { 272 out = $rh.createExceptionReply (); 273 org.omg.mof.Reflective.BadPositionHelper.write (out, $ex); 274 } catch (org.omg.mof.Reflective.MofError $ex) { 275 out = $rh.createExceptionReply (); 276 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 277 } 278 break; 279 } 280 281 case 16: { 283 try { 284 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 285 org.omg.CORBA.Any existing_element = org.omg.mof.Reflective._ValueTypeHelper.read (in); 286 this.ref_remove_value (feature, existing_element); 287 out = $rh.createReply(); 288 } catch (org.omg.mof.Reflective.NotFound $ex) { 289 out = $rh.createExceptionReply (); 290 org.omg.mof.Reflective.NotFoundHelper.write (out, $ex); 291 } catch (org.omg.mof.Reflective.MofError $ex) { 292 out = $rh.createExceptionReply (); 293 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 294 } 295 break; 296 } 297 298 case 17: { 300 try { 301 org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 302 int position = in.read_ulong (); 303 this.ref_remove_value_at (feature, position); 304 out = $rh.createReply(); 305 } catch (org.omg.mof.Reflective.BadPosition $ex) { 306 out = $rh.createExceptionReply (); 307 org.omg.mof.Reflective.BadPositionHelper.write (out, $ex); 308 } catch (org.omg.mof.Reflective.MofError $ex) { 309 out = $rh.createExceptionReply (); 310 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 311 } 312 break; 313 } 314 315 case 18: { 317 org.omg.mof.Reflective.RefObject $result = null; 318 $result = this.ref_immediate_composite (); 319 out = $rh.createReply(); 320 org.omg.mof.Reflective.RefObjectHelper.write (out, $result); 321 break; 322 } 323 324 case 19: { 326 org.omg.mof.Reflective.RefObject $result = null; 327 $result = this.ref_outermost_composite (); 328 out = $rh.createReply(); 329 org.omg.mof.Reflective.RefObjectHelper.write (out, $result); 330 break; 331 } 332 333 case 20: { 335 try { 336 org.omg.mof.Reflective.RefObject requested_operation = org.omg.mof.Reflective.DesignatorTypeHelper.read (in); 337 org.omg.mof.Reflective.ValueTypeListHolder args = new org.omg.mof.Reflective.ValueTypeListHolder (); 338 args.value = org.omg.mof.Reflective.ValueTypeListHelper.read (in); 339 org.omg.CORBA.Any $result = null; 340 $result = this.ref_invoke_operation (requested_operation, args); 341 out = $rh.createReply(); 342 out.write_any ($result); 343 org.omg.mof.Reflective.ValueTypeListHelper.write (out, args.value); 344 } catch (org.omg.mof.Reflective.OtherException $ex) { 345 out = $rh.createExceptionReply (); 346 org.omg.mof.Reflective.OtherExceptionHelper.write (out, $ex); 347 } catch (org.omg.mof.Reflective.MofError $ex) { 348 out = $rh.createExceptionReply (); 349 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 350 } 351 break; 352 } 353 354 case 21: { 356 String $result = null; 357 $result = this.ref_mof_id (); 358 out = $rh.createReply(); 359 out.write_string ($result); 360 break; 361 } 362 363 case 22: { 365 org.omg.mof.Reflective.RefObject $result = null; 366 $result = this.ref_meta_object (); 367 out = $rh.createReply(); 368 org.omg.mof.Reflective.RefObjectHelper.write (out, $result); 369 break; 370 } 371 372 case 23: { 374 org.omg.mof.Reflective.RefBaseObject other_object = org.omg.mof.Reflective.RefBaseObjectHelper.read (in); 375 boolean $result = false; 376 $result = this.ref_itself (other_object); 377 out = $rh.createReply(); 378 out.write_boolean ($result); 379 break; 380 } 381 382 case 24: { 384 org.omg.mof.Reflective._RefPackage $result = null; 385 $result = this.ref_immediate_package (); 386 out = $rh.createReply(); 387 org.omg.mof.Reflective._RefPackageHelper.write (out, $result); 388 break; 389 } 390 391 case 25: { 393 org.omg.mof.Reflective._RefPackage $result = null; 394 $result = this.ref_outermost_package (); 395 out = $rh.createReply(); 396 org.omg.mof.Reflective._RefPackageHelper.write (out, $result); 397 break; 398 } 399 400 case 26: { 402 try { 403 this.ref_delete (); 404 out = $rh.createReply(); 405 } catch (org.omg.mof.Reflective.MofError $ex) { 406 out = $rh.createExceptionReply (); 407 org.omg.mof.Reflective.MofErrorHelper.write (out, $ex); 408 } 409 break; 410 } 411 412 default: 413 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 414 } 415 416 return out; 417 } 419 private static String [] __ids = { 421 "IDL:org/omg/mof/Model/ConstantClass:1.0", 422 "IDL:org/omg/mof/Model/TypedElementClass:1.0", 423 "IDL:org/omg/mof/Model/ModelElementClass:1.0", 424 "IDL:org/omg/mof/Reflective/RefObject:1.0", 425 "IDL:org/omg/mof/Reflective/RefBaseObject:1.0"}; 426 427 public String [] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) 428 { 429 return (String [])__ids.clone (); 430 } 431 432 public ConstantClass _this() 433 { 434 return ConstantClassHelper.narrow( 435 super._this_object()); 436 } 437 438 public ConstantClass _this(org.omg.CORBA.ORB orb) 439 { 440 return ConstantClassHelper.narrow( 441 super._this_object(orb)); 442 } 443 444 445 } | Popular Tags |