1 9 10 package hints; 11 12 import java.io.Serializable ; 13 import java.util.List ; 14 import java.util.Queue ; 15 import javax.persistence.Entity; 16 import javax.persistence.GeneratedValue; 17 import javax.persistence.GenerationType; 18 import javax.persistence.Id; 19 20 21 22 26 @Entity 27 public class B implements Serializable { 28 29 List <A> listA; 30 31 Queue <A> queueA; 32 33 34 @Id 35 @GeneratedValue(strategy = GenerationType.AUTO) 36 private Long id; 37 38 39 public B() { 40 } 41 42 public Long getId() { 43 return id; 44 } 45 46 public void setId(Long id) { 47 this.id = id; 48 } 49 50 public int hashCode() { 51 int hash = 0; 52 hash += (this.id != null ? this.id.hashCode() : 0); 53 return hash; 54 } 55 56 public boolean equals(Object object) { 57 if (!(object instanceof B)) { 59 return false; 60 } 61 B other = (B)object; 62 if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) return false; 63 return true; 64 } 65 66 public String toString() { 67 return "hints.B[id=" + id + "]"; 68 } 69 70 } 71 | Popular Tags |