1 22 package org.jboss.test.readahead.interfaces; 23 24 import java.io.Serializable ; 25 26 34 public class AddressPK implements Serializable { 35 36 public String key = ""; 37 public String addressId = ""; 38 39 public AddressPK() { 40 } 41 42 public AddressPK(String key, String addressId) { 43 this.key = key; 44 this.addressId = addressId; 45 } 46 public boolean equals(Object obj) { 47 if (this.getClass().equals(obj.getClass())) { 48 AddressPK that = (AddressPK) obj; 49 return this.key.equals(that.key) && this.addressId.equals(that.addressId); 50 } 51 return false; 52 } 53 public int hashCode() { 54 return key.hashCode()+addressId.hashCode(); 55 } 56 } | Popular Tags |