Examples of saveOrUpdate()


Examples of dao.GeologBeneficiarDao.saveOrUpdate()

            Beneficiar beneficiar = new Beneficiar(nume, cnp, mentiuni, null);
            beneficiarDao.saveOrUpdate(beneficiar);
            Beneficiar bAux = beneficiarDao.getBeneficiarCnp(cnp);
            int idGeolog = getIdGeologLogat();
            IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
            geologBeneficiarDao.saveOrUpdate(new GeologBeneficiar(idGeolog, bAux.getIdBeneficiar()));
            setBeneficiarAdaugat(true);
            return new ForwardResolution("/WEB-INF/jsp/adaugaBeneficiar.jsp");
        } //daca cream un proiect
        else if (proiect == 1) {
            if (getBtnRadio() == null) {
View Full Code Here

Examples of dao.GeologDao.saveOrUpdate()

            if (!isNumeric(telefon) || telefon.length() != 10) {
                setTelefonInvalid(true);
                return new ForwardResolution("/WEB-INF/jsp/inregistrare.jsp");
            }
            setGeologAdaugat(true);
            geoDao.saveOrUpdate(new Geolog(nume, prenume, telefon, email, adresa, username, parola, confirmareVizibilitate, acceptare));
            return new ForwardResolution("/WEB-INF/jsp/inregistrare.jsp");
        }
    }

    public String getUsername() {
View Full Code Here

Examples of dao.MetCerneriiDao.saveOrUpdate()

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

Examples of dao.ProbaDao.saveOrUpdate()

        //update la proba pt parametrii md si rs

        proba.setA(Float.parseFloat(getaInput()));
        proba.setB(Float.parseFloat(getbInput()));
        probaDao.saveOrUpdate(proba);


        medSedimentarii = new MetodaSedimentarii();
        //se modifica pt a afisa in pagina, noile valori introduse
        CitiriAreometru citiriAreometruDinBD = citiriAreometruDao.getCitiriAreometruByIDProba(proba.getIdProba());
View Full Code Here

Examples of dao.ProiectDao.saveOrUpdate()

    public Resolution submit() {
        IProiectDao proiectDao = new ProiectDao();
        int idBeneficiar = ((Beneficiar) getContext().getRequest().getSession().getAttribute("beneficiarProiect")).getIdBeneficiar();
        int idGeolog = getIdGeologLogat();
        Proiect proiect = new Proiect(getNumeProiect(), idGeolog, idBeneficiar);
        proiectDao.saveOrUpdate(proiect);
        Proiect p = proiectDao.getUltimulProiectAdaugat(idGeolog);
        getContext().getRequest().getSession(true).setAttribute("proiectInLucru", proiectDao.getUltimulProiectAdaugat(idGeolog));
        return new ForwardResolution("/WEB-INF/jsp/repartizareAmplasamente.jsp");
    }
View Full Code Here

Examples of dao.StantaDao.saveOrUpdate()

        Proba proba = probaDao.geProbaByID(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));
        IStantaDao stantaDao = new StantaDao();
        Stanta stanta = new Stanta(proba, Float.parseFloat(getRand1Coloana2()), Float.parseFloat(getRand2Coloana2()), null, getStantaInput(), Float.parseFloat(getTaraInput()), Float.parseFloat(getDiametruInput()), Float.parseFloat(getInaltimeInput()));
        Stanta stantaAuxiliar = stantaDao.getStantaByIDProba(proba.getIdProba());
        if (stantaAuxiliar == null) {
            stantaDao.saveOrUpdate(stanta);
        } else {
            stanta.setIdStanta(stantaAuxiliar.getIdStanta());
            stantaDao.saveOrUpdate(stanta);
        }
View Full Code Here

Examples of dao.StratDao.saveOrUpdate()

                    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

Examples of dao.TempCititaDao.saveOrUpdate()

        //obiect format pt proba curenta cu valorile introduse pt introducere in BD
        TempCitita tempCititaBO = new TempCitita(proba, valoriIntroduseTemperatura.get(0), valoriIntroduseTemperatura.get(1), valoriIntroduseTemperatura.get(2), valoriIntroduseTemperatura.get(3), valoriIntroduseTemperatura.get(4), valoriIntroduseTemperatura.get(5), valoriIntroduseTemperatura.get(6), valoriIntroduseTemperatura.get(7), valoriIntroduseTemperatura.get(8), valoriIntroduseTemperatura.get(9), valoriIntroduseTemperatura.get(10), valoriIntroduseTemperatura.get(11));
        ITempCititaDao tempCititaDao = new TempCititaDao();
        TempCitita tempCititaAuxiliar = tempCititaDao.getTempCititaByIDProba(proba.getIdProba());
        if (tempCititaAuxiliar == null) {
            tempCititaDao.saveOrUpdate(tempCititaBO);
        } else {
            tempCititaBO.setIdSedimentare(tempCititaAuxiliar.getIdSedimentare());
            tempCititaDao.saveOrUpdate(tempCititaBO);
        }
View Full Code Here

Examples of daoI.IAdminDao.saveOrUpdate()

    public Resolution submitDatePersonale() {
        IAdminDao adminDao = new AdminDao();
        Admin adminC = getAdmin();
        if (adminC.getParola().equals(getParolaVeche())) {
            adminDao.saveOrUpdate(adminC);
        } else {
            byte[] parolaB = adminC.getParola().getBytes();
            try {
                MessageDigest algorithm = MessageDigest.getInstance("MD5");
                algorithm.reset();
View Full Code Here

Examples of daoI.IAmplasamentDao.saveOrUpdate()

        amplasament.setOras(oras);
        amplasament.setLocatie(getLocatie());
        amplasament.setIdGeolog(getIdGeologLogat());
        setAmplasamentAdaugat(true);
        IAmplasamentDao amplasamentDao = new AmplasamentDao();
        amplasamentDao.saveOrUpdate(amplasament);
        return new ForwardResolution("/WEB-INF/jsp/adaugaAmplasament.jsp");
    }

    public List<Beneficiar> getBeneficiari() {
        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.