Rev 325 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 325 | Rev 528 | ||
|---|---|---|---|
| Line 21... | Line 21... | ||
| 21 | 21 | ||
| 22 | private static final long serialVersionUID = 1L; |
22 | private static final long serialVersionUID = 1L; |
| 23 | 23 | ||
| 24 | private TemaEstampaService temaEstampaService; |
24 | private TemaEstampaService temaEstampaService; |
| 25 | private TemaEstampaDTO entidadeParaConsulta; |
25 | private TemaEstampaDTO entidadeParaConsulta; |
| 26 | private List<TemaEstampaDTO> temas; |
- | |
| - | 26 | private List<TemaEstampa> temas; |
|
| - | 27 | private List<TemaEstampaDTO> temasDTO; |
|
| 27 | 28 | ||
| 28 | @Inject |
29 | @Inject |
| 29 | public TemaEstampaBean(TemaEstampaService temaEstampaService) { |
30 | public TemaEstampaBean(TemaEstampaService temaEstampaService) { |
| 30 | this.temaEstampaService = temaEstampaService; |
31 | this.temaEstampaService = temaEstampaService; |
| 31 | }
|
32 | }
|
| 32 | 33 | ||
| 33 | @Override |
34 | @Override |
| 34 | public void preCarregamento() { |
35 | public void preCarregamento() { |
| 35 | limparEntidade(); |
36 | limparEntidade(); |
| 36 | consultarTemas(); |
37 | consultarTemas(); |
| - | 38 | consultarTemasDTO(); |
|
| 37 | }
|
39 | }
|
| 38 | 40 | ||
| 39 | @Override |
41 | @Override |
| 40 | public void limparEntidade() { |
42 | public void limparEntidade() { |
| 41 | setEntidade(new TemaEstampa()); |
43 | setEntidade(new TemaEstampa()); |
| 42 | setEntidadeParaConsulta(new TemaEstampaDTO()); |
44 | setEntidadeParaConsulta(new TemaEstampaDTO()); |
| 43 | consultarTemas(); |
45 | consultarTemas(); |
| - | 46 | consultarTemasDTO(); |
|
| 44 | }
|
47 | }
|
| 45 | 48 | ||
| 46 | @Override |
49 | @Override |
| 47 | public GenericService<TemaEstampa> getService() { |
50 | public GenericService<TemaEstampa> getService() { |
| 48 | return temaEstampaService; |
51 | return temaEstampaService; |
| Line 70... | Line 73... | ||
| 70 | }
|
73 | }
|
| 71 | public void setEntidadeParaConsulta(TemaEstampaDTO entidadeParaConsulta) { |
74 | public void setEntidadeParaConsulta(TemaEstampaDTO entidadeParaConsulta) { |
| 72 | this.entidadeParaConsulta = entidadeParaConsulta; |
75 | this.entidadeParaConsulta = entidadeParaConsulta; |
| 73 | }
|
76 | }
|
| 74 | 77 | ||
| 75 | public List<TemaEstampaDTO> getTemas() { |
- | |
| - | 78 | public List<TemaEstampa> getTemas() { |
|
| 76 | return temas; |
79 | return temas; |
| 77 | }
|
80 | }
|
| 78 | public void setTemas(List<TemaEstampaDTO> temas) { |
- | |
| - | 81 | public void setTemas(List<TemaEstampa> temas) { |
|
| 79 | this.temas = temas; |
82 | this.temas = temas; |
| - | 83 | }
|
|
| - | 84 | ||
| - | 85 | public List<TemaEstampaDTO> getTemasDTO() { |
|
| - | 86 | return temasDTO; |
|
| - | 87 | }
|
|
| - | 88 | public void setTemasDTO(List<TemaEstampaDTO> temasDTO) { |
|
| - | 89 | this.temasDTO = temasDTO; |
|
| 80 | }
|
90 | }
|
| 81 | 91 | ||
| 82 | /*************************************************/
|
92 | /*************************************************/
|
| 83 | 93 | ||
| 84 | public void prepararDetalhar(TemaEstampaDTO temaEstampaDTO) { |
94 | public void prepararDetalhar(TemaEstampaDTO temaEstampaDTO) { |
| Line 88... | Line 98... | ||
| 88 | public void prepararAlterar(TemaEstampaDTO temaEstampaDTO) { |
98 | public void prepararAlterar(TemaEstampaDTO temaEstampaDTO) { |
| 89 | super.preAlterar(temaEstampaService.consultarPorId(new TemaEstampa(temaEstampaDTO.getSequencial()))); |
99 | super.preAlterar(temaEstampaService.consultarPorId(new TemaEstampa(temaEstampaDTO.getSequencial()))); |
| 90 | }
|
100 | }
|
| 91 | 101 | ||
| 92 | public void consultarTemas() { |
102 | public void consultarTemas() { |
| 93 | setTemas(temaEstampaService.consultarTemas(getEntidadeParaConsulta())); |
- | |
| - | 103 | setTemas(temaEstampaService.consultarTemasAtivos()); |
|
| - | 104 | }
|
|
| - | 105 | ||
| - | 106 | public void consultarTemasDTO() { |
|
| - | 107 | setTemasDTO(temaEstampaService.consultarTemas(getEntidadeParaConsulta())); |
|
| 94 | }
|
108 | }
|
| 95 | 109 | ||
| 96 | }
|
110 | }
|