KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.mof.Model;
2
3
4 /**
5 * org/omg/mof/Model/ConstantClassPOA.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 ConstantClassPOA extends org.omg.PortableServer.Servant JavaDoc
14  implements org.omg.mof.Model.ConstantClassOperations, 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_constant", new java.lang.Integer JavaDoc (0));
23     _methods.put ("_get_all_of_class_constant", new java.lang.Integer JavaDoc (1));
24     _methods.put ("create_constant", new java.lang.Integer JavaDoc (2));
25     _methods.put ("_get_all_of_type_typed_element", new java.lang.Integer JavaDoc (3));
26     _methods.put ("_get_all_of_type_model_element", new java.lang.Integer JavaDoc (4));
27     _methods.put ("ref_is_instance_of", new java.lang.Integer JavaDoc (5));
28     _methods.put ("ref_create_instance", new java.lang.Integer JavaDoc (6));
29     _methods.put ("ref_all_objects", new java.lang.Integer JavaDoc (7));
30     _methods.put ("ref_set_value", new java.lang.Integer JavaDoc (8));
31     _methods.put ("ref_value", new java.lang.Integer JavaDoc (9));
32     _methods.put ("ref_unset_value", new java.lang.Integer JavaDoc (10));
33     _methods.put ("ref_add_value", new java.lang.Integer JavaDoc (11));
34     _methods.put ("ref_add_value_before", new java.lang.Integer JavaDoc (12));
35     _methods.put ("ref_add_value_at", new java.lang.Integer JavaDoc (13));
36     _methods.put ("ref_modify_value", new java.lang.Integer JavaDoc (14));
37     _methods.put ("ref_modify_value_at", new java.lang.Integer JavaDoc (15));
38     _methods.put ("ref_remove_value", new java.lang.Integer JavaDoc (16));
39     _methods.put ("ref_remove_value_at", new java.lang.Integer JavaDoc (17));
40     _methods.put ("ref_immediate_composite", new java.lang.Integer JavaDoc (18));
41     _methods.put ("ref_outermost_composite", new java.lang.Integer JavaDoc (19));
42     _methods.put ("ref_invoke_operation", new java.lang.Integer JavaDoc (20));
43     _methods.put ("ref_mof_id", new java.lang.Integer JavaDoc (21));
44     _methods.put ("ref_meta_object", new java.lang.Integer JavaDoc (22));
45     _methods.put ("ref_itself", new java.lang.Integer JavaDoc (23));
46     _methods.put ("ref_immediate_package", new java.lang.Integer JavaDoc (24));
47     _methods.put ("ref_outermost_package", new java.lang.Integer JavaDoc (25));
48     _methods.put ("ref_delete", new java.lang.Integer JavaDoc (26));
49   }
50
51   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
52                                 org.omg.CORBA.portable.InputStream JavaDoc in,
53                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
54   {
55     org.omg.CORBA.portable.OutputStream JavaDoc out = null;
56     java.lang.Integer JavaDoc __method = (java.lang.Integer JavaDoc)_methods.get ($method);
57     if (__method == null)
58       throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
59
60     switch (__method.intValue ())
61     {
62        case 0: // org/omg/mof/Model/ConstantClass/_get_all_of_type_constant
63
{
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: // org/omg/mof/Model/ConstantClass/_get_all_of_class_constant
72
{
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: // org/omg/mof/Model/ConstantClass/create_constant
81
{
82          try {
83            String JavaDoc name = in.read_string ();
84            String JavaDoc annotation = in.read_string ();
85            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Model/TypedElementClass/_get_all_of_type_typed_element
98
{
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: // org/omg/mof/Model/ModelElementClass/_get_all_of_type_model_element
107
{
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: // org/omg/mof/Reflective/RefObject/ref_is_instance_of
116
{
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: // org/omg/mof/Reflective/RefObject/ref_create_instance
127
{
128          try {
129            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_all_objects
142
{
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: // org/omg/mof/Reflective/RefObject/ref_set_value
152
{
153          try {
154            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
155            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_value
166
{
167          try {
168            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
169            org.omg.CORBA.Any JavaDoc $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: // org/omg/mof/Reflective/RefObject/ref_unset_value
184
{
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: // org/omg/mof/Reflective/RefObject/ref_add_value
196
{
197          try {
198            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
199            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_add_value_before
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            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_add_value_at
228
{
229          try {
230            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
231            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_modify_value
246
{
247          try {
248            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
249            org.omg.CORBA.Any JavaDoc old_element = org.omg.mof.Reflective._ValueTypeHelper.read (in);
250            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_modify_value_at
264
{
265          try {
266            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
267            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_remove_value
282
{
283          try {
284            org.omg.mof.Reflective.RefObject feature = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
285            org.omg.CORBA.Any JavaDoc 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: // org/omg/mof/Reflective/RefObject/ref_remove_value_at
299
{
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: // org/omg/mof/Reflective/RefObject/ref_immediate_composite
316
{
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: // org/omg/mof/Reflective/RefObject/ref_outermost_composite
325
{
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: // org/omg/mof/Reflective/RefObject/ref_invoke_operation
334
{
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 JavaDoc $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: // org/omg/mof/Reflective/RefBaseObject/ref_mof_id
355
{
356          String JavaDoc $result = null;
357          $result = this.ref_mof_id ();
358          out = $rh.createReply();
359          out.write_string ($result);
360          break;
361        }
362
363        case 22: // org/omg/mof/Reflective/RefBaseObject/ref_meta_object
364
{
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: // org/omg/mof/Reflective/RefBaseObject/ref_itself
373
{
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: // org/omg/mof/Reflective/RefBaseObject/ref_immediate_package
383
{
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: // org/omg/mof/Reflective/RefBaseObject/ref_outermost_package
392
{
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: // org/omg/mof/Reflective/RefBaseObject/ref_delete
401
{
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 JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
414     }
415
416     return out;
417   } // _invoke
418

419   // Type-specific CORBA::Object operations
420
private static String JavaDoc[] __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 JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
428   {
429     return (String JavaDoc[])__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 JavaDoc orb)
439   {
440     return ConstantClassHelper.narrow(
441     super._this_object(orb));
442   }
443
444
445 } // class ConstantClassPOA
446
Popular Tags