1 package org.hibernate.test.legacy; 3 4 import java.util.ArrayList ; 5 import java.util.Collection ; 6 7 public class Contained { 8 private Container container; 9 private long id; 10 private Collection bag = new ArrayList (); 11 private Collection lazyBag = new ArrayList (); 12 13 public boolean equals(Object other) { 14 return id==( (Contained) other ).getId(); 15 } 16 public int hashCode() { 17 return new Long (id).hashCode(); 18 } 19 20 24 public Container getContainer() { 25 return container; 26 } 27 28 32 public long getId() { 33 return id; 34 } 35 36 40 public void setContainer(Container container) { 41 this.container = container; 42 } 43 44 48 public void setId(long id) { 49 this.id = id; 50 } 51 52 56 public Collection getBag() { 57 return bag; 58 } 59 60 64 public void setBag(Collection bag) { 65 this.bag = bag; 66 } 67 68 72 public Collection getLazyBag() { 73 return lazyBag; 74 } 75 76 80 public void setLazyBag(Collection lazyBag) { 81 this.lazyBag = lazyBag; 82 } 83 84 } 85 86 87 88 89 90 91 | Popular Tags |