Package daoI

Examples of daoI.IStratDao


    }

    public Resolution stergereStrat() {
        if (getStratR() != null) {
            String idStrat = getStratR();
            IStratDao stratDao = new StratDao();
            stratDao.delete(Integer.parseInt(idStrat));
        }
        return new ForwardResolution("/WEB-INF/jsp/editareForaj.jsp");
    }
View Full Code Here


        return probe;
    }

    public List<Strat> getStraturi() {
        List<Strat> straturi = null;
        IStratDao stratDao = new StratDao();
        straturi = stratDao.getAll(getIdForajCurent());
        return straturi;
    }
View Full Code Here

                if (f != null) {
                    int fI = Integer.parseInt(f.toString());
                    if (fI > 0) {
                        Foraj foraj = forajDao.getForajByID(fI);
                        strat.setForaj(foraj);
                        IStratDao stratDao = new StratDao();
                        stratDao.saveOrUpdate(strat);
                    }
                }

            } catch (NumberFormatException nfe) {
                System.out.println("NumberFormatException: " + nfe.getMessage());
View Full Code Here

        return new ForwardResolution("/WEB-INF/jsp/adaugaStrat.jsp");
    }

    public List<Strat> getStraturi() {
        List<Strat> straturi = null;
        IStratDao stratDao = new StratDao();
        Object f = getContext().getRequest().getSession(true).getAttribute("idForajCurent");
        if (f != null) {
            int fI = Integer.parseInt(f.toString());
            if (fI > 0) {
                straturi = stratDao.getAll(fI);
            }
        }
        return null;
    }
View Full Code Here

        return new ForwardResolution("/WEB-INF/jsp/vizualizareForaj.jsp");
    }

    public Resolution afiseaza() {
        date = new ArrayList();
        IStratDao stratDao = new StratDao();
        IProbaDao probaDao = new ProbaDao();
        IForajDao forajDao = new ForajDao();
        int i = 0, j = 0;
        float adancimeProba = 0, adancimeStrat = 0, adancimeStratAnterior = 0;
        Proba probaCurenta = null;
        Strat stratCurent = null;
        try {
            setIdForajCurent(Integer.parseInt(forajFilter));
        } catch (Exception e) {
        }
        if (getIdForajCurent() > 0) {
            cota = forajDao.getForajByID(getIdForajCurent()).getCota().toString();
        }
        List<Strat> straturi = stratDao.getAll(getIdForajCurent());
        int nrStraturi = straturi.size();
        List<Proba> probe = probaDao.getAll(getIdForajCurent());
        int nrProbe = probe.size();
        i = 0;
        DatePtVizForaj d = null;
        while (i < nrStraturi) {
            d = new DatePtVizForaj();
            stratCurent = straturi.get(i);
            if (j < nrProbe) {
                probaCurenta = probe.get(j);
                adancimeProba = probaCurenta.getAdancime();
            } else {
                adancimeProba = 1000;
            }
            adancimeStrat = stratCurent.getAdancime();
            if (adancimeProba < adancimeStrat) {
                probaDao.addNrProba(probaCurenta.getIdProba(), j);
                d.setNrProba(Integer.toString(j));
                d.setAdancime(probaCurenta.getAdancime().toString());
                if (probaCurenta.getArgila() != null) {
                    d.setArgila(probaCurenta.getArgila().toString());
                }
                if (probaCurenta.getPraf() != null) {
                    d.setPraf(probaCurenta.getPraf().toString());
                }
                if (probaCurenta.getNisip() != null) {
                    d.setNisip(probaCurenta.getNisip().toString());
                }
                if (probaCurenta.getPietris() != null) {
                    d.setPietris(probaCurenta.getPietris().toString());
                }
                if (probaCurenta.getW() != null) {
                    d.setW(probaCurenta.getW().toString());
                }
                if (probaCurenta.getWl() != null) {
                    d.setwL(probaCurenta.getWl().toString());
                }
                if (probaCurenta.getWp() != null) {
                    d.setwP(probaCurenta.getWp().toString());
                }
                if (probaCurenta.getIp() != null) {
                    d.setIp(probaCurenta.getIp().toString());
                }
                if (probaCurenta.getIc() != null) {
                    d.setIc(probaCurenta.getIc().toString());
                }
                if (probaCurenta.getY() != null) {
                    d.setY(probaCurenta.getY().toString());
                }
                if (probaCurenta.getYd() != null) {
                    d.setYd(probaCurenta.getYd().toString());
                }
                if (probaCurenta.getN() != null) {
                    d.setN(probaCurenta.getN().toString());
                }
                if (probaCurenta.getEmic() != null) {
                    d.setEmic(probaCurenta.getEmic().toString());
                }
                if (probaCurenta.getM0() != null) {
                    d.setM0(probaCurenta.getM0().toString());
                }
                if (probaCurenta.getUl() != null) {
                    d.setUl(probaCurenta.getUl().toString());
                }
                if (probaCurenta.getYdmax() != null) {
                    d.setYdmax(probaCurenta.getYdmax().toString());
                }
                if (probaCurenta.getE() != null) {
                    d.setE(probaCurenta.getE().toString());
                }
                if (probaCurenta.getE100() != null) {
                    d.setE100(probaCurenta.getE100().toString());
                }
                if (probaCurenta.getE200() != null) {
                    d.setE200(probaCurenta.getE200().toString());
                }
                if (probaCurenta.getE300() != null) {
                    d.setE300(probaCurenta.getE300().toString());
                }
                if (probaCurenta.getIm3() != null) {
                    d.setIm3(probaCurenta.getIm3().toString());
                }
                if (probaCurenta.getTipulIncercarii() != null) {
                    d.setTempIncercarii(probaCurenta.getTipulIncercarii().toString());
                }
                if (probaCurenta.getViteza() != null) {
                    d.setViteza(probaCurenta.getViteza().toString());
                }
                if (probaCurenta.getO() != null) {
                    d.setO(probaCurenta.getO().toString());
                }
                if (probaCurenta.getC() != null) {
                    d.setC(probaCurenta.getC().toString());
                }
                j++;
            } else {
                d.setAdancime(Float.toString(adancimeStrat));
                //grosime
                d.setGrosime(Float.toString(adancimeStrat - adancimeStratAnterior));
                stratDao.addNrStrat(stratCurent.getIdStrat(), i);
                d.setNrStrat(Integer.toString(i));
                adancimeStratAnterior = adancimeStrat;
                d.setNivelHidrostatic(stratCurent.getNivelHidrostatic().toString());
                d.setDescriereStrat(stratCurent.getDescriere());
                i++;
View Full Code Here

TOP

Related Classes of daoI.IStratDao

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.