Package dao

Examples of dao.BeneficiarDao


    public List<Beneficiar> getBeneficiari() {
        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        int idGeolog = getIdGeologLogat();
        IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
        List<Integer> idBeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(idGeolog);
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        Iterator it = idBeneficiari.iterator();
        while (it.hasNext()) {
            Integer idBeneficiar = (Integer) it.next();
            Beneficiar beneficiar = beneficiarDao.getBeneficiarByID(idBeneficiar);
            beneficiari.add(beneficiar);
        }
        return beneficiari;
    }
View Full Code Here


    public void setRadioNeselectat(Boolean radioNeselectat) {
        this.radioNeselectat = radioNeselectat;
    }

    public List<ProiecteGeologSef> getProiecteGeologSef() {
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        IProiectDao proiectDao = new ProiectDao();
        IAmplasamentDao amplasamentDao = new AmplasamentDao();
        IGeologDao geologDao = new GeologDao();
        Proiect p;
        ProiecteGeologSef proiect;
        RepartizareProiect repartizareProiect;
        List<Amplasament> amplasamente;
        List<Geolog> geologi;
        List<String> orase;
        List<String> locatii;
        Amplasament amplasament;
        Geolog geolog;
        String oras, locatie;
        List<ProiecteGeologSef> proiecteGeologSef = new ArrayList<ProiecteGeologSef>();

        List<Proiect> proiecte = proiectDao.getProiecteByGeologId(getIdGeologLogat());
        Iterator it = proiecte.iterator();
        while (it.hasNext()) {
            p = (Proiect) it.next();
            proiect = new ProiecteGeologSef();
            proiect.setNumeProiect(p.getNumeProiect()); //nume proiect
            //nume beneficiar
            proiect.setNumeBeneficiar(beneficiarDao.getBeneficiarByID(p.getIdBeneficiar()).getNumeBeneficiar());
            // determinam amplasamentele pt un proiect
            amplasamente = amplasamentDao.getAmplasamenteByProiectId(p.getIdProiect());
            repartizareProiect = new RepartizareProiect();
            geologi = new ArrayList<Geolog>();
            orase = new ArrayList<String>();
View Full Code Here

        return false;
    }

    public String getBeneficiarSelectat() {
        if (getIdBeneficiarCurent() > 0) {
            BeneficiarDao beneficiarDao = new BeneficiarDao();
            String b = beneficiarDao.getPersonByID(getIdBeneficiarCurent());
            return b;
        }
        return "";
    }
View Full Code Here

        return "";
    }

    public List<Beneficiar> getBeneficiari() {
        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        String vizilibilitate = getContext().getRequest().getSession().getAttribute("vizualizareForaj").toString();
        if (vizilibilitate.equals("proiectePrivate")) {
            int idGeolog = getIdGeologLogat();
            IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
            List<Integer> idBeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(idGeolog);
            Iterator it = idBeneficiari.iterator();
            while (it.hasNext()) {
                Integer idBeneficiar = (Integer) it.next();
                Beneficiar beneficiar = beneficiarDao.getBeneficiarByID(idBeneficiar);
                beneficiari.add(beneficiar);
            }
        } else {
            beneficiari = getBeneficiariPublici();
            getContext().getRequest().getSession(true).setAttribute("geologiPublici", beneficiari);
View Full Code Here

    private List<Beneficiar> getBeneficiariPublici() {
        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        Geolog geolog;
        Beneficiar beneficiar;
        List<Integer> idbeneficiari = new ArrayList<Integer>();
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
        IGeologDao geologDao = new GeologDao();
        List<Geolog> geologi = geologDao.geologiPublici();
        if (geologi != null) {
            Iterator it = geologi.iterator();
            while (it.hasNext()) {
                geolog = (Geolog) it.next();
                idbeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(geolog.getIdGeolog());
                if (idbeneficiari != null) {
                    for (int i = 0; i < idbeneficiari.size(); i++) {
                        beneficiar = beneficiarDao.getBeneficiarByID(idbeneficiari.get(i));
                        beneficiari.add(beneficiar);
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of dao.BeneficiarDao

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.