From b01f300ea997b2db9bb5b85ced3eb04d176e36c7 Mon Sep 17 00:00:00 2001 From: pbarros Date: Wed, 11 Jan 2012 12:14:28 -0200 Subject: [PATCH] =?utf8?q?Classe=20identidade,=20para=20armazenar=20resposta?= =?utf8?q?=20mediador,=20com=20orienta=C3=A7=C3=A3o=20pedagogica.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../ufcspa/simdecs/entidade/RespostaMediador.java | 67 ++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 src/java/org/ufcspa/simdecs/entidade/RespostaMediador.java diff --git a/src/java/org/ufcspa/simdecs/entidade/RespostaMediador.java b/src/java/org/ufcspa/simdecs/entidade/RespostaMediador.java new file mode 100644 index 0000000..7e367a0 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entidade/RespostaMediador.java @@ -0,0 +1,67 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.entidade; + +import java.io.Serializable; +import javax.persistence.*; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * + * @author pbarros + */ +@Entity +@Table(name="RespostaMediador") +public class RespostaMediador implements Serializable { + private static final long serialVersionUID = 1L; + + @SequenceGenerator(name="seqRespMediador", sequenceName="SQRESOM") + @GeneratedValue(strategy=GenerationType.AUTO, generator="seqRespMediador") + @Id + private Long id; + + @Column(length=255) + private String resposta; + + + @Column(length=255) + private String endArquivo; + + + public Long getId() { return this.id; } + public void setId(Long id) { this.id = id; } + public String getNome() { return this.resposta; } + public void setNome(String name) { this.resposta = resposta; } + public String getEndArquivo() { return this.endArquivo; } + public void setEndArquivo(String endArquivo) { this.endArquivo = endArquivo; } + + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @Override + public boolean equals(Object object) { + // TODO: Warning - this method won't work in the case the id fields are not set + if (!(object instanceof RespostaMediador)) { + return false; + } + RespostaMediador other = (RespostaMediador) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entidade.RespostaMediador[ id=" + id + " ]"; + } + +} -- 1.7.6.4