Package Entidade

Examples of Entidade.Unidade


    public Unidade consultarPorId(Integer codigo) {
        Session session = HibernateUtil.getSessionFactory().openSession();
        session.beginTransaction();
        Query lista = session.createQuery("From Unidade where uniCodigo = :codigo");
        lista.setInteger("codigo", codigo);
        Unidade resultado = (Unidade) lista.uniqueResult();
        session.getTransaction().commit();
        session.close();
        return resultado;
    }
View Full Code Here


    
    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        if (value != null && !"".equals(value)) {
            //return new UnidadeDao().consultarPorId(Integer.parseInt(value));
            Unidade unidade = new UnidadeDao().consultarPorId(Integer.parseInt(value));

           
            if (unidade != null){
               return unidade;
            }
View Full Code Here

TOP

Related Classes of Entidade.Unidade

Copyright © 2018 www.massapicom. 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.