Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.scs.web.managebean.unidade; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | import java.util.List; |
||
| 5 | |||
| 6 | import javax.faces.bean.ManagedBean; |
||
| 7 | |||
| 8 | import org.springframework.beans.factory.annotation.Autowired; |
||
| 9 | import org.springframework.context.annotation.Scope; |
||
| 10 | import org.springframework.stereotype.Component; |
||
| 11 | |||
| 12 | import br.gov.al.saude.scs.core.application.unidade.UnidadeFacade; |
||
| 13 | import br.gov.al.saude.scs.model.view.UnidadeView; |
||
| 14 | |||
| 15 | @Component |
||
| 16 | @ManagedBean |
||
| 17 | @Scope("view") |
||
| 18 | public class UnidadeBean implements Serializable { |
||
| 19 | |||
| 20 | private static final long serialVersionUID = 1L; |
||
| 21 | |||
| 22 | private List<UnidadeView> unidades; |
||
| 23 | |||
| 24 | @Autowired |
||
| 25 | public UnidadeBean(UnidadeFacade unidadeFacade) { |
||
| 26 | unidades = unidadeFacade.listar(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public List<UnidadeView> getUnidades() { |
||
| 30 | return unidades; |
||
| 31 | } |
||
| 32 | } |