Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.scs.model.view; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | |||
| 5 | import javax.persistence.Column; |
||
| 6 | import javax.persistence.Embeddable; |
||
| 7 | |||
| 8 | |||
| 9 | @Embeddable |
||
| 10 | public class ProcessoElementoViewId implements Serializable { |
||
| 11 | |||
| 12 | private static final long serialVersionUID = 1L; |
||
| 13 | |||
| 14 | private String elementoDespesa; |
||
| 15 | private String fonteRecurso; |
||
| 16 | private Double valorOrcado; |
||
| 17 | |||
| 18 | @Column(name="dsc_elemento_despesa") |
||
| 19 | public String getElementoDespesa() { |
||
| 20 | return elementoDespesa; |
||
| 21 | } |
||
| 22 | public void setElementoDespesa(String elementoDespesa) { |
||
| 23 | this.elementoDespesa = elementoDespesa; |
||
| 24 | } |
||
| 25 | |||
| 26 | @Column(name="dsc_fonte_recurso") |
||
| 27 | public String getFonteRecurso() { |
||
| 28 | return fonteRecurso; |
||
| 29 | } |
||
| 30 | public void setFonteRecurso(String fonteRecurso) { |
||
| 31 | this.fonteRecurso = fonteRecurso; |
||
| 32 | } |
||
| 33 | |||
| 34 | @Column(name="val_orcado") |
||
| 35 | public Double getValorOrcado() { |
||
| 36 | return valorOrcado; |
||
| 37 | } |
||
| 38 | public void setValorOrcado(Double valorOrcado) { |
||
| 39 | this.valorOrcado = valorOrcado; |
||
| 40 | } |
||
| 41 | |||
| 42 | @Override |
||
| 43 | public int hashCode() { |
||
| 44 | final int prime = 31; |
||
| 45 | int result = 1; |
||
| 46 | result = prime * result |
||
| 47 | + ((elementoDespesa == null) ? 0 : elementoDespesa.hashCode()); |
||
| 48 | result = prime * result |
||
| 49 | + ((fonteRecurso == null) ? 0 : fonteRecurso.hashCode()); |
||
| 50 | result = prime * result |
||
| 51 | + ((valorOrcado == null) ? 0 : valorOrcado.hashCode()); |
||
| 52 | return result; |
||
| 53 | } |
||
| 54 | |||
| 55 | @Override |
||
| 56 | public boolean equals(Object obj) { |
||
| 57 | if (this == obj) |
||
| 58 | return true; |
||
| 59 | if (obj == null) |
||
| 60 | return false; |
||
| 61 | if (getClass() != obj.getClass()) |
||
| 62 | return false; |
||
| 63 | ProcessoElementoViewId other = (ProcessoElementoViewId) obj; |
||
| 64 | if (elementoDespesa == null) { |
||
| 65 | if (other.elementoDespesa != null) |
||
| 66 | return false; |
||
| 67 | } else if (!elementoDespesa.equals(other.elementoDespesa)) |
||
| 68 | return false; |
||
| 69 | if (fonteRecurso == null) { |
||
| 70 | if (other.fonteRecurso != null) |
||
| 71 | return false; |
||
| 72 | } else if (!fonteRecurso.equals(other.fonteRecurso)) |
||
| 73 | return false; |
||
| 74 | if (valorOrcado == null) { |
||
| 75 | if (other.valorOrcado != null) |
||
| 76 | return false; |
||
| 77 | } else if (!valorOrcado.equals(other.valorOrcado)) |
||
| 78 | return false; |
||
| 79 | return true; |
||
| 80 | } |
||
| 81 | |||
| 82 | } |