CustomerPK.java |
/* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.jboss.test.bank.interfaces; /** * * @author Rickard Oberg * @author $Author: starksm $ * @version $Revision: 1.1.1.1.32.2 $ */ public class CustomerPK implements java.io.Serializable { // Constants ----------------------------------------------------- static final long serialVersionUID = 2191322949246953738L; // Attributes ---------------------------------------------------- public String id; public String name; // Public -------------------------------------------------------- public boolean equals(Object pk) { return ((CustomerPK)pk).id.equals(id) && ((CustomerPK)pk).name.equals(name); } public int hashCode() { return id.hashCode(); } public String toString() { return "Customer:"+id+"/"+name; } }
CustomerPK.java |