Examples of SbiThreshold


Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

    Transaction tx = null;

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiThreshold t = (SbiThreshold) aSession.load(SbiThreshold.class,
          id);

      Set thresholdValues = t.getSbiThresholdValues();
      Iterator it = thresholdValues.iterator();
      while (it.hasNext()) {
        SbiThresholdValue val = (SbiThresholdValue) it.next();
//        TODO mettere a posto
        ThresholdValue tr = toThresholdValue(val);
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiKpiInstance hibSbiKpiInstance = (SbiKpiInstance) aSession.load(
          SbiKpiInstance.class, k.getKpiInstanceId());
      SbiThreshold t = hibSbiKpiInstance.getSbiThreshold();

      if(t!=null){
        Set thresholdValues = t.getSbiThresholdValues();
        Iterator it = thresholdValues.iterator();
        while (it.hasNext()) {
          SbiThresholdValue val = (SbiThresholdValue) it.next();
          ThresholdValue tr = toThresholdValue(val);
          logger.debug("Added threshold value with label " + tr.getLabel());
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

      aSession = getSession();
      tx = aSession.beginTransaction();
      toReturn = new ArrayList();
      List toTransform = null;

      SbiThreshold sbiThreshold = (SbiThreshold) aSession.load(
          SbiThreshold.class, thresholdId);

      Criteria crit = aSession.createCriteria(SbiThresholdValue.class);
      crit.add(Expression.eq("sbiThreshold", sbiThreshold));
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

      if (severityId != null) {
        severity = (SbiDomains) aSession.load(SbiDomains.class,
            severityId);
      }

      SbiThreshold threshold = null;
      if (thresholdId != null) {
        threshold = (SbiThreshold) aSession.load(SbiThreshold.class,
            thresholdId);
      }
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

      if (severityId != null) {
        severity = (SbiDomains) aSession.load(SbiDomains.class,
            severityId);
      }

      SbiThreshold threshold = null;
      if (thresholdId != null) {
        threshold = (SbiThreshold) aSession.load(SbiThreshold.class,
            thresholdId);
      }
     
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

      if (severityId != null) {
        severity = (SbiDomains) aSession.load(SbiDomains.class,
            severityId);
      }

      SbiThreshold threshold = null;
      if (thresholdId != null) {
        threshold = (SbiThreshold) aSession.load(SbiThreshold.class,
            thresholdId);
      }
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

    Double maxValue = t.getMaxValue();
    Double minValue = t.getMinValue();
    Boolean maxClosed = t.getMaxClosed();
    Boolean minClosed = t.getMinClosed();
    Double value = t.getThValue();
    SbiThreshold sbit = t.getSbiThreshold();
    Color color = new Color(255, 255, 0);
    String col = t.getColour();
    logger.debug("Threshold color is "+ col!=null ? col : "");
    if (col != null) {
      try{
        color = Color.decode(col);
        logger.debug("Color decoded");
      }
      catch (Exception e) {
        color=Color.RED;
      }
    }
   
    if(sbit.getThresholdType()!=null){
      toReturn.setThresholdType(sbit.getThresholdType().getValueCd());
    }
   
    if(sbit.getCode()!=null){
      toReturn.setThresholdCode(sbit.getCode());
    }

    toReturn.setId(id);
    toReturn.setThresholdId(thresholdId);
    toReturn.setLabel(label);
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

      // load threshold
      if (kpi.getThreshold() != null) {
        Threshold th=kpi.getThreshold();
        insertThreshold(th, session);
        SbiThreshold sbiTh= (SbiThreshold) session.load(SbiThreshold.class, th.getId());
        hibKpi.setSbiThreshold(sbiTh);
      }

      // Measure Unit   ???
      if(kpi.getScaleCode()!=null && !kpi.getScaleCode().equalsIgnoreCase("")){
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

      // load threshold
      if (kpi.getThreshold() != null) {
        Threshold th=kpi.getThreshold();
        insertThreshold(th, session);
        SbiThreshold sbiTh= (SbiThreshold) session.load(SbiThreshold.class, th.getId());
        hibKpi.setSbiThreshold(sbiTh);
      }

      // Measure Unit   ???
      if(kpi.getScaleCode()!=null && !kpi.getScaleCode().equalsIgnoreCase("")){
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.metadata.SbiThreshold

      // load threshold
      if (kpiInst.getThresholdId() != null) {
        IThresholdDAO thresholdDAO=DAOFactory.getThresholdDAO();
        Threshold th=thresholdDAO.loadThresholdById(kpiInst.getThresholdId());
        insertThreshold(th, session);
        SbiThreshold sbiTh= (SbiThreshold) session.load(SbiThreshold.class, th.getId());
        hibKpiInst.setSbiThreshold(sbiTh);
      }

      // load measureUnit!
      if(kpiInst.getScaleCode()!=null){
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.