2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
5 package org.ufcspa.simdecs.entities;
7 import java.io.Serializable;
8 import javax.persistence.*;
15 @Table(name="INTERVALO_TABELA_REPOSTA")
16 public class IntervaloTabelaResposta implements Serializable {
17 private static final long serialVersionUID = 1L;
19 @SequenceGenerator(name="seqIntervaloTabelaResposta", sequenceName="SQ_INTERVALO_TABELA_RESPOSTA")
20 @GeneratedValue(strategy = GenerationType.AUTO, generator="seqIntervaloTabelaResposta")
24 @JoinColumn(name="tabres_id", nullable=false)
25 private TabelaResposta tabelaResposta;
27 @Column(nullable=false, length=3)
28 private Float pesoMinimo;
30 @Column(nullable=false, length=3)
31 private Float pesoMaximo;
33 @Column(nullable=false, length=2000)
36 public TabelaResposta getTabelaResposta() {
37 return tabelaResposta;
40 public void setTabelaResposta(TabelaResposta tabelaResposta) {
41 this.tabelaResposta = tabelaResposta;
44 public Float getPesoMaximo() {
48 public void setPesoMaximo(Float pesoMaximo) {
49 this.pesoMaximo = pesoMaximo;
52 public Float getPesoMinimo() {
56 public void setPesoMinimo(Float pesoMinimo) {
57 this.pesoMinimo = pesoMinimo;
60 public String getTexto() {
64 public void setTexto(String texto) {
73 public void setId(Long id) {
78 public int hashCode() {
80 hash += (id != null ? id.hashCode() : 0);
85 public boolean equals(Object object) {
86 // TODO: Warning - this method won't work in the case the id fields are not set
87 if (!(object instanceof IntervaloTabelaResposta)) {
90 IntervaloTabelaResposta other = (IntervaloTabelaResposta) object;
91 if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
98 public String toString() {
99 return "org.ufcspa.simdecs.entities.IntervaloTabelaRespota[ id=" + id + " ]";