Rev 216 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 216 | espaco | 1 | package br.com.ec.controller; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | |||
| 5 | import javax.inject.Inject; |
||
| 242 | espaco | 6 | import javax.inject.Named; |
| 216 | espaco | 7 | |
| 8 | import org.springframework.context.annotation.Scope; |
||
| 9 | |||
| 10 | import br.com.ec.core.generic.GenericService; |
||
| 11 | import br.com.ec.core.util.VerificadorUtil; |
||
| 12 | import br.com.ec.domain.modal.Pendencia; |
||
| 13 | import br.com.ec.domain.service.PendenciaService; |
||
| 14 | import br.com.ec.web.generic.AbstractBean; |
||
| 15 | |||
| 242 | espaco | 16 | @Named |
| 216 | espaco | 17 | @Scope("view") |
| 18 | public class PendenciaBean extends AbstractBean<Pendencia> implements Serializable { |
||
| 19 | |||
| 20 | private static final long serialVersionUID = 1L; |
||
| 21 | |||
| 22 | private Integer quantidadePendencias; |
||
| 23 | |||
| 24 | private PendenciaService pendenciaService; |
||
| 25 | /* |
||
| 26 | private List<Pendencia> pendencias; |
||
| 27 | private List<PendenciaDTO> pendenciasUltimasFinalizadasDTO; |
||
| 28 | private Integer quantidadePendenciasRespondidas; |
||
| 29 | |||
| 30 | private LojaService lojaService; |
||
| 31 | |||
| 32 | private Pendencia pendenciaSelecionado; |
||
| 33 | private Loja lojaSelecionada; |
||
| 34 | |||
| 35 | private String senhaUsuario; |
||
| 36 | private UsuarioService usuarioService; |
||
| 37 | private ContextoSeguranca contextoSeguranca; |
||
| 38 | */ |
||
| 39 | |||
| 40 | @Inject |
||
| 41 | public PendenciaBean(PendenciaService pendenciaService/*, LojaService lojaService, UsuarioService usuarioService, ContextoSeguranca contextoSeguranca*/) { |
||
| 42 | this.pendenciaService = pendenciaService; |
||
| 43 | /* |
||
| 44 | this.lojaService = lojaService; |
||
| 45 | this.usuarioService = usuarioService; |
||
| 46 | this.contextoSeguranca = contextoSeguranca; |
||
| 47 | */ |
||
| 48 | } |
||
| 49 | |||
| 50 | @Override |
||
| 51 | public GenericService<Pendencia> getService() { |
||
| 52 | // return pendenciaService; |
||
| 53 | return null; |
||
| 54 | } |
||
| 55 | |||
| 56 | @Override |
||
| 57 | public Pendencia getId() { |
||
| 58 | // TODO Auto-generated method stub |
||
| 59 | return null; |
||
| 60 | } |
||
| 61 | |||
| 62 | @Override |
||
| 63 | public void limparEntidade() { |
||
| 64 | // TODO Auto-generated method stub |
||
| 65 | |||
| 66 | } |
||
| 67 | |||
| 68 | public Integer getQuantidadePendencias() { |
||
| 69 | if (VerificadorUtil.estaNulo(quantidadePendencias)) { |
||
| 70 | setQuantidadePendencias(pendenciaService.quantidadePendencias()); |
||
| 71 | } |
||
| 72 | return quantidadePendencias; |
||
| 73 | } |
||
| 74 | public void setQuantidadePendencias(Integer quantidadePendencias) { |
||
| 75 | this.quantidadePendencias = quantidadePendencias; |
||
| 76 | } |
||
| 77 | |||
| 78 | } |