Package Controle

Source Code of Controle.ControleClassificacaoRmp

package Controle;

import DAO.ClassificacaoRmpDao;
import Entidade.ClassificacaoRmp;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.model.SelectItem;

/**
*
* @author Kleysson
*/
@ManagedBean
@RequestScoped
public class ControleClassificacaoRmp {
   
   
     public ControleClassificacaoRmp(){
     }    

    
     private ClassificacaoRmp classificacao = new ClassificacaoRmp();

    
    
//-------- GETTERS AND SETTERS -------------------------------------------------
    
    public ClassificacaoRmp getClassificacao() {
        return classificacao;
    }
    public void setClassificacao(ClassificacaoRmp classificacao) {
        this.classificacao = classificacao;
    }
    
    
    
    
    
    
//-------- MÉTODOS -------------------------------------------------------------        
   
    public List<SelectItem> getListarClassificacoes(){
        List<SelectItem> listaItens = new ArrayList<SelectItem>();
        List<ClassificacaoRmp> lista = new ClassificacaoRmpDao().buscarClassificacoes();
        for (ClassificacaoRmp classificacao : lista) {
            SelectItem item = new SelectItem(classificacao, classificacao.getClasDscClassificacao());
            listaItens.add(item);
        }
        return listaItens;
    }   
   
}
TOP

Related Classes of Controle.ControleClassificacaoRmp

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.