All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.tm.iiop.TransactionIdHelper Maven / Gradle / Ivy

The newest version!
package org.jboss.tm.iiop;


/**
 * Generated from IDL struct "TransactionId".
 *
 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 4), 06-Jun-2007
 * @version generated at Aug 16, 2011 8:43:25 AM
 */

public final class TransactionIdHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc(org.jboss.tm.iiop.TransactionIdHelper.id(),"TransactionId",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("formatId", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)), null),new org.omg.CORBA.StructMember("globalId", org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(10))), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final org.jboss.tm.iiop.TransactionId s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static org.jboss.tm.iiop.TransactionId extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:org/jboss/tm/iiop/TransactionId:1.0";
	}
	public static org.jboss.tm.iiop.TransactionId read (final org.omg.CORBA.portable.InputStream in)
	{
		org.jboss.tm.iiop.TransactionId result = new org.jboss.tm.iiop.TransactionId();
		result.formatId=in.read_long();
		int _lresult_globalId0 = in.read_long();
		try
		{
			 int x = in.available();
			 if ( x > 0 && _lresult_globalId0 > x )
				{
					throw new org.omg.CORBA.MARSHAL("Sequence length too large. Only " + x + " available and trying to assign " + _lresult_globalId0);
				}
		}
		catch (java.io.IOException e)
		{
		}
		result.globalId = new byte[_lresult_globalId0];
		in.read_octet_array(result.globalId,0,_lresult_globalId0);
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final org.jboss.tm.iiop.TransactionId s)
	{
		out.write_long(s.formatId);
		
		out.write_long(s.globalId.length);
		out.write_octet_array(s.globalId,0,s.globalId.length);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy