/*
 * Created on Sep 6, 2005
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package edu.uprm.ece.icom5016.util;

import java.util.Hashtable;

import edu.uprm.ece.icom5016.bean.Customer;

/**
 * @author elliot
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class ActiveAccounts {
	private static Hashtable active = null;
	static{
		active = new Hashtable();
		active.put("gambo", new Customer("gambo"));//, "gambo".hashCode()));
	}
	
	public synchronized static boolean isActive(String user){
		return active.containsKey(user);
	}
	
	public synchronized static void addActiveCustomer(Customer c){
		active.put(c.getId(), c);
	}
}
