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.Column;
9 import javax.persistence.Entity;
10 import javax.persistence.GeneratedValue;
11 import javax.persistence.GenerationType;
12 import javax.persistence.Id;
13 import javax.persistence.JoinColumn;
14 import javax.persistence.ManyToOne;
15 import javax.persistence.SequenceGenerator;
16 import javax.persistence.Table;
23 @Table(name="RESPOSTA_NODO")
24 public class RespostaNodo implements Serializable {
26 private static final long serialVersionUID = 1L;
29 @SequenceGenerator(name="SeqRespotaNodo", sequenceName="SQ_RESPOTA_NODO")
30 @GeneratedValue(strategy = GenerationType.AUTO, generator="SeqRespotaNodo")
33 @Column(nullable=false, length=2000)
37 @JoinColumn(name="nodo_id", nullable=false)
41 @JoinColumn(name="tabres_id", nullable=false)
42 private TabelaResposta tabelaResposta;
48 public void setId(Long id) {
52 public Nodo getNodo() {
56 public void setNodo(Nodo nodo) {
60 public String getTexto() {
64 public void setTexto(String texto) {
68 public TabelaResposta getTabelaResposta() {
69 return tabelaResposta;
72 public void setTabelaResposta(TabelaResposta tabelaResposta) {
73 this.tabelaResposta = tabelaResposta;
76 public RespostaNodo() {
80 public boolean equals(Object obj) {
84 if (getClass() != obj.getClass()) {
87 final RespostaNodo other = (RespostaNodo) obj;
88 if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
95 public int hashCode() {
97 hash = 67 * hash + (this.id != null ? this.id.hashCode() : 0);
102 public String toString() {
103 return "RespostaNodo{" + "id=" + id + ", texto=" + texto + ", nodo=" + nodo + '}';