Nova versao do simulador e tratamento de erros das chamadas.
[simdecs2.git] / src / java / org / ufcspa / simdecs / entities / IntervaloTabelaResposta.java
1 /*
2  * To change this template, choose Tools | Templates
3  * and open the template in the editor.
4  */
5 package org.ufcspa.simdecs.entities;
6
7 import java.io.Serializable;
8 import javax.persistence.*;
9
10 /**
11  *
12  * @author maroni
13  */
14 @Entity
15 @Table(name="INTERVALO_TABELA_REPOSTA")
16 public class IntervaloTabelaResposta implements Serializable {
17     private static final long serialVersionUID = 1L;
18     @Id
19     @SequenceGenerator(name="seqIntervaloTabelaResposta", sequenceName="SQ_INTERVALO_TABELA_RESPOSTA")
20     @GeneratedValue(strategy = GenerationType.AUTO, generator="seqIntervaloTabelaResposta")
21     private Long id;
22
23     @ManyToOne
24     @JoinColumn(name="tabres_id", nullable=false)
25     private TabelaResposta tabelaResposta;
26
27     @Column(nullable=false, length=3)
28     private Float pesoMinimo;
29
30     @Column(nullable=false, length=3)
31     private Float pesoMaximo;
32
33     @Column(nullable=false, length=2000)
34     private String texto;
35
36     public TabelaResposta getTabelaResposta() {
37         return tabelaResposta;
38     }
39
40     public void setTabelaResposta(TabelaResposta tabelaResposta) {
41         this.tabelaResposta = tabelaResposta;
42     }
43     
44     public Float getPesoMaximo() {
45         return pesoMaximo;
46     }
47
48     public void setPesoMaximo(Float pesoMaximo) {
49         this.pesoMaximo = pesoMaximo;
50     }
51
52     public Float getPesoMinimo() {
53         return pesoMinimo;
54     }
55
56     public void setPesoMinimo(Float pesoMinimo) {
57         this.pesoMinimo = pesoMinimo;
58     }
59
60     public String getTexto() {
61         return texto;
62     }
63
64     public void setTexto(String texto) {
65         this.texto = texto;
66     }
67
68     
69     public Long getId() {
70         return id;
71     }
72
73     public void setId(Long id) {
74         this.id = id;
75     }
76
77     @Override
78     public int hashCode() {
79         int hash = 0;
80         hash += (id != null ? id.hashCode() : 0);
81         return hash;
82     }
83
84     @Override
85     public boolean equals(Object object) {
86         if (!(object instanceof IntervaloTabelaResposta)) {
87             return false;
88         }
89         IntervaloTabelaResposta other = (IntervaloTabelaResposta) object;
90         if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
91             return false;
92         }
93         return true;
94     }
95
96     @Override
97     public String toString() {
98         return "org.ufcspa.simdecs.entities.IntervaloTabelaRespota[ id=" + id + " ]";
99     }
100     
101 }