Package bo

Examples of bo.Stanta


    @DefaultHandler
    public Resolution view() {
      
        metStantei = new MetodaStantei();
        IStantaDao stantaDao = new StantaDao();
        Stanta stantaAuxiliar = stantaDao.getStantaByIDProba(Integer.parseInt(getContext().getRequest().getSession().getAttribute("idProba").toString()));
        if (stantaAuxiliar != null) {
            metStantei.setDensitateSchelet(getDensitateSchelet());
            metStantei.setStanta(stantaAuxiliar.getStanta());
            metStantei.setSuprafataStanta(getSuprafataStanta(stantaAuxiliar));
            metStantei.setVolumStanta(getVolumStanta(stantaAuxiliar));
            metStantei.setTara(stantaAuxiliar.getTara());
            metStantei.setDiametruStanta(stantaAuxiliar.getDiamStanta());
            metStantei.setInltimeStanta(stantaAuxiliar.getInaltimeStanta());
            List<Float> param = new ArrayList<Float>();
            param.add(stantaAuxiliar.getM1());
            param.add(stantaAuxiliar.getM2());
            param.add(stantaAuxiliar.getTara());
            param.add(stantaAuxiliar.getDiamStanta());
            param.add(stantaAuxiliar.getInaltimeStanta());
            Float ros = Float.parseFloat(getRs());
            Float vs = (float) (param.get(3) * 3.1418 * param.get(3) / 4 * param.get(4));
            List col2 = formulaStantaCol2(param, vs, ros);
            List col3 = formulaStantaCol3(param, 0, ros);
            metStantei.setInitialC(col2);
View Full Code Here


    public Resolution submit() {
        IProbaDao probaDao = new ProbaDao();
        //proba curenta
        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);
        }

        Stanta stantaDinBd = stantaDao.getStantaByIDProba(proba.getIdProba());
        metStantei = new MetodaStantei();
        metStantei.setDensitateSchelet(getDensitateSchelet());
        metStantei.setStanta(stantaDinBd.getStanta());
        metStantei.setSuprafataStanta(getSuprafataStanta(stantaDinBd));
        metStantei.setVolumStanta(getVolumStanta(stantaDinBd));
        metStantei.setTara(stantaDinBd.getTara());
        metStantei.setDiametruStanta(stantaDinBd.getDiamStanta());
        metStantei.setInltimeStanta(stantaDinBd.getInaltimeStanta());
        List<Float> param = new ArrayList<Float>();
        param.add(stantaDinBd.getM1());
        param.add(stantaDinBd.getM2());
        param.add(stantaDinBd.getTara());
        param.add(stantaDinBd.getDiamStanta());
        param.add(stantaDinBd.getInaltimeStanta());
        Float ros = Float.parseFloat(getRs());
        Float vs = (float) (param.get(3) * 3.1418 * param.get(3) / 4 * param.get(4));
        List col2 = formulaStantaCol2(param, vs, ros);
        List col3 = formulaStantaCol3(param, 0, ros);
        metStantei.setInitialC(col2);
View Full Code Here

    Session session = null;

    public Stanta getStantaByID(int stantaID) {

        Stanta metC = null;
        List<Stanta> metCList = null;

        try {
            this.session = (Session) HibernateUtil.getSessionFactory().getCurrentSession();
            org.hibernate.Transaction tx = session.beginTransaction();
View Full Code Here

        return metC;
    }

    public Stanta getStantaByIDProba(int probaID) {

        Stanta metC = null;
        List<Stanta> metCList = null;

        try {
            this.session = (Session) HibernateUtil.getSessionFactory().getCurrentSession();
            org.hibernate.Transaction tx = session.beginTransaction();
View Full Code Here

        List<Float> dateOut = new ArrayList<Float>();
        List<Float> listaSarcini = new ArrayList<Float>();
        String sarcinaMinima = null;
        String[] sigma = new String[2];
        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++) {
            sigma = dataS.get(i).split("-");
            sarcinaAux1 = Float.valueOf(sigma[1]);
            sarcinaAux2 = Float.valueOf(sigma[0]);
View Full Code Here

        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));
        }

        return dateOut;
    }
View Full Code Here

        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));
        }

        return dateOut;
    }
View Full Code Here

        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));
        }

        return dateOut;
    }
View Full Code Here

        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));
        }

        return dateOut;
    }
View Full Code Here

TOP

Related Classes of bo.Stanta

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.