Examples of KpiRel


Examples of it.eng.spagobi.kpi.config.bo.KpiRel

    if(ouGrant != null){
      ouLabel = ouGrant.getOuNode().getOu().getLabel();
    }
    logger.debug("kpi inst id= "+kVal.getKpiInstanceId()+" parent kpi is "+ kpiParent.getKpiName()+" and OU :"+ ouLabel);
    for(int i= 0; i< relations.size(); i++){
      KpiRel rel = relations.get(i);
      Kpi child = rel.getKpiChild();
      IDataSet chDataSet = kpiDao.getDsFromKpiId(child.getKpiId());
      HashMap chPars  = new HashMap();
      chPars.putAll(pars);
      //then the one in rel table
      String parameter = rel.getParameter();
      KpiValue kpiVal = recursiveGetKpiValueFromKpiRel(child, chDataSet, chPars, kVal, begD, endDate, modInstNodeId);
      pars.put(parameter, kpiVal.getValue());

    }
    //checks if it is to recalculate
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.KpiRel

    for(int i=0; i< params.size(); i++){
      JSONObject obj = new JSONObject();
      String par = (String)params.get(i);
      obj.put("parameterName", par);
      for(int k =0; k< relations.size(); k++){
        KpiRel rel = relations.get(k);
        if(rel.getParameter().equals(par)){
          obj.put("kpi", rel.getKpiChild().getKpiName());
          obj.put("relId", rel.getKpiRelId().intValue());
        }
      }
      rows.put(obj);
    }
    return rows;
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.KpiRel

      }
      //manage insert of kpi relations
      List<KpiRel> relations = DAOFactory.getKpiDAO().loadKpiRelListByParentId(kpi.getKpiId());
      if(relations != null && !relations.isEmpty()){
        for (int j = 0; j < relations.size(); j++) {
          KpiRel kpiRel = (KpiRel)relations.get(j);
          //insert child kpi first
          insertKpi(kpiRel.getKpiChildId(), session);
          insertKpiRel(kpiRel, session);         
        }

      }
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.KpiRel

      q.setInteger("parentId", kpiParentId);
      List toTransform =  q.list();

      for (Iterator iterator = toTransform.iterator(); iterator.hasNext();) {
        SbiKpiRel sbiKpiRel = (SbiKpiRel) iterator.next();
        KpiRel rel = toKpiRel(sbiKpiRel);
        toReturn.add(rel);
      }

    } catch (HibernateException he) {
      logger.error("Error while loading the list of Kpi relations", he);
View Full Code Here

Examples of it.eng.spagobi.kpi.config.bo.KpiRel

    logger.debug("OUT");
    return toReturn;
  }
  public KpiRel toKpiRel(SbiKpiRel sbiKpiRel) throws EMFUserError {
    logger.debug("IN");
    KpiRel kpiRel = new KpiRel();
    if(sbiKpiRel != null){
      kpiRel.setKpiChildId(sbiKpiRel.getSbiKpiByKpiChildId().getKpiId());
      kpiRel.setKpiFatherId(sbiKpiRel.getSbiKpiByKpiFatherId().getKpiId());
      kpiRel.setParameter(sbiKpiRel.getParameter());
      kpiRel.setKpiRelId(sbiKpiRel.getKpiRelId());
      kpiRel.setKpiChild(toKpi(sbiKpiRel.getSbiKpiByKpiChildId()));
    }

    logger.debug("OUT");
    return kpiRel;
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.