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 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
| /*
* SnomedInter.java
*
* Created on 22 septembre 2006, 15:45
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package ejb.entity;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
*
* @author naji2
*/
@Entity
@Table(name = "umlssnmi")
@NamedQueries( {@NamedQuery(name = "SnomedInter.findByAuis", query = "SELECT s FROM SnomedInter s WHERE s.auis = :auis"), @NamedQuery(name = "SnomedInter.findByCui", query = "SELECT s FROM SnomedInter s WHERE s.cui = :cui"), @NamedQuery(name = "SnomedInter.findByCode", query = "SELECT s FROM SnomedInter s WHERE s.code = :code"), @NamedQuery(name = "SnomedInter.findByTty", query = "SELECT s FROM SnomedInter s WHERE s.tty = :tty"), @NamedQuery(name = "SnomedInter.findByStr", query = "SELECT s FROM SnomedInter s WHERE s.str = :str"), @NamedQuery(name = "SnomedInter.findByHier", query = "SELECT s FROM SnomedInter s WHERE s.hier = :hier"), @NamedQuery(name = "SnomedInter.findByProf", query = "SELECT s FROM SnomedInter s WHERE s.prof = :prof"), @NamedQuery(name = "SnomedInter.findByAxe", query = "SELECT s FROM SnomedInter s WHERE s.axe = :axe")})
public class SnomedInter implements Serializable {
@Id
@Column(name = "AUIS", nullable = false)
private String auis;
@Column(name = "CUI", nullable = false)
private String cui;
@Column(name = "CODE", nullable = false)
private String code;
@Column(name = "TTY", nullable = false)
private String tty;
@Column(name = "STR", nullable = false)
private String str;
@Column(name = "HIER", nullable = false)
private String hier;
@Column(name = "PROF", nullable = false)
private short prof;
@Column(name = "AXE", nullable = false)
private char axe;
/** Creates a new instance of SnomedInter */
public SnomedInter() {
}
public SnomedInter(String auis) {
this.setAuis(auis);
}
public SnomedInter(String auis, String cui, String code, String tty, String str, String hier, short prof, char axe) {
this.setAuis(auis);
this.setCui(cui);
this.setCode(code);
this.setTty(tty);
this.setStr(str);
this.setHier(hier);
this.setProf(prof);
this.setAxe(axe);
}
public String getAuis() {
return this.auis;
}
public void setAuis(String auis) {
this.auis = auis;
}
public String getCui() {
return this.cui;
}
public void setCui(String cui) {
this.cui = cui;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getTty() {
return this.tty;
}
public void setTty(String tty) {
this.tty = tty;
}
public String getStr() {
return this.str;
}
public void setStr(String str) {
this.str = str;
}
public String getHier() {
return this.hier;
}
public void setHier(String hier) {
this.hier = hier;
}
public short getProf() {
return this.prof;
}
public void setProf(short prof) {
this.prof = prof;
}
public char getAxe() {
return this.axe;
}
public void setAxe(char axe) {
this.axe = axe;
}
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "snomedInters", targetEntity =TermSource.class )
private Collection<TermSource> termSources;
public Collection<TermSource> getTermSources() {
return termSources;
}
public void setTermSources(Collection<TermSource> termSources) {
this.termSources = termSources;
}
public int hashCode() {
int hash = 0;
hash += (this.getAuis() != null ? this.getAuis().hashCode() : 0);
return hash;
}
public boolean equals(Object object) {
if (!(object instanceof SnomedInter)) {
return false;
}
SnomedInter other = (SnomedInter)object;
if (this.getAuis() != other.getAuis() && (this.getAuis() == null || !this.getAuis().equals(other.getAuis()))) return false;
return true;
}
public String toString() {
return "ejb.entity.SnomedInter[auis=" + getAuis() + "]";
}
/* public List<TermSource> getTermSources() {
return termSources;
}
public void setTermSources(List<TermSource> termSources) {
this.termSources = termSources;
}
*/
} |
Partager