Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/omg/CosTradingRepos/ServiceTypeRepositoryPackage/PropertyModeHelper.java


1   // **********************************************************************
2   //
3   // Generated by the ORBacus IDL to Java Translator
4   //
5   // Copyright (c) 2000
6   // Object Oriented Concepts, Inc.
7   // Billerica, MA, USA
8   //
9   // All Rights Reserved
10  //
11  // **********************************************************************
12  
13  // Version: 4.0
14  // License: non-commercial
15  
16  package org.omg.CosTradingRepos.ServiceTypeRepositoryPackage;
17  
18  //
19  // IDL:omg.org/CosTradingRepos/ServiceTypeRepository/PropertyMode:1.0
20  //
21  final public class PropertyModeHelper
22  {
23      public static void
24      insert(org.omg.CORBA.Any any, PropertyMode _ob_v)
25      {
26          org.omg.CORBA.portable.OutputStream out = any.create_output_stream();
27          write(out, _ob_v);
28          any.read_value(out.create_input_stream(), type());
29      }
30  
31      public static PropertyMode
32      extract(org.omg.CORBA.Any any)
33      {
34          if(any.type().equal(type()))
35              return read(any.create_input_stream());
36          else
37              throw new org.omg.CORBA.BAD_OPERATION();
38      }
39  
40      private static org.omg.CORBA.TypeCode typeCode_;
41  
42      public static org.omg.CORBA.TypeCode
43      type()
44      {
45          if(typeCode_ == null)
46          {
47              org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
48              String[] members = new String[4];
49              members[0] = "PROP_NORMAL";
50              members[1] = "PROP_READONLY";
51              members[2] = "PROP_MANDATORY";
52              members[3] = "PROP_MANDATORY_READONLY";
53              typeCode_ = orb.create_enum_tc(id(), "PropertyMode", members);
54          }
55  
56          return typeCode_;
57      }
58  
59      public static String
60      id()
61      {
62          return "IDL:omg.org/CosTradingRepos/ServiceTypeRepository/PropertyMode:1.0";
63      }
64  
65      public static PropertyMode
66      read(org.omg.CORBA.portable.InputStream in)
67      {
68          PropertyMode _ob_v;
69          _ob_v = PropertyMode.from_int(in.read_ulong());
70          return _ob_v;
71      }
72  
73      public static void
74      write(org.omg.CORBA.portable.OutputStream out, PropertyMode _ob_v)
75      {
76          out.write_ulong(_ob_v.value());
77      }
78  }