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;
9 import javax.persistence.*;
16 @Table(name="Intervencao_Pedagogica", uniqueConstraints={@UniqueConstraint(columnNames={"sessao_id", "estrategia", "resultado"})})
17 public class IntervencaoPedagogica implements Serializable {
20 @SequenceGenerator(name="seqIntervencaoPedagogica", sequenceName="SQ_INTERVENCAO_PEDAGOGICA")
21 @GeneratedValue(strategy=GenerationType.AUTO, generator="seqIntervencaoPedagogica")
25 @JoinColumn(name="sessao_id", nullable=false)
26 private SessaoUsuario sessaoUsuario;
28 @Column(length=30, nullable=false)
29 private String estrategia;
31 @Column(length=30, nullable=false)
32 private String resultado;
35 @JoinColumn(name="tatica_id", nullable=false)
36 private TaticaPedagogica tatica;
38 @Temporal(TemporalType.TIMESTAMP)
39 @Column(nullable=false)
40 private Date dataGeracao;
42 @Column(nullable=false)
43 private boolean aplicada;
45 public boolean isAplicada() {
49 public void setAplicada(boolean aplicada) {
50 this.aplicada = aplicada;
53 public Date getDataGeracao() {
57 public void setDataGeracao(Date dataGeracao) {
58 this.dataGeracao = dataGeracao;
61 public String getEstrategia() {
65 public void setEstrategia(String estrategia) {
66 this.estrategia = estrategia;
73 public void setId(Long id) {
77 public String getResultado() {
81 public void setResultado(String resultado) {
82 this.resultado = resultado;
85 public SessaoUsuario getSessaoUsuario() {
89 public void setSessaoUsuario(SessaoUsuario sessaoUsuario) {
90 this.sessaoUsuario = sessaoUsuario;
93 public TaticaPedagogica getTatica() {
97 public void setTatica(TaticaPedagogica tatica) {
102 public boolean equals(Object obj) {
106 if (getClass() != obj.getClass()) {
109 final IntervencaoPedagogica other = (IntervencaoPedagogica) obj;
110 if (this.sessaoUsuario != other.sessaoUsuario && (this.sessaoUsuario == null || !this.sessaoUsuario.equals(other.sessaoUsuario))) {
113 if ((this.estrategia == null) ? (other.estrategia != null) : !this.estrategia.equals(other.estrategia)) {
116 if ((this.resultado == null) ? (other.resultado != null) : !this.resultado.equals(other.resultado)) {
123 public int hashCode() {
125 hash = 43 * hash + (this.sessaoUsuario != null ? this.sessaoUsuario.hashCode() : 0);
126 hash = 43 * hash + (this.estrategia != null ? this.estrategia.hashCode() : 0);
127 hash = 43 * hash + (this.resultado != null ? this.resultado.hashCode() : 0);
132 public String toString() {
133 return "IntervencaoPedagogica{" + "id=" + id + ", sessaoUsuario=" + sessaoUsuario + ", estrategia=" + estrategia + ", resultado=" + resultado + ", tatica=" + tatica + ", dataGeracao=" + dataGeracao + ", aplicada=" + aplicada + '}';
136 public IntervencaoPedagogica() {