Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.rhd.model; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | |||
| 5 | import javax.persistence.Column; |
||
| 6 | import javax.persistence.Entity; |
||
| 7 | import javax.persistence.Id; |
||
| 8 | import javax.persistence.Table; |
||
| 9 | import javax.persistence.Transient; |
||
| 10 | |||
| 11 | import br.gov.al.saude.framework.core.generic.identidade.Identidade; |
||
| 12 | |||
| 13 | @Entity |
||
| 14 | @Table(name = "rhd_etapa", schema = "sc_rhd") |
||
| 15 | public class Etapa implements Serializable, Identidade { |
||
| 16 | |||
| 17 | private static final long serialVersionUID = 1L; |
||
| 18 | |||
| 19 | private Long codigo; |
||
| 20 | private String descricao; |
||
| 21 | private String observacao; |
||
| 22 | private String responsavel; |
||
| 23 | private Boolean indicadorAtivo; |
||
| 24 | |||
| 25 | @Id |
||
| 26 | @Column(name="cod_etapa", nullable=false) |
||
| 27 | public Long getCodigo() { |
||
| 28 | return codigo; |
||
| 29 | } |
||
| 30 | |||
| 31 | public void setCodigo(Long codigo) { |
||
| 32 | this.codigo = codigo; |
||
| 33 | } |
||
| 34 | |||
| 35 | @Column(name="dsc_etapa", nullable=false) |
||
| 36 | public String getDescricao() { |
||
| 37 | return descricao; |
||
| 38 | } |
||
| 39 | |||
| 40 | public void setDescricao(String descricao) { |
||
| 41 | this.descricao = descricao; |
||
| 42 | } |
||
| 43 | |||
| 44 | @Column(name="dsc_observacao", nullable=false) |
||
| 45 | public String getObservacao() { |
||
| 46 | return observacao; |
||
| 47 | } |
||
| 48 | |||
| 49 | public void setObservacao(String observacao) { |
||
| 50 | this.observacao = observacao; |
||
| 51 | } |
||
| 52 | |||
| 53 | @Column(name="dsc_responsavel", nullable=false) |
||
| 54 | public String getResponsavel() { |
||
| 55 | return responsavel; |
||
| 56 | } |
||
| 57 | |||
| 58 | public void setResponsavel(String responsavel) { |
||
| 59 | this.responsavel = responsavel; |
||
| 60 | } |
||
| 61 | |||
| 62 | @Column(name="ind_ativo", nullable=false) |
||
| 63 | public Boolean getIndicadorAtivo() { |
||
| 64 | return indicadorAtivo; |
||
| 65 | } |
||
| 66 | |||
| 67 | public void setIndicadorAtivo(Boolean indicadorAtivo) { |
||
| 68 | this.indicadorAtivo = indicadorAtivo; |
||
| 69 | } |
||
| 70 | |||
| 71 | @Override |
||
| 72 | @Transient |
||
| 73 | public Object getId() { |
||
| 74 | return codigo; |
||
| 75 | } |
||
| 76 | |||
| 77 | @Override |
||
| 78 | public void setId(Object id) { |
||
| 79 | this.codigo = (Long) id; |
||
| 80 | } |
||
| 81 | |||
| 82 | @Override |
||
| 83 | public int hashCode() { |
||
| 84 | final int prime = 31; |
||
| 85 | int result = 1; |
||
| 86 | result = prime * result + ((codigo == null) ? 0 : codigo.hashCode()); |
||
| 87 | return result; |
||
| 88 | } |
||
| 89 | |||
| 90 | @Override |
||
| 91 | public boolean equals(Object obj) { |
||
| 92 | if (this == obj) |
||
| 93 | return true; |
||
| 94 | if (obj == null) |
||
| 95 | return false; |
||
| 96 | if (getClass() != obj.getClass()) |
||
| 97 | return false; |
||
| 98 | Etapa other = (Etapa) obj; |
||
| 99 | if (codigo == null) { |
||
| 100 | if (other.codigo != null) |
||
| 101 | return false; |
||
| 102 | } else if (!codigo.equals(other.codigo)) |
||
| 103 | return false; |
||
| 104 | return true; |
||
| 105 | } |
||
| 106 | |||
| 107 | } |