KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > mof > Model > ReferenceClassPOA


1 package org.omg.mof.Model;
2
3
4 /**
5 * org/omg/mof/Model/ReferenceClassPOA.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.1"
7 * from mof1.idl
8 * lundi 17 mars 2003 15 h 01 CET
9 */

10
11
12 //
13
public abstract class ReferenceClassPOA extends org.omg.PortableServer.Servant JavaDoc
14  implements org.omg.mof.Model.ReferenceClassOperations, org.omg.CORBA.portable.InvokeHandler JavaDoc
15 {
16
17   // Constructors
18

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

442   // Type-specific CORBA::Object operations
443
private static String JavaDoc[] __ids = {
444     "IDL:org/omg/mof/Model/ReferenceClass:1.0",
445     "IDL:org/omg/mof/Model/StructuralFeatureClass:1.0",
446     "IDL:org/omg/mof/Model/TypedElementClass:1.0",
447     "IDL:org/omg/mof/Model/ModelElementClass:1.0",
448     "IDL:org/omg/mof/Reflective/RefObject:1.0",
449     "IDL:org/omg/mof/Reflective/RefBaseObject:1.0",
450     "IDL:org/omg/mof/Model/FeatureClass:1.0"};
451
452   public String JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
453   {
454     return (String JavaDoc[])__ids.clone ();
455   }
456
457   public ReferenceClass _this()
458   {
459     return ReferenceClassHelper.narrow(
460     super._this_object());
461   }
462
463   public ReferenceClass _this(org.omg.CORBA.ORB JavaDoc orb)
464   {
465     return ReferenceClassHelper.narrow(
466     super._this_object(orb));
467   }
468
469
470 } // class ReferenceClassPOA
471
Popular Tags