001 package tecgraf.openbus.opendreams;
002
003 /**
004 * Generated from IDL alias "JobParameterSeq".
005 *
006 * @author JacORB IDL compiler V 2.3-beta-2, 14-Oct-2006
007 * @version generated at Jun 10, 2010 6:49:12 PM
008 */
009
010 public final class JobParameterSeqHelper
011 {
012 private static org.omg.CORBA.TypeCode _type = null;
013
014 public static void insert (org.omg.CORBA.Any any, tecgraf.openbus.opendreams.JobParameter[] s)
015 {
016 any.type (type ());
017 write (any.create_output_stream (), s);
018 }
019
020 public static tecgraf.openbus.opendreams.JobParameter[] extract (final org.omg.CORBA.Any any)
021 {
022 return read (any.create_input_stream ());
023 }
024
025 public static org.omg.CORBA.TypeCode type ()
026 {
027 if (_type == null)
028 {
029 _type = org.omg.CORBA.ORB.init().create_alias_tc(tecgraf.openbus.opendreams.JobParameterSeqHelper.id(), "JobParameterSeq",org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().create_value_tc ("IDL:tecgraf/openbus/opendreams/JobParameter:1.0", "JobParameter", (short)0, null, new org.omg.CORBA.ValueMember[] {new org.omg.CORBA.ValueMember ("", "IDL:name:1.0", "JobParameter", "1.0", org.omg.CORBA.ORB.init().create_string_tc(0), null, (short)1), new org.omg.CORBA.ValueMember ("", "IDL:value:1.0", "JobParameter", "1.0", org.omg.CORBA.ORB.init().create_string_tc(0), null, (short)1)})));
030 }
031 return _type;
032 }
033
034 public static String id()
035 {
036 return "IDL:tecgraf/openbus/opendreams/JobParameterSeq:1.0";
037 }
038 public static tecgraf.openbus.opendreams.JobParameter[] read (final org.omg.CORBA.portable.InputStream _in)
039 {
040 tecgraf.openbus.opendreams.JobParameter[] _result;
041 int _l_result0 = _in.read_long();
042 try
043 {
044 int x = _in.available();
045 if ( x > 0 && _l_result0 > x )
046 {
047 throw new org.omg.CORBA.MARSHAL("Sequence length too large. Only " + x + " available and trying to assign " + _l_result0);
048 }
049 }
050 catch (java.io.IOException e)
051 {
052 }
053 _result = new tecgraf.openbus.opendreams.JobParameter[_l_result0];
054 for (int i=0;i<_result.length;i++)
055 {
056 _result[i]=(tecgraf.openbus.opendreams.JobParameter)((org.omg.CORBA_2_3.portable.InputStream)_in).read_value ("IDL:tecgraf/openbus/opendreams/JobParameter:1.0");
057 }
058
059 return _result;
060 }
061
062 public static void write (final org.omg.CORBA.portable.OutputStream _out, tecgraf.openbus.opendreams.JobParameter[] _s)
063 {
064
065 _out.write_long(_s.length);
066 for (int i=0; i<_s.length;i++)
067 {
068 ((org.omg.CORBA_2_3.portable.OutputStream)_out).write_value (_s[i]);
069 }
070
071 }
072 }