Rev 195 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 195 | Rev 293 | ||
|---|---|---|---|
| Line 9... | Line 9... | ||
| 9 | import org.springframework.context.annotation.Scope; |
9 | import org.springframework.context.annotation.Scope; |
| 10 | 10 | ||
| 11 | import br.com.ec.core.consulta.ParametrosConsulta; |
11 | import br.com.ec.core.consulta.ParametrosConsulta; |
| 12 | import br.com.ec.core.generic.GenericService; |
12 | import br.com.ec.core.generic.GenericService; |
| 13 | import br.com.ec.domain.model.ContaBancaria; |
13 | import br.com.ec.domain.model.ContaBancaria; |
| - | 14 | import br.com.ec.domain.model.Pessoa; |
|
| - | 15 | import br.com.ec.domain.model.tipos.TipoContaBancaria; |
|
| 14 | import br.com.ec.domain.service.contabancaria.ContaBancariaService; |
16 | import br.com.ec.domain.service.contabancaria.ContaBancariaService; |
| - | 17 | import br.com.ec.web.exception.VerificadorLancamentoException; |
|
| - | 18 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
|
| 15 | import br.com.ec.web.generic.AbstractBean; |
19 | import br.com.ec.web.generic.AbstractBean; |
| 16 | 20 | ||
| 17 | @Named |
21 | @Named |
| 18 | @Scope("view") |
22 | @Scope("view") |
| 19 | public class ContaBancariaBean extends AbstractBean<ContaBancaria> implements Serializable { |
23 | public class ContaBancariaBean extends AbstractBean<ContaBancaria> implements Serializable { |
| Line 53... | Line 57... | ||
| 53 | }
|
57 | }
|
| 54 | 58 | ||
| 55 | @Override |
59 | @Override |
| 56 | public ContaBancaria getId() { |
60 | public ContaBancaria getId() { |
| 57 | return getEntidade(); |
61 | return getEntidade(); |
| - | 62 | }
|
|
| - | 63 | ||
| - | 64 | public TipoContaBancaria[] getTiposContaBancaria() { |
|
| - | 65 | return TipoContaBancaria.values(); |
|
| 58 | }
|
66 | }
|
| 59 | 67 | ||
| 60 | public ContaBancaria getContaBancariaSelecionado() { |
68 | public ContaBancaria getContaBancariaSelecionado() { |
| 61 | return contaBancariaSelecionado; |
69 | return contaBancariaSelecionado; |
| 62 | }
|
70 | }
|
| Line 76... | Line 84... | ||
| 76 | return contaBancariaService.consultarSaldo(null); |
84 | return contaBancariaService.consultarSaldo(null); |
| 77 | }
|
85 | }
|
| 78 | 86 | ||
| 79 | public Double saldoConta(ContaBancaria contaBancaria) { |
87 | public Double saldoConta(ContaBancaria contaBancaria) { |
| 80 | return contaBancariaService.consultarSaldo(contaBancaria); |
88 | return contaBancariaService.consultarSaldo(contaBancaria); |
| - | 89 | }
|
|
| - | 90 | ||
| - | 91 | public void selecionarPessoa(final Pessoa pessoa) { |
|
| - | 92 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
|
| - | 93 | public void execute() { |
|
| - | 94 | getEntidade().setPessoa(pessoa); |
|
| - | 95 | adicionandoParametroArgsConfirmandoAcao(true); |
|
| - | 96 | }
|
|
| - | 97 | }); |
|
| - | 98 | }
|
|
| - | 99 | ||
| - | 100 | public void retirarPessoa() { |
|
| - | 101 | getEntidade().setPessoa(null); |
|
| 81 | }
|
102 | }
|
| 82 | 103 | ||
| 83 | }
|
104 | }
|