# HG changeset patch # User Raimund Renkert # Date 1371213751 -7200 # Node ID 068b0bfb133ad832f34a43847af3754c4d1e113b # Parent 53f6d290a559c31d129b51460b0a8e8ca702ab72 New model for l_status. diff -r 53f6d290a559 -r 068b0bfb133a src/main/java/de/intevation/lada/model/LStatus.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/LStatus.java Fri Jun 14 14:42:31 2013 +0200 @@ -0,0 +1,126 @@ +package de.intevation.lada.model; + +// Generated 21.05.2013 16:58:30 by Hibernate Tools 3.4.0.CR1 + +import java.util.Date; +import javax.persistence.AttributeOverride; +import javax.persistence.AttributeOverrides; +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.JoinColumns; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +/** + * LStatus generated by hbm2java + */ +@Entity +@Table(name = "l_status", schema = "public") +public class LStatus implements java.io.Serializable { + + private LStatusId id; + private String probeId; + private String erzeuger; + private Integer messungsId; + private Short status; + private Date SDatum; + private String SKommentar; + + public LStatus() { + } + + public LStatus(LStatusId id, String probeId, String erzeuger, + Integer messungsId, Date SDatum) { + this.id = id; + this.setProbeId(probeId); + this.erzeuger = erzeuger; + this.messungsId = messungsId; + this.SDatum = SDatum; + } + + public LStatus(LStatusId id, String probeId, String erzeuger, + Integer messungsId, Short status, Date SDatum, String SKommentar + ) { + this.id = id; + this.setProbeId(probeId); + this.erzeuger = erzeuger; + this.messungsId = messungsId; + this.status = status; + this.SDatum = SDatum; + this.SKommentar = SKommentar; + } + + @EmbeddedId + @AttributeOverrides({ + @AttributeOverride(name = "probeId", column = @Column(name = "probe_id", nullable = false, length = 20)), + @AttributeOverride(name = "messungsId", column = @Column(name = "messungs_id", nullable = false)), + @AttributeOverride(name = "SId", column = @Column(name = "s_id", nullable = false)) }) + public LStatusId getId() { + return this.id; + } + + public void setId(LStatusId id) { + this.id = id; + } + + @Column(name = "probe_id", nullable = false, insertable = false, updatable = false) + public String getProbeId() { + return probeId; + } + + public void setProbeId(String probeId) { + this.probeId = probeId; + } + + @Column(name = "erzeuger", nullable = false) + public String getErzeuger() { + return this.erzeuger; + } + + public void setErzeuger(String erzeuger) { + this.erzeuger = erzeuger; + } + + @Column(name = "messungs_id", nullable = false, insertable = false, updatable = false) + public Integer getMessungsId() { + return this.messungsId; + } + + public void setMessungsId(Integer messungsId) { + this.messungsId = messungsId; + } + + @Column(name = "status") + public Short getStatus() { + return this.status; + } + + public void setStatus(Short status) { + this.status = status; + } + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "s_datum", nullable = false, length = 35) + public Date getSDatum() { + return this.SDatum; + } + + public void setSDatum(Date SDatum) { + this.SDatum = SDatum; + } + + @Column(name = "s_kommentar", length = 1024) + public String getSKommentar() { + return this.SKommentar; + } + + public void setSKommentar(String SKommentar) { + this.SKommentar = SKommentar; + } + +} diff -r 53f6d290a559 -r 068b0bfb133a src/main/java/de/intevation/lada/model/LStatusId.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/LStatusId.java Fri Jun 14 14:42:31 2013 +0200 @@ -0,0 +1,80 @@ +package de.intevation.lada.model; + +// Generated 21.05.2013 16:58:30 by Hibernate Tools 3.4.0.CR1 + +import javax.persistence.Column; +import javax.persistence.Embeddable; + +/** + * LStatusId generated by hbm2java + */ +@Embeddable +public class LStatusId implements java.io.Serializable { + + private String probeId; + private short messungsId; + private short SId; + + public LStatusId() { + } + + public LStatusId(String probeId, short messungsId, short SId) { + this.probeId = probeId; + this.messungsId = messungsId; + this.SId = SId; + } + + @Column(name = "probe_id", nullable = false, length = 20) + public String getProbeId() { + return this.probeId; + } + + public void setProbeId(String probeId) { + this.probeId = probeId; + } + + @Column(name = "messungs_id", nullable = false) + public short getMessungsId() { + return this.messungsId; + } + + public void setMessungsId(short messungsId) { + this.messungsId = messungsId; + } + + @Column(name = "s_id", nullable = false) + public short getSId() { + return this.SId; + } + + public void setSId(short SId) { + this.SId = SId; + } + + public boolean equals(Object other) { + if ((this == other)) + return true; + if ((other == null)) + return false; + if (!(other instanceof LStatusId)) + return false; + LStatusId castOther = (LStatusId) other; + + return ((this.getProbeId() == castOther.getProbeId()) || (this + .getProbeId() != null && castOther.getProbeId() != null && this + .getProbeId().equals(castOther.getProbeId()))) + && (this.getMessungsId() == castOther.getMessungsId()) + && (this.getSId() == castOther.getSId()); + } + + public int hashCode() { + int result = 17; + + result = 37 * result + + (getProbeId() == null ? 0 : this.getProbeId().hashCode()); + result = 37 * result + this.getMessungsId(); + result = 37 * result + this.getSId(); + return result; + } + +}