package com.interpress_project.modernshare.orb.generated;


/**
 * Generated from IDL interface "MdsService".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2007/03/21 14:13:25
 */

public final class MdsServiceHelper
{
	public static void insert (final org.omg.CORBA.Any any, final com.interpress_project.modernshare.orb.generated.MdsService s)
	{
			any.insert_Object(s);
	}
	public static com.interpress_project.modernshare.orb.generated.MdsService extract(final org.omg.CORBA.Any any)
	{
		return narrow(any.extract_Object()) ;
	}
	public static org.omg.CORBA.TypeCode type()
	{
		return org.omg.CORBA.ORB.init().create_interface_tc("IDL:com/interpress_project/modernshare/orb/generated/MdsService:1.0", "MdsService");
	}
	public static String id()
	{
		return "IDL:com/interpress_project/modernshare/orb/generated/MdsService:1.0";
	}
	public static MdsService read(final org.omg.CORBA.portable.InputStream in)
	{
		return narrow(in.read_Object(com.interpress_project.modernshare.orb.generated._MdsServiceStub.class));
	}
	public static void write(final org.omg.CORBA.portable.OutputStream _out, final com.interpress_project.modernshare.orb.generated.MdsService s)
	{
		_out.write_Object(s);
	}
	public static com.interpress_project.modernshare.orb.generated.MdsService narrow(final org.omg.CORBA.Object obj)
	{
		if (obj == null)
		{
			return null;
		}
		else if (obj instanceof com.interpress_project.modernshare.orb.generated.MdsService)
		{
			return (com.interpress_project.modernshare.orb.generated.MdsService)obj;
		}
		else if (obj._is_a("IDL:com/interpress_project/modernshare/orb/generated/MdsService:1.0"))
		{
			com.interpress_project.modernshare.orb.generated._MdsServiceStub stub;
			stub = new com.interpress_project.modernshare.orb.generated._MdsServiceStub();
			stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());
			return stub;
		}
		else
		{
			throw new org.omg.CORBA.BAD_PARAM("Narrow failed");
		}
	}
	public static com.interpress_project.modernshare.orb.generated.MdsService unchecked_narrow(final org.omg.CORBA.Object obj)
	{
		if (obj == null)
		{
			return null;
		}
		else if (obj instanceof com.interpress_project.modernshare.orb.generated.MdsService)
		{
			return (com.interpress_project.modernshare.orb.generated.MdsService)obj;
		}
		else
		{
			com.interpress_project.modernshare.orb.generated._MdsServiceStub stub;
			stub = new com.interpress_project.modernshare.orb.generated._MdsServiceStub();
			stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());
			return stub;
		}
	}
}
