(no commit message)
[simdecs2.git] / src / java / org / ufcspa / simdecs / entities / TabelaResposta.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="TABELA_RESPOSTA")
16 public class TabelaResposta implements Serializable {
17
18     private static final long serialVersionUID = 1L;
19     @Id
20     @SequenceGenerator(name="seqTabelaResposta", sequenceName="SQ_TABELA_RESPOSTA")
21     @GeneratedValue(strategy = GenerationType.AUTO, generator="seqTabelaResposta")
22     private Long id;
23     
24     @Column(nullable=false, length=100)
25     private String nome;
26
27     public String getNome() {
28         return nome;
29     }
30
31     public void setNome(String nome) {
32         this.nome = nome;
33     }
34
35     public Long getId() {
36         return id;
37     }
38
39     public void setId(Long id) {
40         this.id = id;
41     }
42
43     
44     
45     @Override
46     public int hashCode() {
47         int hash = 0;
48         hash += (id != null ? id.hashCode() : 0);
49         return hash;
50     }
51
52     @Override
53     public boolean equals(Object object) {
54         // TODO: Warning - this method won't work in the case the id fields are not set
55         if (!(object instanceof TabelaResposta)) {
56             return false;
57         }
58         TabelaResposta other = (TabelaResposta) object;
59         if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
60             return false;
61         }
62         return true;
63     }
64
65     @Override
66     public String toString() {
67         return "org.ufcspa.simdecs.entities.TabelaResposta[ id=" + id + " ]";
68     }
69     
70 }