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