1 package org.omg.CORBA; 2 3 4 7 8 public final class SystemExceptionHelper 9 { 10 private static org.omg.CORBA.TypeCode _type = org.omg.CORBA.ORB.init().create_exception_tc( org.omg.CORBA.SystemExceptionHelper.id(),"SystemException",new org.omg.CORBA.StructMember []{new org.omg.CORBA.StructMember ("minor",org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)),null),new org.omg.CORBA.StructMember ("completed",org.omg.CORBA.ORB.init().create_enum_tc(org.omg.CORBA.CompletionStatusHelper.id(),"CompletionStatus",new String []{"COMPLETED_YES","COMPLETED_NO","COMPLETED_MAYBE"}),null)}); 11 12 public static void insert(org.omg.CORBA.Any any, org.omg.CORBA.SystemException s) 13 { 14 any.type(getTypeCode(s)); 15 write(any.create_output_stream (), s); 16 } 17 18 public static org.omg.CORBA.SystemException extract(org.omg.CORBA.Any any) 19 { 20 return read(any.create_input_stream()); 21 } 22 23 public static org.omg.CORBA.TypeCode type() 24 { 25 return _type; 26 } 27 28 public static String id() 29 { 30 return "IDL:omg.org/CORBA/SystemException:1.0"; 31 } 32 33 public static org.omg.CORBA.SystemException read(org.omg.CORBA.portable.InputStream in) 34 { 35 String id=in.read_string(); 36 org.omg.CORBA.SystemException result=getSystemException(id); 37 result.minor=in.read_ulong(); 38 result.completed=org.omg.CORBA.CompletionStatusHelper.read(in); 39 return result; 40 } 41 42 public static void write(org.omg.CORBA.portable.OutputStream out, org.omg.CORBA.SystemException s) 43 { 44 out.write_string(getId(s)); 45 out.write_ulong(s.minor); 46 org.omg.CORBA.CompletionStatusHelper.write(out,s.completed); 47 } 48 49 50 private static org.omg.CORBA.TypeCode getTypeCode 51 (org.omg.CORBA.SystemException s) 52 { 53 if (s instanceof org.omg.CORBA.BAD_CONTEXT ) 54 { 55 return org.omg.CORBA.BAD_CONTEXTHelper.type (); 56 } 57 else if (s instanceof org.omg.CORBA.BAD_INV_ORDER ) 58 { 59 return org.omg.CORBA.BAD_INV_ORDERHelper.type (); 60 } 61 else if (s instanceof org.omg.CORBA.BAD_OPERATION ) 62 { 63 return org.omg.CORBA.BAD_OPERATIONHelper.type (); 64 } 65 else if (s instanceof org.omg.CORBA.BAD_PARAM ) 66 { 67 return org.omg.CORBA.BAD_PARAMHelper.type (); 68 } 69 else if (s instanceof org.omg.CORBA.BAD_TYPECODE ) 70 { 71 return org.omg.CORBA.BAD_TYPECODEHelper.type (); 72 } 73 else if (s instanceof org.omg.CORBA.CODESET_INCOMPATIBLE ) 74 { 75 return org.omg.CORBA.CODESET_INCOMPATIBLEHelper.type (); 76 } 77 else if (s instanceof org.omg.CORBA.COMM_FAILURE ) 78 { 79 return org.omg.CORBA.COMM_FAILUREHelper.type (); 80 } 81 else if (s instanceof org.omg.CORBA.DATA_CONVERSION ) 82 { 83 return org.omg.CORBA.DATA_CONVERSIONHelper.type (); 84 } 85 else if (s instanceof org.omg.CORBA.FREE_MEM ) 86 { 87 return org.omg.CORBA.FREE_MEMHelper.type (); 88 } 89 else if (s instanceof org.omg.CORBA.IMP_LIMIT ) 90 { 91 return org.omg.CORBA.IMP_LIMITHelper.type (); 92 } 93 else if (s instanceof org.omg.CORBA.INITIALIZE ) 94 { 95 return org.omg.CORBA.INITIALIZEHelper.type (); 96 } 97 else if (s instanceof org.omg.CORBA.INTERNAL ) 98 { 99 return org.omg.CORBA.INTERNALHelper.type (); 100 } 101 else if (s instanceof org.omg.CORBA.INTF_REPOS ) 102 { 103 return org.omg.CORBA.INTF_REPOSHelper.type (); 104 } 105 else if (s instanceof org.omg.CORBA.INVALID_TRANSACTION ) 106 { 107 return org.omg.CORBA.INVALID_TRANSACTIONHelper.type (); 108 } 109 else if (s instanceof org.omg.CORBA.INV_FLAG ) 110 { 111 return org.omg.CORBA.INV_FLAGHelper.type (); 112 } 113 else if (s instanceof org.omg.CORBA.INV_IDENT ) 114 { 115 return org.omg.CORBA.INV_IDENTHelper.type (); 116 } 117 else if (s instanceof org.omg.CORBA.INV_OBJREF ) 118 { 119 return org.omg.CORBA.INV_OBJREFHelper.type (); 120 } 121 else if (s instanceof org.omg.CORBA.INV_POLICY ) 122 { 123 return org.omg.CORBA.INV_POLICYHelper.type (); 124 } 125 else if (s instanceof org.omg.CORBA.MARSHAL ) 126 { 127 return org.omg.CORBA.MARSHALHelper.type (); 128 } 129 else if (s instanceof org.omg.CORBA.NO_IMPLEMENT ) 130 { 131 return org.omg.CORBA.NO_IMPLEMENTHelper.type (); 132 } 133 else if (s instanceof org.omg.CORBA.NO_MEMORY ) 134 { 135 return org.omg.CORBA.NO_MEMORYHelper.type (); 136 } 137 else if (s instanceof org.omg.CORBA.NO_PERMISSION ) 138 { 139 return org.omg.CORBA.NO_PERMISSIONHelper.type (); 140 } 141 else if (s instanceof org.omg.CORBA.NO_RESOURCES ) 142 { 143 return org.omg.CORBA.NO_RESOURCESHelper.type (); 144 } 145 else if (s instanceof org.omg.CORBA.NO_RESPONSE ) 146 { 147 return org.omg.CORBA.NO_RESPONSEHelper.type (); 148 } 149 else if (s instanceof org.omg.CORBA.OBJECT_NOT_EXIST ) 150 { 151 return org.omg.CORBA.OBJECT_NOT_EXISTHelper.type (); 152 } 153 else if (s instanceof org.omg.CORBA.OBJ_ADAPTER ) 154 { 155 return org.omg.CORBA.OBJ_ADAPTERHelper.type (); 156 } 157 else if (s instanceof org.omg.CORBA.PERSIST_STORE ) 158 { 159 return org.omg.CORBA.PERSIST_STOREHelper.type (); 160 } 161 else if (s instanceof org.omg.CORBA.TRANSACTION_MODE ) 162 { 163 return org.omg.CORBA.TRANSACTION_MODEHelper.type (); 164 } 165 else if (s instanceof org.omg.CORBA.TRANSACTION_REQUIRED ) 166 { 167 return org.omg.CORBA.TRANSACTION_REQUIREDHelper.type (); 168 } 169 else if (s instanceof org.omg.CORBA.TRANSACTION_ROLLEDBACK ) 170 { 171 return org.omg.CORBA.TRANSACTION_ROLLEDBACKHelper.type (); 172 } 173 else if (s instanceof org.omg.CORBA.TRANSACTION_UNAVAILABLE ) 174 { 175 return org.omg.CORBA.TRANSACTION_UNAVAILABLEHelper.type (); 176 } 177 else if (s instanceof org.omg.CORBA.TRANSIENT ) 178 { 179 return org.omg.CORBA.TRANSIENTHelper.type (); 180 } 181 else if (s instanceof org.omg.CORBA.UNKNOWN ) 182 { 183 return org.omg.CORBA.UNKNOWNHelper.type (); 184 } 185 else 186 { 187 throw new org.omg.CORBA.BAD_PARAM ("unrecognized system exception: " + s.getClass ().getName ()); 188 } 189 } 190 191 192 private static String getId (org.omg.CORBA.SystemException s) 193 { 194 if (s instanceof org.omg.CORBA.BAD_CONTEXT ) 195 { 196 return org.omg.CORBA.BAD_CONTEXTHelper.id (); 197 } 198 else if (s instanceof org.omg.CORBA.BAD_INV_ORDER ) 199 { 200 return org.omg.CORBA.BAD_INV_ORDERHelper.id (); 201 } 202 else if (s instanceof org.omg.CORBA.BAD_OPERATION ) 203 { 204 return org.omg.CORBA.BAD_OPERATIONHelper.id (); 205 } 206 else if (s instanceof org.omg.CORBA.BAD_PARAM ) 207 { 208 return org.omg.CORBA.BAD_PARAMHelper.id (); 209 } 210 else if (s instanceof org.omg.CORBA.BAD_TYPECODE ) 211 { 212 return org.omg.CORBA.BAD_TYPECODEHelper.id (); 213 } 214 else if (s instanceof org.omg.CORBA.CODESET_INCOMPATIBLE ) 215 { 216 return org.omg.CORBA.CODESET_INCOMPATIBLEHelper.id (); 217 } 218 else if (s instanceof org.omg.CORBA.COMM_FAILURE ) 219 { 220 return org.omg.CORBA.COMM_FAILUREHelper.id (); 221 } 222 else if (s instanceof org.omg.CORBA.DATA_CONVERSION ) 223 { 224 return org.omg.CORBA.DATA_CONVERSIONHelper.id (); 225 } 226 else if (s instanceof org.omg.CORBA.FREE_MEM ) 227 { 228 return org.omg.CORBA.FREE_MEMHelper.id (); 229 } 230 else if (s instanceof org.omg.CORBA.IMP_LIMIT ) 231 { 232 return org.omg.CORBA.IMP_LIMITHelper.id (); 233 } 234 else if (s instanceof org.omg.CORBA.INITIALIZE ) 235 { 236 return org.omg.CORBA.INITIALIZEHelper.id (); 237 } 238 else if (s instanceof org.omg.CORBA.INTERNAL ) 239 { 240 return org.omg.CORBA.INTERNALHelper.id (); 241 } 242 else if (s instanceof org.omg.CORBA.INTF_REPOS ) 243 { 244 return org.omg.CORBA.INTF_REPOSHelper.id (); 245 } 246 else if (s instanceof org.omg.CORBA.INVALID_TRANSACTION ) 247 { 248 return org.omg.CORBA.INVALID_TRANSACTIONHelper.id (); 249 } 250 else if (s instanceof org.omg.CORBA.INV_FLAG ) 251 { 252 return org.omg.CORBA.INV_FLAGHelper.id (); 253 } 254 else if (s instanceof org.omg.CORBA.INV_IDENT ) 255 { 256 return org.omg.CORBA.INV_IDENTHelper.id (); 257 } 258 else if (s instanceof org.omg.CORBA.INV_OBJREF ) 259 { 260 return org.omg.CORBA.INV_OBJREFHelper.id (); 261 } 262 else if (s instanceof org.omg.CORBA.INV_POLICY ) 263 { 264 return org.omg.CORBA.INV_POLICYHelper.id (); 265 } 266 else if (s instanceof org.omg.CORBA.MARSHAL ) 267 { 268 return org.omg.CORBA.MARSHALHelper.id (); 269 } 270 else if (s instanceof org.omg.CORBA.NO_IMPLEMENT ) 271 { 272 return org.omg.CORBA.NO_IMPLEMENTHelper.id (); 273 } 274 else if (s instanceof org.omg.CORBA.NO_MEMORY ) 275 { 276 return org.omg.CORBA.NO_MEMORYHelper.id (); 277 } 278 else if (s instanceof org.omg.CORBA.NO_PERMISSION ) 279 { 280 return org.omg.CORBA.NO_PERMISSIONHelper.id (); 281 } 282 else if (s instanceof org.omg.CORBA.NO_RESOURCES ) 283 { 284 return org.omg.CORBA.NO_RESOURCESHelper.id (); 285 } 286 else if (s instanceof org.omg.CORBA.NO_RESPONSE ) 287 { 288 return org.omg.CORBA.NO_RESPONSEHelper.id (); 289 } 290 else if (s instanceof org.omg.CORBA.OBJECT_NOT_EXIST ) 291 { 292 return org.omg.CORBA.OBJECT_NOT_EXISTHelper.id (); 293 } 294 else if (s instanceof org.omg.CORBA.OBJ_ADAPTER ) 295 { 296 return org.omg.CORBA.OBJ_ADAPTERHelper.id (); 297 } 298 else if (s instanceof org.omg.CORBA.PERSIST_STORE ) 299 { 300 return org.omg.CORBA.PERSIST_STOREHelper.id (); 301 } 302 else if (s instanceof org.omg.CORBA.TRANSACTION_MODE ) 303 { 304 return org.omg.CORBA.TRANSACTION_MODEHelper.id (); 305 } 306 else if (s instanceof org.omg.CORBA.TRANSACTION_REQUIRED ) 307 { 308 return org.omg.CORBA.TRANSACTION_REQUIREDHelper.id (); 309 } 310 else if (s instanceof org.omg.CORBA.TRANSACTION_ROLLEDBACK ) 311 { 312 return org.omg.CORBA.TRANSACTION_ROLLEDBACKHelper.id (); 313 } 314 else if (s instanceof org.omg.CORBA.TRANSACTION_UNAVAILABLE ) 315 { 316 return org.omg.CORBA.TRANSACTION_UNAVAILABLEHelper.id (); 317 } 318 else if (s instanceof org.omg.CORBA.TRANSIENT ) 319 { 320 return org.omg.CORBA.TRANSIENTHelper.id (); 321 } 322 else if (s instanceof org.omg.CORBA.UNKNOWN ) 323 { 324 return org.omg.CORBA.UNKNOWNHelper.id (); 325 } 326 else 327 { 328 throw new org.omg.CORBA.BAD_PARAM ("unrecognized system exception: " + s.getClass ().getName ()); 329 } 330 } 331 332 333 private static org.omg.CORBA.SystemException getSystemException (String id) 334 { 335 if (id.equals (org.omg.CORBA.BAD_CONTEXTHelper.id ())) 336 { 337 return new org.omg.CORBA.BAD_CONTEXT (); 338 } 339 else if (id.equals (org.omg.CORBA.BAD_INV_ORDERHelper.id ())) 340 { 341 return new org.omg.CORBA.BAD_INV_ORDER (); 342 } 343 else if (id.equals (org.omg.CORBA.BAD_OPERATIONHelper.id ())) 344 { 345 return new org.omg.CORBA.BAD_OPERATION (); 346 } 347 else if (id.equals (org.omg.CORBA.BAD_PARAMHelper.id ())) 348 { 349 return new org.omg.CORBA.BAD_PARAM (); 350 } 351 else if (id.equals (org.omg.CORBA.BAD_TYPECODEHelper.id ())) 352 { 353 return new org.omg.CORBA.BAD_TYPECODE (); 354 } 355 else if (id.equals (org.omg.CORBA.CODESET_INCOMPATIBLEHelper.id ())) 356 { 357 return new org.omg.CORBA.CODESET_INCOMPATIBLE (); 358 } 359 else if (id.equals (org.omg.CORBA.COMM_FAILUREHelper.id ())) 360 { 361 return new org.omg.CORBA.COMM_FAILURE (); 362 } 363 else if (id.equals (org.omg.CORBA.DATA_CONVERSIONHelper.id ())) 364 { 365 return new org.omg.CORBA.DATA_CONVERSION (); 366 } 367 else if (id.equals (org.omg.CORBA.FREE_MEMHelper.id ())) 368 { 369 return new org.omg.CORBA.FREE_MEM (); 370 } 371 else if (id.equals (org.omg.CORBA.IMP_LIMITHelper.id ())) 372 { 373 return new org.omg.CORBA.IMP_LIMIT (); 374 } 375 else if (id.equals (org.omg.CORBA.INITIALIZEHelper.id ())) 376 { 377 return new org.omg.CORBA.INITIALIZE (); 378 } 379 else if (id.equals (org.omg.CORBA.INTERNALHelper.id ())) 380 { 381 return new org.omg.CORBA.INTERNAL (); 382 } 383 else if (id.equals (org.omg.CORBA.INTF_REPOSHelper.id ())) 384 { 385 return new org.omg.CORBA.INTF_REPOS (); 386 } 387 else if (id.equals (org.omg.CORBA.INVALID_TRANSACTIONHelper.id ())) 388 { 389 return new org.omg.CORBA.INVALID_TRANSACTION (); 390 } 391 else if (id.equals (org.omg.CORBA.INV_FLAGHelper.id ())) 392 { 393 return new org.omg.CORBA.INV_FLAG (); 394 } 395 else if (id.equals (org.omg.CORBA.INV_IDENTHelper.id ())) 396 { 397 return new org.omg.CORBA.INV_IDENT (); 398 } 399 else if (id.equals (org.omg.CORBA.INV_OBJREFHelper.id ())) 400 { 401 return new org.omg.CORBA.INV_OBJREF (); 402 } 403 else if (id.equals (org.omg.CORBA.INV_POLICYHelper.id ())) 404 { 405 return new org.omg.CORBA.INV_POLICY (); 406 } 407 else if (id.equals (org.omg.CORBA.MARSHALHelper.id ())) 408 { 409 return new org.omg.CORBA.MARSHAL (); 410 } 411 else if (id.equals (org.omg.CORBA.NO_IMPLEMENTHelper.id ())) 412 { 413 return new org.omg.CORBA.NO_IMPLEMENT (); 414 } 415 else if (id.equals (org.omg.CORBA.NO_MEMORYHelper.id ())) 416 { 417 return new org.omg.CORBA.NO_MEMORY (); 418 } 419 else if (id.equals (org.omg.CORBA.NO_PERMISSIONHelper.id ())) 420 { 421 return new org.omg.CORBA.NO_PERMISSION (); 422 } 423 else if (id.equals (org.omg.CORBA.NO_RESOURCESHelper.id ())) 424 { 425 return new org.omg.CORBA.NO_RESOURCES (); 426 } 427 else if (id.equals (org.omg.CORBA.NO_RESPONSEHelper.id ())) 428 { 429 return new org.omg.CORBA.NO_RESPONSE (); 430 } 431 else if (id.equals (org.omg.CORBA.OBJECT_NOT_EXISTHelper.id ())) 432 { 433 return new org.omg.CORBA.OBJECT_NOT_EXIST (); 434 } 435 else if (id.equals (org.omg.CORBA.OBJ_ADAPTERHelper.id ())) 436 { 437 return new org.omg.CORBA.OBJ_ADAPTER (); 438 } 439 else if (id.equals (org.omg.CORBA.PERSIST_STOREHelper.id ())) 440 { 441 return new org.omg.CORBA.PERSIST_STORE (); 442 } 443 else if (id.equals (org.omg.CORBA.TRANSACTION_MODEHelper.id ())) 444 { 445 return new org.omg.CORBA.TRANSACTION_MODE (); 446 } 447 else if (id.equals (org.omg.CORBA.TRANSACTION_REQUIREDHelper.id ())) 448 { 449 return new org.omg.CORBA.TRANSACTION_REQUIRED (); 450 } 451 else if (id.equals (org.omg.CORBA.TRANSACTION_ROLLEDBACKHelper.id ())) 452 { 453 return new org.omg.CORBA.TRANSACTION_ROLLEDBACK (); 454 } 455 else if (id.equals (org.omg.CORBA.TRANSACTION_UNAVAILABLEHelper.id ())) 456 { 457 return new org.omg.CORBA.TRANSACTION_UNAVAILABLE (); 458 } 459 else if (id.equals (org.omg.CORBA.TRANSIENTHelper.id ())) 460 { 461 return new org.omg.CORBA.TRANSIENT (); 462 } 463 else if (id.equals (org.omg.CORBA.UNKNOWNHelper.id ())) 464 { 465 return new org.omg.CORBA.UNKNOWN (); 466 } 467 else 468 { 469 throw new org.omg.CORBA.MARSHAL ("wrong or unrecognized id: " + id); 470 } 471 } 472 } 473 | Popular Tags |