1 package org.hibernate.test.legacy; 3 4 import java.io.Serializable ; 5 import java.util.TimeZone ; 6 7 public class Stuff implements Serializable { 8 9 public int hashCode() { 10 return new Long (id).hashCode(); 11 } 12 13 public boolean equals(Object other) { 14 if ( ! (other instanceof Stuff) ) return false; 15 Stuff otherStuff = (Stuff) other; 16 return otherStuff.getId()==id && otherStuff.getFoo().getKey().equals( foo.getKey() ) && otherStuff.getMoreStuff().equals(moreStuff); 17 } 18 19 private long id; 20 private FooProxy foo; 21 private MoreStuff moreStuff; 22 private TimeZone property; 23 27 public FooProxy getFoo() { 28 return foo; 29 } 30 31 35 public long getId() { 36 return id; 37 } 38 39 43 public TimeZone getProperty() { 44 return property; 45 } 46 47 51 public void setFoo(FooProxy foo) { 52 this.foo = foo; 53 } 54 55 59 public void setId(long id) { 60 this.id = id; 61 } 62 63 67 public void setProperty(TimeZone property) { 68 this.property = property; 69 } 70 71 75 public MoreStuff getMoreStuff() { 76 return moreStuff; 77 } 78 79 83 public void setMoreStuff(MoreStuff moreStuff) { 84 this.moreStuff = moreStuff; 85 } 86 87 } 88 89 90 91 92 93 94 | Popular Tags |