Package dao

Examples of dao.ForajDao


            foraj.setNumeForaj(nume);
            try {
                int amplasamentID = Integer.parseInt(amplasamentFilter);
                Amplasament amplasament = amplasamentDao.getAmplasamentByID(amplasamentID);
                foraj.setAmplasament(amplasament);
                IForajDao forajDao = new ForajDao();
                forajDao.saveOrUpdate(foraj);
                setIdAmplasamentCurent(amplasamentID);
                getContext().getRequest().getSession(true).setAttribute("idAmplasamentCurent", amplasamentID);
            } catch (NumberFormatException nfe) {
                System.out.println("NumberFormatException: " + nfe.getMessage());
                return new ForwardResolution("/WEB-INF/jsp/adaugaForaj.jsp");
View Full Code Here


        return false;
    }

    public String getForajSelectat() {
        if (getIdForajCurent() > 0) {
            ForajDao forajDao = new ForajDao();
            Foraj f = forajDao.getForajByID(getIdForajCurent());
            return f.getNumeForaj();
        }
        return "";
    }
View Full Code Here

        return amplasamente;
    }

    public List<Foraj> getForaje() {
        List<Foraj> foraje;
        IForajDao forajDao = new ForajDao();
        foraje = forajDao.getAll(getIdAmplasamentCurent());
        if (getIdForajCurent() == 0) {
            if (foraje != null && foraje.size() > 0) {
                setIdForajCurent(foraje.get(0).getIdForaj());
            }
            getContext().getRequest().getSession(true).setAttribute("idForajCurent", getIdForajCurent());
View Full Code Here

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

    public Resolution salveaza() {

        IForajDao forajDao = new ForajDao();
        Strat strat = new Strat();
        try {
            float a = Float.valueOf(getAdancime().trim()).floatValue();
            strat.setAdancime(a);
            float n = Float.valueOf(getNivelHidrostatic().trim()).floatValue();
            strat.setNivelHidrostatic(n);
            String descriere = getDescriere1Filter() + " " + getDescriere2Filter() + " " + getDescriere3Filter() + " " + getDescriere4Filter();
            if (getAlteCaracteristici() != null) {
                descriere += " " + getAlteCaracteristici();
            }
            strat.setDescriere(descriere);
            try {
                Object f = getContext().getRequest().getSession(true).getAttribute("idForajCurent");
                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);
                    }
                }
View Full Code Here

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

    public Resolution salveaza() {

        IForajDao forajDao = new ForajDao();
        Proba proba = new Proba();
        try {
            float a = Float.valueOf(getAdancime().trim()).floatValue();
            proba.setAdancime(a);
            proba.setNumeProba(getNume());
            try {
                Object f = getContext().getRequest().getSession(true).getAttribute("idForajCurent");
                if (f != null) {
                    int fI = Integer.parseInt(f.toString());
                    if (fI > 0) {
                        Foraj foraj = forajDao.getForajByID(fI);
                        proba.setForaj(foraj);
                        IProbaDao probaDao = new ProbaDao();
                        probaDao.saveOrUpdate(proba);
                    }
                }
View Full Code Here

    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();
View Full Code Here

        return false;
    }

    public String getForajSelectat() {
        if (getIdForajCurent() > 0) {
            ForajDao forajDao = new ForajDao();
            Foraj f = forajDao.getForajByID(getIdForajCurent());
            if (f != null) {
                return f.getNumeForaj();
            }
        }
        return "";
View Full Code Here

        return amplasamente;
    }

    public List<Foraj> getForaje() {
        List<Foraj> foraje;
        IForajDao forajDao = new ForajDao();
        foraje = forajDao.getAll(getIdAmplasamentCurent());
        if (getIdForajCurent() == 0) {
            if (foraje != null && foraje.size() > 0) {
                setIdForajCurent(foraje.get(0).getIdForaj());
            }
            getContext().getRequest().getSession(true).setAttribute("idForajCurent", getIdForajCurent());
View Full Code Here

TOP

Related Classes of dao.ForajDao

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.