Blame |
Last modification |
View Log
| Download
| RSS feed
package br.gov.al.saude.scs.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
@Embeddable
public class TurmaProcessoId
implements Serializable {
private static final long serialVersionUID = 1L
;
private Long sequencialTurma
;
private Integer codigoOrgao
;
private Long numeroProcesso
;
private Integer numeroAno
;
@Column
(name =
"seq_turma", nullable =
false)
public Long getSequencialTurma
() {
return sequencialTurma
;
}
public void setSequencialTurma
(Long sequencialTurma
) {
this.
sequencialTurma = sequencialTurma
;
}
@Column
(name =
"cod_orgao", nullable =
false)
public Integer getCodigoOrgao
() {
return codigoOrgao
;
}
public void setCodigoOrgao
(Integer codigoOrgao
) {
this.
codigoOrgao = codigoOrgao
;
}
@Column
(name =
"num_processo", nullable =
false)
public Long getNumeroProcesso
() {
return numeroProcesso
;
}
public void setNumeroProcesso
(Long numeroProcesso
) {
this.
numeroProcesso = numeroProcesso
;
}
@Column
(name =
"num_ano", nullable =
false)
public Integer getNumeroAno
() {
return numeroAno
;
}
public void setNumeroAno
(Integer numeroAno
) {
this.
numeroAno = numeroAno
;
}
@
Override
public int hashCode
() {
final int prime =
31;
int result =
1;
result = prime
* result
+
((codigoOrgao ==
null) ? 0 : codigoOrgao.
hashCode());
result = prime
* result
+
((numeroAno ==
null) ? 0 : numeroAno.
hashCode());
result = prime
* result
+
((numeroProcesso ==
null) ? 0 : numeroProcesso.
hashCode());
result = prime
* result
+
((sequencialTurma ==
null) ? 0 : sequencialTurma.
hashCode());
return result
;
}
@
Override
public boolean equals
(Object obj
) {
if (this == obj
)
return true;
if (obj ==
null)
return false;
if (getClass
() != obj.
getClass())
return false;
TurmaProcessoId other =
(TurmaProcessoId
) obj
;
if (codigoOrgao ==
null) {
if (other.
codigoOrgao !=
null)
return false;
} else if (!codigoOrgao.
equals(other.
codigoOrgao))
return false;
if (numeroAno ==
null) {
if (other.
numeroAno !=
null)
return false;
} else if (!numeroAno.
equals(other.
numeroAno))
return false;
if (numeroProcesso ==
null) {
if (other.
numeroProcesso !=
null)
return false;
} else if (!numeroProcesso.
equals(other.
numeroProcesso))
return false;
if (sequencialTurma ==
null) {
if (other.
sequencialTurma !=
null)
return false;
} else if (!sequencialTurma.
equals(other.
sequencialTurma))
return false;
return true;
}
}