package org.dbxml.core.corba.db;
/**
 *	Generated from IDL definition of interface "DocumentSet"
 *	@author JacORB IDL compiler 
 */

public class DocumentSetHelper
{
	public DocumentSetHelper()
	{
	}
	public static void insert(org.omg.CORBA.Any any, org.dbxml.core.corba.db.DocumentSet s)
	{
		any.insert_Object(s);
	}
	public static org.dbxml.core.corba.db.DocumentSet extract(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:org/dbxml/core/corba/db/DocumentSet:1.0", "DocumentSet");
	}
	public static String id()
	{
		return "IDL:org/dbxml/core/corba/db/DocumentSet:1.0";
	}
	public static DocumentSet read(org.omg.CORBA.portable.InputStream in)
	{
		return narrow( in.read_Object());
	}
	public static void write(org.omg.CORBA.portable.OutputStream _out, org.dbxml.core.corba.db.DocumentSet s)
	{
		_out.write_Object(s);
	}
	public static org.dbxml.core.corba.db.DocumentSet narrow(org.omg.CORBA.Object obj)
	{
		if( obj == null )
			return null;
		try
		{
			return (org.dbxml.core.corba.db.DocumentSet)obj;
		}
		catch( ClassCastException c )
		{
			if( obj._is_a("IDL:org/dbxml/core/corba/db/DocumentSet:1.0"))
			{
				org.dbxml.core.corba.db._DocumentSetStub stub;
				stub = new org.dbxml.core.corba.db._DocumentSetStub();
				stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());
				return stub;
			}
		}
		throw new org.omg.CORBA.BAD_PARAM("Narrow failed");
	}
}
