Package dao

Examples of dao.CompresibilitateDao


    public Resolution view() {

        IProbaDao probaDao = new ProbaDao();
        Proba proba = probaDao.geProbaByID(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));
        // trebuie modificat sa afiseze sarcinile in comboboxuri direct cu gettere, asta dupa ce se rezolva punerea pe sesiune al id-ului probei
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        List<Float> sarciniL = compresibilitateDao.geSarciniByIDProba(proba.getIdProba());
        setSarcini(sarciniL);

        ICompresiuneDao compresiuneDao = new CompresiuneDao();
        List<Compresiune> compresiuni = compresiuneDao.geCompresiuneByIDProba(proba.getIdProba());
        CompresiuneTabel compTabel = new CompresiuneTabel();
View Full Code Here


        IProbaDao probaDao = new ProbaDao();
        Proba proba = probaDao.geProbaByID(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));

        //sa populeze comboboxurile
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        List<Float> sarciniL = compresibilitateDao.geSarciniByIDProba(proba.getIdProba());
        setSarcini(sarciniL);



        String sigma = getSarcina1() + "-" + getSarcina2();
View Full Code Here

    public List<Float> formulaCompresiuneCol2(List<String> dataS, int idProba) {
        List<Float> dateOut = new ArrayList<Float>();
        List<Float> citire = new ArrayList<Float>();
        float formula = 0;
        String[] sigma = new String[2];
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        Compresibilitate compresibilitate = null;
        IStantaDao stantaDao = new StantaDao();
        Stanta stanta = stantaDao.getStantaByIDProba(idProba);
        for (int i = 0; i < dataS.size(); i++) {
            sigma = dataS.get(i).split("-");
            compresibilitate = compresibilitateDao.geCompresibilitateByIDProbaAndSarcina(idProba, sigma[0]);
            citire.add(compresibilitate.getCitire());
            formula = citire.get(i) / stanta.getInaltimeStanta() / 10;
            dateOut.add((Float) zecimale(formula, 3));
        }
View Full Code Here

    public List<Float> formulaCompresiuneCol3(List<String> dataS, int idProba) {
        List<Float> dateOut = new ArrayList<Float>();
        List<Float> citire = new ArrayList<Float>();
        float formula = 0;
        String[] sigma = new String[2];
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        Compresibilitate compresibilitate = null;
        IStantaDao stantaDao = new StantaDao();
        Stanta stanta = stantaDao.getStantaByIDProba(idProba);
        for (int i = 0; i < dataS.size(); i++) {
            sigma = dataS.get(i).split("-");
            compresibilitate = compresibilitateDao.geCompresibilitateByIDProbaAndSarcina(idProba, sigma[1]);
            citire.add(compresibilitate.getCitire());
            formula = citire.get(i) / stanta.getInaltimeStanta() / 10;
            dateOut.add((Float) zecimale(formula, 3));
        }
View Full Code Here

    public List<Float> formulaCompresiuneCol4(List<String> dataS, int idProba) {
        List<Float> dateOut = new ArrayList<Float>();
        List<Float> citire = new ArrayList<Float>();
        float formula = 0;
        String[] sigma = new String[2];
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        Compresibilitate compresibilitate = null;
        IStantaDao stantaDao = new StantaDao();
        Stanta stanta = stantaDao.getStantaByIDProba(idProba);
        for (int i = 0; i < dataS.size(); i++) {
            sigma = dataS.get(i).split("-");
            compresibilitate = compresibilitateDao.geCompresibilitateByIDProbaAndSarcina(idProba, sigma[0]);
            citire.add(compresibilitate.getCitire());
            Float m2MinusM3 = stanta.getM2() - stanta.getTara();
            formula = (getSuprafataStanta(stanta) * getDensitateSchelet() / m2MinusM3) * (stanta.getInaltimeStanta() - citire.get(i) / 1000) - 1;
            dateOut.add((Float) zecimale(formula, 3));
        }
View Full Code Here

    public List<Float> formulaCompresiuneCol5(List<String> dataS, int idProba) {
        List<Float> dateOut = new ArrayList<Float>();
        List<Float> citire = new ArrayList<Float>();
        float formula = 0;
        String[] sigma = new String[2];
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        Compresibilitate compresibilitate = null;
        IStantaDao stantaDao = new StantaDao();
        Stanta stanta = stantaDao.getStantaByIDProba(idProba);
        Float m2MinusM3 = stanta.getM2() - stanta.getTara();
        for (int i = 0; i < dataS.size(); i++) {
            sigma = dataS.get(i).split("-");
            compresibilitate = compresibilitateDao.geCompresibilitateByIDProbaAndSarcina(idProba, sigma[1]);
            citire.add(compresibilitate.getCitire());
            formula = (getSuprafataStanta(stanta) * getDensitateSchelet() / m2MinusM3) * (stanta.getInaltimeStanta() - citire.get(i) / 1000) - 1;
            dateOut.add((Float) zecimale(formula, 3));
        }

View Full Code Here

        IStantaDao stantaDao = new StantaDao();
        Stanta stanta = stantaDao.getStantaByIDProba(idProba);
        float formula = 0, citire = 0, sarcinaAux1 = 0, sarcinaAux2 = 0, e0 = 0, e1 = 0, e2 = 0;

        Float m2MinusM3 = stanta.getM2() - stanta.getTara();
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        List<Compresibilitate> compresibilitate = compresibilitateDao.geCompresibilitateByIDProba(idProba);
        Iterator it = compresibilitate.iterator();
        while (it.hasNext()) {
            listaSarcini.add(((Compresibilitate) it.next()).getSarcina());
        }
        sarcinaMinima = Collections.min(listaSarcini).toString();
        Compresibilitate compresibilitateCuSarcinaMinima = compresibilitateDao.geCompresibilitateByIDProbaAndSarcina(idProba, sarcinaMinima);
        citire = compresibilitateCuSarcinaMinima.getCitire();

        e0 = getSuprafataStanta(stanta) * getDensitateSchelet() / m2MinusM3 * (stanta.getInaltimeStanta() - citire / 1000) - 1;

        for (int i = 0; i < dataS.size(); i++) {
View Full Code Here

        getContext().getRequest().getSession(true).setAttribute("compresibilitate", getTabel(proba.getIdProba()));
        return new ForwardResolution("/WEB-INF/jsp/compresibilitate.jsp");
    }

    public Resolution adauga() {
        ICompresibilitateDao compDao = new CompresibilitateDao();
        IProbaDao probaDao = new ProbaDao();
        Proba proba = probaDao.geProbaByID(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));
        if (getButonRadio() == null) {
            setRadioNeselectat(true);
            return new ForwardResolution("/WEB-INF/jsp/compresibilitate.jsp");
        } else if (getButonRadio().equals("1")) {
            if ((getAn_nou() == null) || (getLuna_nou() == null) || (getZi_nou() == null) || (getOra_nou() == null) || (getMinut_nou() == null) || (getSarcina_nou() == null) || (getCitire_nou() == null)) {
                setCampuriNecompletate(true);
                return new ForwardResolution("/WEB-INF/jsp/compresibilitate.jsp");
            } else {
                Date data = Date.valueOf(getAn_nou() + "-" + getLuna_nou() + "-" + getZi_nou());
                Time timp = new Time(Integer.parseInt(getOra_nou()), Integer.parseInt(getMinut_nou()), 0);
                Compresibilitate comp = new Compresibilitate(proba, data, timp, Float.parseFloat(getSarcina_nou()), Float.parseFloat(getCitire_nou()));
                compDao.saveOrUpdate(comp);
            }
        } else if (getButonRadio().equals("2")) {
            if ((getOra_modif() == null) || (getMinut_modif() == null) || (getSarcinaFilter() == null) || (getCitire_modif() == null) || (getDataFilter() == null)) {
                setCampuriNecompletate(true);
                return new ForwardResolution("/WEB-INF/jsp/compresibilitate.jsp");
            } else {
                Date data = Date.valueOf(getDataFilter());
                Time timp = new Time(Integer.parseInt(getOra_modif()), Integer.parseInt(getMinut_modif()), 0);
                float sarcina=compDao.getCompresibilitateByID(Integer.parseInt(getSarcinaFilter())).getSarcina();
                Compresibilitate comp = new Compresibilitate(proba, data, timp, sarcina, Float.parseFloat(getCitire_modif()));
                compDao.saveOrUpdate(comp);
            }
        }
        getContext().getRequest().getSession(true).setAttribute("compresibilitate", getTabel(proba.getIdProba()));
        return new ForwardResolution("/WEB-INF/jsp/compresibilitate.jsp");
    }
View Full Code Here

        getContext().getRequest().getSession(true).setAttribute("compresibilitate", getTabel(proba.getIdProba()));
        return new ForwardResolution("/WEB-INF/jsp/compresibilitate.jsp");
    }

    public List<Date> getCompresibilitati() {
        ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
        List<Date> compresibilitati = compresibilitateDao.getDateByIDProba(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));
        return compresibilitati;
    }
View Full Code Here

        }
    }

    public List<Compresibilitate> getSarcini() {
        if (getDataFilter() != null) {
            ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
            List<Compresibilitate> compresibilitati = compresibilitateDao.geCompresibilitateByIDProbaAndData(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()), getDataFilter());
            return compresibilitati;
        } else {
            ICompresibilitateDao compresibilitateDao = new CompresibilitateDao();
            if (getCompresibilitati().size() != 0) {
                String x = getCompresibilitati().get(0).toString();
                List<Compresibilitate> compresibilitati = compresibilitateDao.geCompresibilitateByIDProbaAndData(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()), x);
                return compresibilitati;
            } else {
                return null;
            }
        }
View Full Code Here

TOP

Related Classes of dao.CompresibilitateDao

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.