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 SelFundCustAccountBean
{
	private String Balancesubject = "";
	private String Buyercode = "";
	private Double Totalmoney = 0.0;
	private Double Leavemoney = 0.0;
	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 Double getTotalmoney()
	{
		return Totalmoney;
	}

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

	public Double getLeavemoney()
	{
		return Leavemoney;
	}

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

	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 List<SelFundCustAccountBean> convertResultSetToBeanList(
			ResultSet set) throws SQLException
	{
		List<SelFundCustAccountBean> listbean = new ArrayList<SelFundCustAccountBean>();
		SelFundCustAccountBean bean = null;

		while (set.next())
		{
			bean = new SelFundCustAccountBean();
			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.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.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;
	}

	public static SelFundCustAccountBean convertHashMapToBean(HashMap hs)
	{
		SelFundCustAccountBean bean = new SelFundCustAccountBean();
		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.setTotalmoney(( Double)hs.get("TOTALMONEY"));
		}
		catch (java.lang.Exception ex)
		{
		}
		try
		{
			bean.setLeavemoney(( Double)hs.get("LEAVEMONEY"));
		}
		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;
	}
}
