KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.mof.Model;
2
3
4 /**
5 * org/omg/mof/Model/ContainsPOA.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 ContainsPOA extends org.omg.PortableServer.Servant JavaDoc
14  implements org.omg.mof.Model.ContainsOperations, 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 ("all_contains_Links", new java.lang.Integer JavaDoc (0));
23     _methods.put ("exists", new java.lang.Integer JavaDoc (1));
24     _methods.put ("container", new java.lang.Integer JavaDoc (2));
25     _methods.put ("contained_element", new java.lang.Integer JavaDoc (3));
26     _methods.put ("ref_all_links", new java.lang.Integer JavaDoc (4));
27     _methods.put ("ref_link_exists", new java.lang.Integer JavaDoc (5));
28     _methods.put ("ref_query", new java.lang.Integer JavaDoc (6));
29     _methods.put ("ref_add_link", new java.lang.Integer JavaDoc (7));
30     _methods.put ("ref_add_link_before", new java.lang.Integer JavaDoc (8));
31     _methods.put ("ref_modify_link", new java.lang.Integer JavaDoc (9));
32     _methods.put ("ref_remove_link", new java.lang.Integer JavaDoc (10));
33     _methods.put ("ref_mof_id", new java.lang.Integer JavaDoc (11));
34     _methods.put ("ref_meta_object", new java.lang.Integer JavaDoc (12));
35     _methods.put ("ref_itself", new java.lang.Integer JavaDoc (13));
36     _methods.put ("ref_immediate_package", new java.lang.Integer JavaDoc (14));
37     _methods.put ("ref_outermost_package", new java.lang.Integer JavaDoc (15));
38     _methods.put ("ref_delete", new java.lang.Integer JavaDoc (16));
39   }
40
41   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
42                                 org.omg.CORBA.portable.InputStream JavaDoc in,
43                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
44   {
45     org.omg.CORBA.portable.OutputStream JavaDoc out = null;
46     java.lang.Integer JavaDoc __method = (java.lang.Integer JavaDoc)_methods.get ($method);
47     if (__method == null)
48       throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
49
50     switch (__method.intValue ())
51     {
52        case 0: // org/omg/mof/Model/Contains/all_contains_Links
53
{
54          try {
55            org.omg.mof.Model.ContainsLink $result[] = null;
56            $result = this.all_contains_Links ();
57            out = $rh.createReply();
58            org.omg.mof.Model.ContainsLinkSetHelper.write (out, $result);
59          } catch (org.omg.mof.Reflective.MofError $ex) {
60            out = $rh.createExceptionReply ();
61            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
62          }
63          break;
64        }
65
66        case 1: // org/omg/mof/Model/Contains/exists
67
{
68          try {
69            org.omg.mof.Model.Namespace container = org.omg.mof.Model.NamespaceHelper.read (in);
70            org.omg.mof.Model.ModelElement contained_element = org.omg.mof.Model.ModelElementHelper.read (in);
71            boolean $result = false;
72            $result = this.exists (container, contained_element);
73            out = $rh.createReply();
74            out.write_boolean ($result);
75          } catch (org.omg.mof.Reflective.MofError $ex) {
76            out = $rh.createExceptionReply ();
77            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
78          }
79          break;
80        }
81
82        case 2: // org/omg/mof/Model/Contains/container
83
{
84          try {
85            org.omg.mof.Model.ModelElement contained_element = org.omg.mof.Model.ModelElementHelper.read (in);
86            org.omg.mof.Model.Namespace $result = null;
87            $result = this.container (contained_element);
88            out = $rh.createReply();
89            org.omg.mof.Model.NamespaceHelper.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/Contains/contained_element
98
{
99          try {
100            org.omg.mof.Model.Namespace container = org.omg.mof.Model.NamespaceHelper.read (in);
101            org.omg.mof.Model.ModelElement $result[] = null;
102            $result = this.contained_element (container);
103            out = $rh.createReply();
104            org.omg.mof.Model.ModelElementListHelper.write (out, $result);
105          } catch (org.omg.mof.Reflective.MofError $ex) {
106            out = $rh.createExceptionReply ();
107            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
108          }
109          break;
110        }
111
112        case 4: // org/omg/mof/Reflective/RefAssociation/ref_all_links
113
{
114          org.omg.mof.Reflective.RefObject $result[][] = null;
115          $result = this.ref_all_links ();
116          out = $rh.createReply();
117          org.omg.mof.Reflective.LinkSetHelper.write (out, $result);
118          break;
119        }
120
121        case 5: // org/omg/mof/Reflective/RefAssociation/ref_link_exists
122
{
123          try {
124            org.omg.mof.Reflective.RefObject some_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
125            boolean $result = false;
126            $result = this.ref_link_exists (some_link);
127            out = $rh.createReply();
128            out.write_boolean ($result);
129          } catch (org.omg.mof.Reflective.MofError $ex) {
130            out = $rh.createExceptionReply ();
131            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
132          }
133          break;
134        }
135
136        case 6: // org/omg/mof/Reflective/RefAssociation/ref_query
137
{
138          try {
139            org.omg.mof.Reflective.RefObject query_end = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
140            org.omg.mof.Reflective.RefObject query_object = org.omg.mof.Reflective.RefObjectHelper.read (in);
141            org.omg.mof.Reflective.RefObject $result[] = null;
142            $result = this.ref_query (query_end, query_object);
143            out = $rh.createReply();
144            org.omg.mof.Reflective.RefObjectUListHelper.write (out, $result);
145          } catch (org.omg.mof.Reflective.MofError $ex) {
146            out = $rh.createExceptionReply ();
147            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
148          }
149          break;
150        }
151
152        case 7: // org/omg/mof/Reflective/RefAssociation/ref_add_link
153
{
154          try {
155            org.omg.mof.Reflective.RefObject new_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
156            this.ref_add_link (new_link);
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 8: // org/omg/mof/Reflective/RefAssociation/ref_add_link_before
166
{
167          try {
168            org.omg.mof.Reflective.RefObject new_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
169            org.omg.mof.Reflective.RefObject position_end = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
170            org.omg.mof.Reflective.RefObject before = org.omg.mof.Reflective.RefObjectHelper.read (in);
171            this.ref_add_link_before (new_link, position_end, before);
172            out = $rh.createReply();
173          } catch (org.omg.mof.Reflective.NotFound $ex) {
174            out = $rh.createExceptionReply ();
175            org.omg.mof.Reflective.NotFoundHelper.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 9: // org/omg/mof/Reflective/RefAssociation/ref_modify_link
184
{
185          try {
186            org.omg.mof.Reflective.RefObject old_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
187            org.omg.mof.Reflective.RefObject position_end = org.omg.mof.Reflective.DesignatorTypeHelper.read (in);
188            org.omg.mof.Reflective.RefObject new_object = org.omg.mof.Reflective.RefObjectHelper.read (in);
189            this.ref_modify_link (old_link, position_end, new_object);
190            out = $rh.createReply();
191          } catch (org.omg.mof.Reflective.NotFound $ex) {
192            out = $rh.createExceptionReply ();
193            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
194          } catch (org.omg.mof.Reflective.MofError $ex) {
195            out = $rh.createExceptionReply ();
196            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
197          }
198          break;
199        }
200
201        case 10: // org/omg/mof/Reflective/RefAssociation/ref_remove_link
202
{
203          try {
204            org.omg.mof.Reflective.RefObject old_link[] = org.omg.mof.Reflective.LinkHelper.read (in);
205            this.ref_remove_link (old_link);
206            out = $rh.createReply();
207          } catch (org.omg.mof.Reflective.NotFound $ex) {
208            out = $rh.createExceptionReply ();
209            org.omg.mof.Reflective.NotFoundHelper.write (out, $ex);
210          } catch (org.omg.mof.Reflective.MofError $ex) {
211            out = $rh.createExceptionReply ();
212            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
213          }
214          break;
215        }
216
217        case 11: // org/omg/mof/Reflective/RefBaseObject/ref_mof_id
218
{
219          String JavaDoc $result = null;
220          $result = this.ref_mof_id ();
221          out = $rh.createReply();
222          out.write_string ($result);
223          break;
224        }
225
226        case 12: // org/omg/mof/Reflective/RefBaseObject/ref_meta_object
227
{
228          org.omg.mof.Reflective.RefObject $result = null;
229          $result = this.ref_meta_object ();
230          out = $rh.createReply();
231          org.omg.mof.Reflective.RefObjectHelper.write (out, $result);
232          break;
233        }
234
235        case 13: // org/omg/mof/Reflective/RefBaseObject/ref_itself
236
{
237          org.omg.mof.Reflective.RefBaseObject other_object = org.omg.mof.Reflective.RefBaseObjectHelper.read (in);
238          boolean $result = false;
239          $result = this.ref_itself (other_object);
240          out = $rh.createReply();
241          out.write_boolean ($result);
242          break;
243        }
244
245        case 14: // org/omg/mof/Reflective/RefBaseObject/ref_immediate_package
246
{
247          org.omg.mof.Reflective._RefPackage $result = null;
248          $result = this.ref_immediate_package ();
249          out = $rh.createReply();
250          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
251          break;
252        }
253
254        case 15: // org/omg/mof/Reflective/RefBaseObject/ref_outermost_package
255
{
256          org.omg.mof.Reflective._RefPackage $result = null;
257          $result = this.ref_outermost_package ();
258          out = $rh.createReply();
259          org.omg.mof.Reflective._RefPackageHelper.write (out, $result);
260          break;
261        }
262
263        case 16: // org/omg/mof/Reflective/RefBaseObject/ref_delete
264
{
265          try {
266            this.ref_delete ();
267            out = $rh.createReply();
268          } catch (org.omg.mof.Reflective.MofError $ex) {
269            out = $rh.createExceptionReply ();
270            org.omg.mof.Reflective.MofErrorHelper.write (out, $ex);
271          }
272          break;
273        }
274
275        default:
276          throw new org.omg.CORBA.BAD_OPERATION JavaDoc (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
277     }
278
279     return out;
280   } // _invoke
281

282   // Type-specific CORBA::Object operations
283
private static String JavaDoc[] __ids = {
284     "IDL:org/omg/mof/Model/Contains:1.0",
285     "IDL:org/omg/mof/Reflective/RefAssociation:1.0",
286     "IDL:org/omg/mof/Reflective/RefBaseObject:1.0"};
287
288   public String JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
289   {
290     return (String JavaDoc[])__ids.clone ();
291   }
292
293   public Contains _this()
294   {
295     return ContainsHelper.narrow(
296     super._this_object());
297   }
298
299   public Contains _this(org.omg.CORBA.ORB JavaDoc orb)
300   {
301     return ContainsHelper.narrow(
302     super._this_object(orb));
303   }
304
305
306 } // class ContainsPOA
307
Popular Tags