package core.stlmes.server.sale.po.fund;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class SelFundPactAccountBean
{
	private String Balancesubject = "";
	private String Buyercode = "";
	private String Secondaccount = "";
	private String Pactno = "";
	private Double Totalmoney = 0.0;
	private Double Leavemoney = 0.0;
	private java.util.Date Pact_begindate = null;
	private String Isinvoince = "";
	private String Importor = "";
	private java.util.Date Importtime = null;
	private java.util.Date Updatetime = null;

	public String getBalancesubject()
	{
		return Balancesubject;
	}

	public void setBalancesubject(String balancesubject)
	{
		Balancesubject = balancesubject;
	}

	public String getBuyercode()
	{
		return Buyercode;
	}

	public void setBuyercode(String buyercode)
	{
		Buyercode = buyercode;
	}

	public String getSecondaccount()
	{
		return Secondaccount;
	}

	public void setSecondaccount(String secondaccount)
	{
		Secondaccount = secondaccount;
	}

	public String getPactno()
	{
		return Pactno;
	}

	public void setPactno(String pactno)
	{
		Pactno = pactno;
	}

	public Double getTotalmoney()
	{
		return Totalmoney;
	}

	public void setTotalmoney(Double totalmoney)
	{
		Totalmoney = totalmoney;
	}

	public Double getLeavemoney()
	{
		return Leavemoney;
	}

	public void setLeavemoney(Double leavemoney)
	{
		Leavemoney = leavemoney;
	}

	public java.util.Date getPact_begindate()
	{
		return Pact_begindate;
	}

	public void setPact_begindate(java.util.Date pactBegindate)
	{
		Pact_begindate = pactBegindate;
	}

	public String getIsinvoince()
	{
		return Isinvoince;
	}

	public void setIsinvoince(String isinvoince)
	{
		Isinvoince = isinvoince;
	}

	public String getImportor()
	{
		return Importor;
	}

	public void setImportor(String importor)
	{
		Importor = importor;
	}

	public java.util.Date getImporttime()
	{
		return Importtime;
	}

	public void setImporttime(java.util.Date importtime)
	{
		Importtime = importtime;
	}

	public java.util.Date getUpdatetime()
	{
		return Updatetime;
	}

	public void setUpdatetime(java.util.Date updatetime)
	{
		Updatetime = updatetime;
	}

	public static SelFundPactAccountBean convertHashMapToBean(HashMap hs)
	{
		SelFundPactAccountBean bean = new SelFundPactAccountBean();
		try
		{
			bean.setBalancesubject(( String)hs.get("BALANCESUBJECT"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setBuyercode(( String)hs.get("BUYERCODE"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setSecondaccount(( String)hs.get("SECONDACCOUNT"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setPactno(( String)hs.get("PACTNO"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setTotalmoney(( Double)hs.get("TOTALMONEY"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setLeavemoney(( Double)hs.get("LEAVEMONEY"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setPact_begindate(( java.util.Date)hs.get("PACT_BEGINDATE"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setIsinvoince(( String)hs.get("ISINVOINCE"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setImportor(( String)hs.get("IMPORTOR"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setImporttime(( java.util.Date)hs.get("IMPORTTIME"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setUpdatetime(( java.util.Date)hs.get("UPDATETIME"));
		}
		catch (java.lang.Exception ex)
		{
		}
		return bean;
	}

	public static List<SelFundPactAccountBean> convertResultSetToBeanList(
			ResultSet set) throws SQLException
	{
		List<SelFundPactAccountBean> listbean = new ArrayList<SelFundPactAccountBean>();
		SelFundPactAccountBean bean = null;

		while (set.next())
		{
			bean = new SelFundPactAccountBean();
			try
			{
				bean
						.setBalancesubject(( String)set
								.getObject("BALANCESUBJECT"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setBuyercode(( String)set.getObject("BUYERCODE"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setSecondaccount(( String)set.getObject("SECONDACCOUNT"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setPactno(( String)set.getObject("PACTNO"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setTotalmoney( (( java.math.BigDecimal)set
						.getObject("TOTALMONEY") ).doubleValue());
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setLeavemoney( (( java.math.BigDecimal)set
						.getObject("LEAVEMONEY") ).doubleValue());
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setPact_begindate(( java.util.Date)set
						.getObject("PACT_BEGINDATE"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setIsinvoince(( String)set.getObject("ISINVOINCE"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean.setImportor(( String)set.getObject("IMPORTOR"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean
						.setImporttime(( java.util.Date)set
								.getObject("IMPORTTIME"));
			}
			catch (java.lang.Exception ex)
			{
			}
			try
			{
				bean
						.setUpdatetime(( java.util.Date)set
								.getObject("UPDATETIME"));
			}
			catch (java.lang.Exception ex)
			{
			}
			listbean.add(bean);
		}

		try
		{
			set.close();

		}
		catch (java.lang.Exception ex)
		{
		}
		return (listbean.size() == 0 ) ? null : listbean;
	}

}
