1 9 10 package org.netbeans.modules.exceptions.entity; 11 12 import java.io.Serializable ; 13 import java.util.Date ; 14 import javax.persistence.Column; 15 import javax.persistence.Entity; 16 import javax.persistence.Id; 17 import javax.persistence.JoinColumn; 18 import javax.persistence.NamedQueries; 19 import javax.persistence.NamedQuery; 20 import javax.persistence.OneToOne; 21 import javax.persistence.Table; 22 import javax.persistence.Temporal; 23 import javax.persistence.TemporalType; 24 25 29 @Entity 30 @Table(name = "checkissuezilla") 31 @NamedQueries({@NamedQuery(name = "Checkissuezilla.findById", query = "SELECT c FROM Checkissuezilla c WHERE c.id = :id"), 32 @NamedQuery(name = "Checkissuezilla.findByStartTime", query = "SELECT c FROM Checkissuezilla c WHERE c.startTime = :startTime")}) 33 public class Checkissuezilla implements Serializable { 34 35 36 @Id 37 @Column(name = "Id", nullable = false) 38 private Integer id; 39 @Column(name = "StartTime") 40 @Temporal(TemporalType.TIMESTAMP) 41 private Date startTime; 42 @JoinColumn(name = "Id", referencedColumnName = "ID", insertable = false, updatable = false) 43 @OneToOne 44 private Issue issue; 45 46 47 public Checkissuezilla() { 48 } 49 50 public Checkissuezilla(Integer id) { 51 this.id = id; 52 } 53 54 public Integer getId() { 55 return id; 56 } 57 58 public void setId(Integer id) { 59 this.id = id; 60 } 61 62 public Date getStartTime() { 63 return startTime; 64 } 65 66 public void setStartTime(Date startTime) { 67 this.startTime = startTime; 68 } 69 70 public Issue getIssue() { 71 return issue; 72 } 73 74 public void setIssue(Issue issue) { 75 this.issue = issue; 76 } 77 78 @Override 79 public int hashCode() { 80 int hash = 0; 81 82 hash += (id != null ? id.hashCode() 83 : 0); 84 return hash; 85 } 86 87 @Override 88 public boolean equals(Object object) { 89 if (!(object instanceof Checkissuezilla)) { 90 return false; 91 } 92 Checkissuezilla other = (Checkissuezilla) object; 93 94 if (this.id != other.id && 95 (this.id == null || !this.id.equals(other.id))) 96 return false; 97 return true; 98 } 99 100 @Override 101 public String toString() { 102 return "test.Checkissuezilla[id=" + id + "]"; 103 } 104 105 } 106 | Popular Tags |