1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
@Entity
@Table(name = "GEODE_DISCIPLINE")
@NamedQueries({@NamedQuery(name = "GeodeDiscipline.findById", query = "SELECT g FROM GeodeDiscipline g WHERE g.id = :id"), @NamedQuery(name = "GeodeDiscipline.findByName", query = "SELECT g FROM GeodeDiscipline g WHERE g.name = :name"), @NamedQuery(name = "GeodeDiscipline.findByDescription", query = "SELECT g FROM GeodeDiscipline g WHERE g.description = :description"), @NamedQuery(name = "GeodeDiscipline.findByCreatedAt", query = "SELECT g FROM GeodeDiscipline g WHERE g.createdAt = :createdAt"), @NamedQuery(name = "GeodeDiscipline.findByUpdatedAt", query = "SELECT g FROM GeodeDiscipline g WHERE g.updatedAt = :updatedAt"), @NamedQuery(name = "GeodeDiscipline.findByClosingDate", query = "SELECT g FROM GeodeDiscipline g WHERE g.closingDate = :closingDate")})
public class GeodeDiscipline implements Serializable {
private static final long serialVersionUID = 123444956L;
@Id
@Column(name = "ID", nullable = false)
private BigDecimal id;
@Column(name = "NAME")
private String name;
@Column(name = "DESCRIPTION")
private String description;
@Column(name = "CREATED_AT")
@Temporal(TemporalType.DATE)
private Date createdAt;
@Column(name = "UPDATED_AT")
@Temporal(TemporalType.DATE)
private Date updatedAt;
@Column(name = "CLOSING_DATE")
@Temporal(TemporalType.DATE)
private Date closingDate;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "discipline")
private Collection<GeodeUser> geodeUserCollection;
public GeodeDiscipline() {
}
public GeodeDiscipline(BigDecimal id) {
this.id = id;
}
@Id
public BigDecimal getId() {
return id;
}
public void setId(BigDecimal id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Date getClosingDate() {
return closingDate;
}
public void setClosingDate(Date closingDate) {
this.closingDate = closingDate;
}
public Collection<GeodeUser> getGeodeUserCollection() {
return geodeUserCollection;
}
public void setGeodeUserCollection(Collection<GeodeUser> geodeUserCollection) {
this.geodeUserCollection = geodeUserCollection;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof GeodeDiscipline)) {
return false;
}
GeodeDiscipline other = (GeodeDiscipline) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.org.geode.entity.users.GeodeDiscipline[id=" + id + "]";
}
} |
Partager