Rev 526 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 526 | Rev 528 | ||
|---|---|---|---|
| Line 8... | Line 8... | ||
| 8 | 8 | ||
| 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.core.util.DataUtils; |
|
| 13 | import br.com.ec.core.util.VerificadorUtil; |
14 | import br.com.ec.core.util.VerificadorUtil; |
| 14 | import br.com.ec.domain.dto.VigenciaDTO; |
15 | import br.com.ec.domain.dto.VigenciaDTO; |
| 15 | import br.com.ec.domain.model.Vigencia; |
16 | import br.com.ec.domain.model.Vigencia; |
| 16 | import br.com.ec.domain.service.VigenciaService; |
17 | import br.com.ec.domain.service.VigenciaService; |
| 17 | import br.com.ec.web.generic.AbstractBean; |
18 | import br.com.ec.web.generic.AbstractBean; |
| Line 23... | Line 24... | ||
| 23 | private static final long serialVersionUID = 1L; |
24 | private static final long serialVersionUID = 1L; |
| 24 | 25 | ||
| 25 | private VigenciaService vigenciaService; |
26 | private VigenciaService vigenciaService; |
| 26 | 27 | ||
| 27 | private List<VigenciaDTO> listaVigencia; |
28 | private List<VigenciaDTO> listaVigencia; |
| - | 29 | private Vigencia vigenciaAtual; |
|
| 28 | 30 | ||
| 29 | @Inject |
31 | @Inject |
| 30 | public VigenciaBean(VigenciaService vigenciaService) { |
32 | public VigenciaBean(VigenciaService vigenciaService) { |
| 31 | this.vigenciaService = vigenciaService; |
33 | this.vigenciaService = vigenciaService; |
| 32 | }
|
34 | }
|
| Line 34... | Line 36... | ||
| 34 | @Override |
36 | @Override |
| 35 | public void preCarregamento() { |
37 | public void preCarregamento() { |
| 36 | entidade = new Vigencia(); |
38 | entidade = new Vigencia(); |
| 37 | parametrosConsulta = new ParametrosConsulta<Vigencia>(); |
39 | parametrosConsulta = new ParametrosConsulta<Vigencia>(); |
| 38 | parametrosConsulta.setEntidade(entidade); |
40 | parametrosConsulta.setEntidade(entidade); |
| - | 41 | setVigenciaAtual(vigenciaService.consultarVigenciaDoPeriodo(DataUtils.getDataAtual())); |
|
| 39 | }
|
42 | }
|
| 40 | 43 | ||
| 41 | @Override |
44 | @Override |
| 42 | public void limparEntidade() { |
45 | public void limparEntidade() { |
| 43 | setEntidade(new Vigencia()); |
46 | setEntidade(new Vigencia()); |
| Line 64... | Line 67... | ||
| 64 | }
|
67 | }
|
| 65 | return listaVigencia; |
68 | return listaVigencia; |
| 66 | }
|
69 | }
|
| 67 | public void setListaVigencia(List<VigenciaDTO> listaVigencia) { |
70 | public void setListaVigencia(List<VigenciaDTO> listaVigencia) { |
| 68 | this.listaVigencia = listaVigencia; |
71 | this.listaVigencia = listaVigencia; |
| - | 72 | }
|
|
| - | 73 | ||
| - | 74 | public Vigencia getVigenciaAtual() { |
|
| - | 75 | return vigenciaAtual; |
|
| - | 76 | }
|
|
| - | 77 | public void setVigenciaAtual(Vigencia vigenciaAtual) { |
|
| - | 78 | this.vigenciaAtual = vigenciaAtual; |
|
| 69 | }
|
79 | }
|
| 70 | 80 | ||
| 71 | }
|
81 | }
|