Package dao

Examples of dao.MetCerneriiDao


    @DefaultHandler
    public Resolution view() {
     
        //daca s-a mai facut metoda cernerii pt proba curenta,atunci se afiseaza valorile din BD
        met_cernerii = new MetodaCernerii();
        IMetCerneriiDao metCerneriiDao = new MetCerneriiDao();
        MetCernerii metCerneriiAuxiliar = metCerneriiDao.getMetCerneriiByIDProba(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));
        if (metCerneriiAuxiliar != null) {
            List<Float> valoriIntroduse = Arrays.asList(metCerneriiAuxiliar.getVal200(), metCerneriiAuxiliar.getVal150(), metCerneriiAuxiliar.getVal70(), metCerneriiAuxiliar.getVal40(), metCerneriiAuxiliar.getVal30(), metCerneriiAuxiliar.getVal20(), metCerneriiAuxiliar.getVal15(), metCerneriiAuxiliar.getVal10(), metCerneriiAuxiliar.getVal5(), metCerneriiAuxiliar.getVal2(), metCerneriiAuxiliar.getVal1(), metCerneriiAuxiliar.getVal05(), metCerneriiAuxiliar.getVal025(), metCerneriiAuxiliar.getVal01(), metCerneriiAuxiliar.getVal008(), metCerneriiAuxiliar.getVal0071(), metCerneriiAuxiliar.getVal005(), metCerneriiAuxiliar.getVal0());
            populeazaColoana2(metCerneriiAuxiliar);
            met_cernerii.setCantiateaRamasaPeSite1(valoriIntroduse);
            met_cernerii.setCantiateaRamasaPeSite2(formulaMetCerneriiCol3(valoriIntroduse, Float.parseFloat(getMd())));
View Full Code Here


        String x=getFormular().getVal0();
        List<Float> valoriIntroduse = Arrays.asList(Float.parseFloat(getFormular().getVal0()), Float.parseFloat(getFormular().getVal1()), Float.parseFloat(getFormular().getVal2()), Float.parseFloat(getFormular().getVal3()), Float.parseFloat(getFormular().getVal4()), Float.parseFloat(getFormular().getVal5()), Float.parseFloat(getFormular().getVal6()), Float.parseFloat(getFormular().getVal7()), Float.parseFloat(getFormular().getVal8()), Float.parseFloat(getFormular().getVal9()), Float.parseFloat(getFormular().getVal10()), Float.parseFloat(getFormular().getVal11()), Float.parseFloat(getFormular().getVal12()), Float.parseFloat(getFormular().getVal13()), Float.parseFloat(getFormular().getVal14()), Float.parseFloat(getFormular().getVal15()), Float.parseFloat(getFormular().getVal16()), Float.parseFloat(getFormular().getVal17()));

        //obiect format pt proba curenta cu valorile introduse pt introducere in BD
        MetCernerii metCerneriiBO = new MetCernerii(proba, valoriIntroduse.get(0), valoriIntroduse.get(1), valoriIntroduse.get(2), valoriIntroduse.get(3), valoriIntroduse.get(4), valoriIntroduse.get(5), valoriIntroduse.get(6), valoriIntroduse.get(7), valoriIntroduse.get(8), valoriIntroduse.get(9), valoriIntroduse.get(10), valoriIntroduse.get(11), valoriIntroduse.get(12), valoriIntroduse.get(13), valoriIntroduse.get(14), valoriIntroduse.get(15), valoriIntroduse.get(16), valoriIntroduse.get(17));
        IMetCerneriiDao metCerneriiDao = new MetCerneriiDao();

        //daca s-a mai facut metoda cernerii pt proba curenta, atunci se v-a face update la tupla corespunzatoare,altfel se introduce
        MetCernerii metCerneriiAuxiliar = metCerneriiDao.getMetCerneriiByIDProba(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));
        if (metCerneriiAuxiliar == null) {
            metCerneriiDao.saveOrUpdate(metCerneriiBO);
        } else {
            metCerneriiBO.setIdCernere(metCerneriiAuxiliar.getIdCernere());
            metCerneriiDao.saveOrUpdate(metCerneriiBO);
        }
        //update la proba pt parametrii md si rs

        proba.setMd(Float.parseFloat(getMdInput()));
        proba.setRs(Float.parseFloat(getRsInput()));
        probaDao.saveOrUpdate(proba);


        met_cernerii = new MetodaCernerii();
        //se modifica pt a afisa in pagina, noile valori introduse
        MetCernerii metCerneriiDinBd = metCerneriiDao.getMetCerneriiByIDProba(proba.getIdProba());
        List<Float> valoriDinBD = Arrays.asList(metCerneriiDinBd.getVal200(), metCerneriiDinBd.getVal150(), metCerneriiDinBd.getVal70(), metCerneriiDinBd.getVal40(), metCerneriiDinBd.getVal30(), metCerneriiDinBd.getVal20(), metCerneriiDinBd.getVal15(), metCerneriiDinBd.getVal10(), metCerneriiDinBd.getVal5(), metCerneriiDinBd.getVal2(), metCerneriiDinBd.getVal1(), metCerneriiDinBd.getVal05(), metCerneriiDinBd.getVal025(), metCerneriiDinBd.getVal01(), metCerneriiDinBd.getVal008(), metCerneriiDinBd.getVal0071(), metCerneriiDinBd.getVal005(), metCerneriiDinBd.getVal0());
        met_cernerii.setCantiateaRamasaPeSite1(valoriDinBD);
        //completam coloana3
        met_cernerii.setCantiateaRamasaPeSite2(formulaMetCerneriiCol3(valoriDinBD, Float.parseFloat(getMdInput())));
        //completam coloana4
View Full Code Here

TOP

Related Classes of dao.MetCerneriiDao

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.