Package it.eng.spagobi.kpi.config.metadata

Examples of it.eng.spagobi.kpi.config.metadata.SbiKpiInstanceHistory


                                   */
                                  && areNullOrEquals(oldSbiKpiInstance.getWeight(), value
                                      .getKpiInstance().getWeight()))) {
        // create new History
        Calendar now = Calendar.getInstance();
        SbiKpiInstanceHistory sbiKpiInstanceHistory = new SbiKpiInstanceHistory();
        sbiKpiInstanceHistory.setSbiKpiInstance(oldSbiKpiInstance);
        sbiKpiInstanceHistory.setSbiThreshold(oldSbiKpiInstance
            .getSbiThreshold());
        sbiKpiInstanceHistory.setSbiDomains(oldSbiKpiInstance
            .getChartType());
        sbiKpiInstanceHistory.setWeight(oldSbiKpiInstance.getWeight());
        sbiKpiInstanceHistory
        .setBeginDt(oldSbiKpiInstance.getBeginDt());
        sbiKpiInstanceHistory.setEndDt(now.getTime());
        updateSbiCommonInfo4Insert(sbiKpiInstanceHistory);
        aSession.save(sbiKpiInstanceHistory);
      }

      SbiKpiInstance kpiInstanceToCreate = null;
View Full Code Here


    critt.add(Expression.eq("sbiKpiInstance", sbiKpiInst));
    List sbiKpiInstanceHistory = critt.list();

    for (Iterator iterator = sbiKpiInstanceHistory.iterator(); iterator
    .hasNext();) {
      SbiKpiInstanceHistory sbiKpiH = (SbiKpiInstanceHistory) iterator
      .next();

      aSession.delete(sbiKpiH);
    }
View Full Code Here

    } else {// in case older thresholds have to be retrieved

      Set kpiInstHist = kpiInst.getSbiKpiInstanceHistories();
      Iterator i = kpiInstHist.iterator();
      while (i.hasNext()) {
        SbiKpiInstanceHistory ih = (SbiKpiInstanceHistory) i.next();
        Date ihBegDt = ih.getBeginDt();
        Date ihEndDt = ih.getEndDt();
        if ((d.after(ihBegDt) || d.equals(ihBegDt))
            && (d.before(ihEndDt) || d.equals(ihEndDt))) {

          weight = ih.getWeight();
          logger.debug("SbiKpiValue weight: "
              + (weight != null ? weight.toString()
                  : "weight null"));
          target = ih.getTarget();
          logger.debug("SbiKpiValue target: "
              + (target != null ? target.toString()
                  : "target null"));

          if (ih.getSbiMeasureUnit() != null) {
            scaleCode = ih.getSbiMeasureUnit().getScaleCd();
            logger.debug("SbiKpiValue scaleCode: "
                + (scaleCode != null ? scaleCode
                    : "scaleCode null"));
            scaleName = ih.getSbiMeasureUnit().getScaleNm();
            logger.debug("SbiKpiValue scaleName: "
                + (scaleName != null ? scaleName
                    : "scaleName null"));
          }
          SbiThreshold t = ih.getSbiThreshold();
          if(t!=null){
            Set ts = t.getSbiThresholdValues();
            Iterator it = ts.iterator();
            while (it.hasNext()) {
              SbiThresholdValue tls = (SbiThresholdValue) it.next();
View Full Code Here

      String scaleCode = null;
      String scaleName = null;
      Set kpiInstHist = hibSbiKpiInstance.getSbiKpiInstanceHistories();
      Iterator i = kpiInstHist.iterator();
      while (i.hasNext()) {
        SbiKpiInstanceHistory ih = (SbiKpiInstanceHistory) i.next();

        Date ihBegDt = ih.getBeginDt();
        Date ihEndDt = ih.getEndDt();
        if ((d.after(ihBegDt) || d.equals(ihBegDt))
            && (d.before(ihEndDt) || d.equals(ihEndDt))) {
          toReturn = toKpiInstance(ih);
        }
      }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.kpi.config.metadata.SbiKpiInstanceHistory

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.