1 27 28 package dataregistry; 29 30 import java.io.Serializable ; 31 import java.math.BigDecimal ; 32 33 36 public final class PartDetailPK implements Serializable { 37 38 public String partNumber; 39 public BigDecimal revision; 40 43 public boolean equals(Object otherOb) { 44 45 if (this == otherOb) { 46 return true; 47 } 48 if (!(otherOb instanceof PartDetailPK)) { 49 return false; 50 } 51 PartDetailPK other = (PartDetailPK) otherOb; 52 return ( 53 54 (partNumber==null?other.partNumber==null:partNumber.equals(other.partNumber)) 55 && 56 (revision==null?other.revision==null:revision.equals(other.revision)) 57 58 ); 59 } 60 61 64 public int hashCode() { 65 return ( 66 67 (partNumber==null?0:partNumber.hashCode()) 68 ^ 69 (revision==null?0:revision.hashCode()) 70 71 ); 72 } 73 74 } 75 | Popular Tags |