package demo.hello;


/**
 * Generated from IDL interface "GoodDay".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at Mar 4, 2009 1:55:17 PM
 */

public final class GoodDayHelper
{
	public static void insert (final org.omg.CORBA.Any any, final demo.hello.GoodDay s)
	{
			any.insert_Object(s);
	}
	public static demo.hello.GoodDay 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:demo/hello/GoodDay:1.0", "GoodDay");
	}
	public static String id()
	{
		return "IDL:demo/hello/GoodDay:1.0";
	}
	public static GoodDay read(final org.omg.CORBA.portable.InputStream in)
	{
		return narrow(in.read_Object(demo.hello._GoodDayStub.class));
	}
	public static void write(final org.omg.CORBA.portable.OutputStream _out, final demo.hello.GoodDay s)
	{
		_out.write_Object(s);
	}
	public static demo.hello.GoodDay narrow(final org.omg.CORBA.Object obj)
	{
		if (obj == null)
		{
			return null;
		}
		else if (obj instanceof demo.hello.GoodDay)
		{
			return (demo.hello.GoodDay)obj;
		}
		else if (obj._is_a("IDL:demo/hello/GoodDay:1.0"))
		{
			demo.hello._GoodDayStub stub;
			stub = new demo.hello._GoodDayStub();
			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 demo.hello.GoodDay unchecked_narrow(final org.omg.CORBA.Object obj)
	{
		if (obj == null)
		{
			return null;
		}
		else if (obj instanceof demo.hello.GoodDay)
		{
			return (demo.hello.GoodDay)obj;
		}
		else
		{
			demo.hello._GoodDayStub stub;
			stub = new demo.hello._GoodDayStub();
			stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());
			return stub;
		}
	}
}
