1 22 package org.jboss.test.perf.interfaces; 23 public class Entity2PK implements java.io.Serializable 24 { 25 public int key1; 26 public String key2; 27 public Double key3; 28 29 public Entity2PK() 30 { 31 } 32 33 public Entity2PK(int key1, String key2, Double key3) 34 { 35 this.key1 = key1; 36 this.key2 = key2; 37 this.key3 = key3; 38 } 39 40 public boolean equals(Object obj) 41 { 42 Entity2PK key = (Entity2PK) obj; 43 boolean equals = key1 == key.key1 44 && key2.equals(key.key2) && key3.equals(key.key3); 45 return equals; 46 } 47 public int hashCode() 48 { 49 return key1 + key2.hashCode() + key3.hashCode(); 50 } 51 52 public String toString() 53 { 54 return "Entity2PK[" + key1 + ',' + key2 + ',' + key3 + "]"; 55 } 56 57 } 58 | Popular Tags |