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
|
@Entity
@Table(name = "TEST")
@NamedQueries({
@NamedQuery(name = "Test.findAll", query = "SELECT t FROM Test t"),
@NamedQuery(name = "Test.findByIdTest", query = "SELECT t FROM Test t WHERE t.idTest = :idTest"),
@NamedQuery(name = "Test.findByLibelle", query = "SELECT t FROM Test t WHERE t.libelle = :libelle")})
public class Test implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "ID_TEST")
private String idTest;
@Basic(optional = false)
@Column(name = "LIBELLE")
private String libelle;
public Test() {
}
public Test(String idTest) {
this.idTest = idTest;
}
public Test(String idTest, String libelle) {
this.idTest = idTest;
this.libelle = libelle;
}
public String getIdTest() {
return idTest;
}
public void setIdTest(String idTest) {
this.idTest = idTest;
}
public String getLibelle() {
return libelle;
}
public void setLibelle(String libelle) {
this.libelle = libelle;
}
@Override
public int hashCode() {
int hash = 0;
hash += (idTest != null ? idTest.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 Test)) {
return false;
}
Test other = (Test) object;
if ((this.idTest == null && other.idTest != null) || (this.idTest != null && !this.idTest.equals(other.idTest))) {
return false;
}
return true;
}
@Override
public String toString() {
return "org.cyranno.ejb.entities.Test[idTest=" + idTest + "]";
}
} |