package seqdb;

/** stream-based skeleton class */

public abstract class SeqInfoPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, seqdb.SeqInfoOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "getReferences", new java.lang.Integer(0));
		m_opsHash.put ( "getKeywords", new java.lang.Integer(1));
		m_opsHash.put ( "getDbXrefs", new java.lang.Integer(2));
		m_opsHash.put ( "getDescription", new java.lang.Integer(3));
		m_opsHash.put ( "getComments", new java.lang.Integer(4));
	}
	private String[] ids = {"IDL:seqdb/SeqInfo:1.0"};
	public seqdb.SeqInfo _this()
	{
		return seqdb.SeqInfoHelper.narrow(_this_object());
	}
	public seqdb.SeqInfo _this(org.omg.CORBA.ORB orb)
	{
		return seqdb.SeqInfoHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // getReferences
			{
			try
			{
				_out = handler.createReply();
				type.DbXrefListHelper.write(_out,getReferences());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 1: // getKeywords
			{
			try
			{
				_out = handler.createReply();
				type.stringListHelper.write(_out,getKeywords());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 2: // getDbXrefs
			{
			try
			{
				_out = handler.createReply();
				type.DbXrefListHelper.write(_out,getDbXrefs());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 3: // getDescription
			{
			try
			{
				_out = handler.createReply();
				_out.write_string(getDescription());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
			case 4: // getComments
			{
			try
			{
				_out = handler.createReply();
				type.stringListHelper.write(_out,getComments());
			}
			catch(type.NoResult _ex0)
			{
				_out = handler.createExceptionReply();
				type.NoResultHelper.write(_out, _ex0);
			}
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
