package nsdb;
public class ServerInfoHelper
{
	private static org.omg.CORBA.TypeCode _type = org.omg.CORBA.ORB.init().create_struct_tc(id(),"ServerInfo",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("entry_stats_list",org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().create_struct_tc(id(),"EntryStats",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("name",org.omg.CORBA.ORB.init().create_string_tc(0),null),new org.omg.CORBA.StructMember("last_change_time",org.omg.CORBA.ORB.init().create_alias_tc( id(),"datestamp_t",org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3))),null)})),null),new org.omg.CORBA.StructMember("file_stats_list",org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().create_struct_tc(id(),"EntryStats",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("name",org.omg.CORBA.ORB.init().create_string_tc(0),null),new org.omg.CORBA.StructMember("last_change_time",org.omg.CORBA.ORB.init().create_alias_tc( id(),"datestamp_t",org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3))),null)})),null)});
	public ServerInfoHelper ()
	{
	}
	public static void insert(org.omg.CORBA.Any any, nsdb.ServerInfo s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}
	public static nsdb.ServerInfo extract(org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}
	public static org.omg.CORBA.TypeCode type()
	{
		return _type;
	}
	public String get_id()
	{
		return id();
	}
	public org.omg.CORBA.TypeCode get_type()
	{
		return type();
	}
	public void write_Object(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj)
	{
		 throw new RuntimeException(" not implemented");
	}
	public java.lang.Object read_Object(org.omg.CORBA.portable.InputStream in)
	{
		 throw new RuntimeException(" not implemented");
	}
	public static String id()
	{
		return "IDL:nsdb/ServerInfo:1.0";
	}
	public static nsdb.ServerInfo read(org.omg.CORBA.portable.InputStream in)
	{
		nsdb.ServerInfo result = new nsdb.ServerInfo();
		int _lresult_entry_stats_list = in.read_long();
		result.entry_stats_list = new nsdb.EntryStats[_lresult_entry_stats_list];
		for(int i=0;i<_lresult_entry_stats_list;i++)
		{
			result.entry_stats_list[i]=nsdb.EntryStatsHelper.read(in);
		}

		int _lresult_file_stats_list = in.read_long();
		result.file_stats_list = new nsdb.EntryStats[_lresult_file_stats_list];
		for(int i=0;i<_lresult_file_stats_list;i++)
		{
			result.file_stats_list[i]=nsdb.EntryStatsHelper.read(in);
		}

		return result;
	}
	public static void write(org.omg.CORBA.portable.OutputStream out, nsdb.ServerInfo s)
	{

		out.write_long(s.entry_stats_list.length);
		for( int i=0; i<s.entry_stats_list.length;i++)
		{
			nsdb.EntryStatsHelper.write(out,s.entry_stats_list[i]);
		}


		out.write_long(s.file_stats_list.length);
		for( int i=0; i<s.file_stats_list.length;i++)
		{
			nsdb.EntryStatsHelper.write(out,s.file_stats_list[i]);
		}

	}
}
