Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 369 | espaco | 1 | package br.com.ec.domain.dto; |
| 2 | |||
| 3 | import java.util.List; |
||
| 4 | |||
| 5 | import br.com.ec.core.util.VerificadorUtil; |
||
| 6 | |||
| 7 | public class ResumoExtratoBancarioDTO { |
||
| 8 | |||
| 9 | private VigenciaDTO vigenciaDTO; |
||
| 10 | |||
| 11 | private List<ExtratoBancoResumoDTO> resumosDTO; |
||
| 12 | |||
| 13 | public ResumoExtratoBancarioDTO() {} |
||
| 14 | |||
| 15 | public ResumoExtratoBancarioDTO(VigenciaDTO vigenciaDTO, List<ExtratoBancoResumoDTO> resumosDTO) { |
||
| 16 | super(); |
||
| 17 | this.vigenciaDTO = vigenciaDTO; |
||
| 18 | this.resumosDTO = resumosDTO; |
||
| 19 | } |
||
| 20 | |||
| 21 | public VigenciaDTO getVigenciaDTO() { |
||
| 22 | return vigenciaDTO; |
||
| 23 | } |
||
| 24 | |||
| 25 | public void setVigenciaDTO(VigenciaDTO vigenciaDTO) { |
||
| 26 | this.vigenciaDTO = vigenciaDTO; |
||
| 27 | } |
||
| 28 | |||
| 29 | public List<ExtratoBancoResumoDTO> getResumosDTO() { |
||
| 30 | return resumosDTO; |
||
| 31 | } |
||
| 32 | public void setResumosDTO(List<ExtratoBancoResumoDTO> resumosDTO) { |
||
| 33 | this.resumosDTO = resumosDTO; |
||
| 34 | } |
||
| 35 | |||
| 36 | /**************************************************************************/ |
||
| 37 | |||
| 38 | public Double valorTotalCreditos() { |
||
| 39 | Double valorFinal = new Double(0.0); |
||
| 40 | if (VerificadorUtil.naoEstaNulo(getResumosDTO())) { |
||
| 41 | for (ExtratoBancoResumoDTO resumo : getResumosDTO()) { |
||
| 42 | valorFinal = valorFinal + resumo.getValorTotalCreditos(); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | return valorFinal; |
||
| 46 | } |
||
| 47 | |||
| 48 | public Double valorTotalOutros() { |
||
| 49 | Double valorFinal = new Double(0.0); |
||
| 50 | if (VerificadorUtil.naoEstaNulo(getResumosDTO())) { |
||
| 51 | for (ExtratoBancoResumoDTO resumo : getResumosDTO()) { |
||
| 52 | valorFinal = valorFinal + resumo.getValorTotalOutros(); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | return valorFinal; |
||
| 56 | } |
||
| 57 | |||
| 58 | public Double valorTotal() { |
||
| 59 | return valorTotalCreditos() + valorTotalOutros(); |
||
| 60 | } |
||
| 61 | |||
| 62 | } |