Package Entidade

Examples of Entidade.MetaItemPainelDeBordo


        Session session = HibernateUtil.getSessionFactory().openSession();
        session.beginTransaction();
        Query obj = session.createQuery("From MetaItemPainelDeBordo where mipbDscMes = :mes and ipbCodigo = :cod");
        obj.setString("mes", mipdb.getMipbDscMes());
        obj.setInteger("cod", mipdb.getIpbCodigo());
        MetaItemPainelDeBordo list = (MetaItemPainelDeBordo) obj.uniqueResult();
        session.getTransaction().commit();
        session.close();
        return list;
    }
View Full Code Here


    public void setIpbSelecionado(ItemPainelDeBordo ipbSelecionado) {
        this.ipbSelecionado = ipbSelecionado;
    }
   
    public void insereMeta() {
        MetaItemPainelDeBordo pesquisa = new MetaItemPainelDeBordo();
        this.mipdb.setIpbCodigo(ipbSelecionado.getIpbCodigo());
        MetaItemPainelDeBordoDao mipdbDao = new MetaItemPainelDeBordoDao();
        pesquisa = mipdbDao.buscaMeta(this.mipdb);
        if (pesquisa == null) {
            mipdbDao.salvar(this.mipdb);
        }
        else {
           pesquisa.setMipbNumMeta(this.mipdb.getMipbNumMeta());
            mipdbDao.salvar(pesquisa);
        }
        FacesMessage msg = new FacesMessage("Meta cadastrada para o mês de " + this.mipdb.getMipbDscMes() + "" , "");
        FacesContext.getCurrentInstance().addMessage("msgUpdate", msg);
    }
View Full Code Here

TOP

Related Classes of Entidade.MetaItemPainelDeBordo

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.