Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.scs.model; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | |||
| 5 | import javax.persistence.Column; |
||
| 6 | import javax.persistence.Embeddable; |
||
| 7 | |||
| 8 | |||
| 9 | @Embeddable |
||
| 10 | public class TurmaProcessoId implements Serializable { |
||
| 11 | |||
| 12 | private static final long serialVersionUID = 1L; |
||
| 13 | |||
| 14 | private Long sequencialTurma; |
||
| 15 | private Integer codigoOrgao; |
||
| 16 | private Long numeroProcesso; |
||
| 17 | private Integer numeroAno; |
||
| 18 | |||
| 19 | @Column(name = "seq_turma", nullable = false) |
||
| 20 | public Long getSequencialTurma() { |
||
| 21 | return sequencialTurma; |
||
| 22 | } |
||
| 23 | public void setSequencialTurma(Long sequencialTurma) { |
||
| 24 | this.sequencialTurma = sequencialTurma; |
||
| 25 | } |
||
| 26 | |||
| 27 | @Column(name = "cod_orgao", nullable = false) |
||
| 28 | public Integer getCodigoOrgao() { |
||
| 29 | return codigoOrgao; |
||
| 30 | } |
||
| 31 | public void setCodigoOrgao(Integer codigoOrgao) { |
||
| 32 | this.codigoOrgao = codigoOrgao; |
||
| 33 | } |
||
| 34 | |||
| 35 | @Column(name = "num_processo", nullable = false) |
||
| 36 | public Long getNumeroProcesso() { |
||
| 37 | return numeroProcesso; |
||
| 38 | } |
||
| 39 | public void setNumeroProcesso(Long numeroProcesso) { |
||
| 40 | this.numeroProcesso = numeroProcesso; |
||
| 41 | } |
||
| 42 | |||
| 43 | @Column(name = "num_ano", nullable = false) |
||
| 44 | public Integer getNumeroAno() { |
||
| 45 | return numeroAno; |
||
| 46 | } |
||
| 47 | public void setNumeroAno(Integer numeroAno) { |
||
| 48 | this.numeroAno = numeroAno; |
||
| 49 | } |
||
| 50 | |||
| 51 | @Override |
||
| 52 | public int hashCode() { |
||
| 53 | final int prime = 31; |
||
| 54 | int result = 1; |
||
| 55 | result = prime * result |
||
| 56 | + ((codigoOrgao == null) ? 0 : codigoOrgao.hashCode()); |
||
| 57 | result = prime * result |
||
| 58 | + ((numeroAno == null) ? 0 : numeroAno.hashCode()); |
||
| 59 | result = prime * result |
||
| 60 | + ((numeroProcesso == null) ? 0 : numeroProcesso.hashCode()); |
||
| 61 | result = prime * result |
||
| 62 | + ((sequencialTurma == null) ? 0 : sequencialTurma.hashCode()); |
||
| 63 | return result; |
||
| 64 | } |
||
| 65 | |||
| 66 | @Override |
||
| 67 | public boolean equals(Object obj) { |
||
| 68 | if (this == obj) |
||
| 69 | return true; |
||
| 70 | if (obj == null) |
||
| 71 | return false; |
||
| 72 | if (getClass() != obj.getClass()) |
||
| 73 | return false; |
||
| 74 | TurmaProcessoId other = (TurmaProcessoId) obj; |
||
| 75 | if (codigoOrgao == null) { |
||
| 76 | if (other.codigoOrgao != null) |
||
| 77 | return false; |
||
| 78 | } else if (!codigoOrgao.equals(other.codigoOrgao)) |
||
| 79 | return false; |
||
| 80 | if (numeroAno == null) { |
||
| 81 | if (other.numeroAno != null) |
||
| 82 | return false; |
||
| 83 | } else if (!numeroAno.equals(other.numeroAno)) |
||
| 84 | return false; |
||
| 85 | if (numeroProcesso == null) { |
||
| 86 | if (other.numeroProcesso != null) |
||
| 87 | return false; |
||
| 88 | } else if (!numeroProcesso.equals(other.numeroProcesso)) |
||
| 89 | return false; |
||
| 90 | if (sequencialTurma == null) { |
||
| 91 | if (other.sequencialTurma != null) |
||
| 92 | return false; |
||
| 93 | } else if (!sequencialTurma.equals(other.sequencialTurma)) |
||
| 94 | return false; |
||
| 95 | return true; |
||
| 96 | } |
||
| 97 | |||
| 98 | } |