package examples.cluster.ejb.account;

/**
 * This class is the Primary Key 
 * for the EJBean AccountBean.
 *
 * @author Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
 */
public class AccountPK implements java.io.Serializable {
  public String accountId;

  /**
   * Default constructor
   * @return                  AccountPK
   */
  public AccountPK() {
  }

  /**
   * Primaary key constructor given an Account ID.
   *
   * @param accountId         String Account ID
   * @return                  AccountPK
   */
  public AccountPK(String accountId) {
    this.accountId = accountId;
  }

  public int hashCode() {
    return accountId.hashCode();
  } 

  public boolean equals(Object o) {
    if (o instanceof AccountPK) {
	return accountId.equals(((AccountPK)o).accountId);
    } else {
	return false;
    }
  }
}
