1 22 package org.jboss.test.cts.keys; 23 24 import java.io.Serializable ; 25 26 32 public class AccountPK 33 implements Serializable 34 { 35 public String key; 36 37 44 public AccountPK (String key) 45 { 46 this.key = key; 47 } 48 49 public String getKey () 50 { 51 return this.key; 52 } 53 public void setKey(String key) 54 { 55 this.key = key; 56 } 57 58 65 public boolean equals( Object obj ) 66 { 67 Class cl = obj.getClass( ); 68 AccountPK pk = (AccountPK)obj; 69 return ( (cl.isInstance(this)) && (this.key.trim().compareTo(pk.getKey().trim()) == 0) ); 70 } 71 72 public String toString() 73 { 74 return key; 75 } 76 77 public int hashCode() 78 { 79 return key.hashCode(); 80 } 81 } 82 | Popular Tags |