package Juno2;

import java.io.*;
import Juno2.AccountVO;
import java.util.HashMap;

public class AccountListCVO implements Serializable
{
	private LoginVO lvo;
	HashMap accountList;
	
    public AccountListCVO()	{
		this.accountList = new HashMap();
	}
    public AccountListCVO(AccountVO avo)	{
		this.accountList = new HashMap();
		addAccountVO(avo);
	}
	
	public void addAccountVO(AccountVO avo)	{		
		accountList.put(avo.getAccountId(), avo);
	}
	
	public void setAccountList(HashMap hm){
		accountList = hm;
	}
	
	public AccountVO getAccountVO(String accountId){
		return (AccountVO) accountList.get(accountId);
	}
	
	//public void setLvo(LoginVO lvo) {	
	public void setLoginVO(LoginVO lvo) {
		this.lvo = lvo;
	}
	
	public boolean getLoginState() {
		return lvo.getLoginState();
	}
	
	public AccountListCVO(LoginVO lvo)	{
		setLoginVO(lvo);
	}
	
	public HashMap getAccountList() {
		return(accountList);
	}

    public String toString(){
        return this.getClass().getName() + ":" +
			lvo + ", " +
			accountList;
    }
    
	public String getUserId() {
		return lvo.getUserId();
	}
	
	public String getUserPassword() {
		return lvo.getUserPassword();
	}
	
	public String getFirstName() {
		return lvo.getFirstName();
	}
	
	public String getLastName() {
		return lvo.getLastName();
	} 
    
}

