Examples of Threshold


Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

    return toReturn;
  }

  public static void newThreshold(SourceBean serviceRequest, SourceBean serviceResponse) throws EMFUserError, SourceBeanException {
    Threshold toCreate = getThresholdFromRequest(serviceRequest);
   
    Integer thresholdId = DAOFactory.getThresholdDAO().insertThreshold(toCreate);

    serviceResponse.setAttribute("ID", thresholdId);
    serviceResponse.setAttribute("MESSAGE",SpagoBIConstants.DETAIL_SELECT);
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

    selectThreshold(thresholdId, serviceResponse);
  }

  public static void restoreThreshold(Integer id, SourceBean serviceRequest,
      SourceBean serviceResponse) throws Exception {
    Threshold toReturn = getThresholdFromRequest(serviceRequest);
    if(id != null) {
      toReturn.setId(id);
    }
    serviceResponse.setAttribute("THRESHOLD", toReturn);
  }
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

              int dsId = ds.getId();
              k.setKpiDsId(new Integer(dsId));
            }       
          }
          if(thresholdCode != null){
            Threshold t = thrDao.loadThresholdByCode(thresholdCode);
            k.setThreshold(t);
          }

          k.setKpiName(name);
          k.setCode(code);

          if(description != null){
            k.setDescription(description);
          }
          if(weight != null && !weight.equalsIgnoreCase("")){
            k.setStandardWeight(Double.valueOf(weight));
         
          if(dsLabel != null){
            k.setDsLabel(dsLabel);
            IDataSet ds = dsDao.loadActiveDataSetByLabel(dsLabel);

            if(ds!=null){
              int dsId = ds.getId();
              k.setKpiDsId(new Integer(dsId));
            }       
          }
          if(thresholdCode != null){
            Threshold t = thrDao.loadThresholdByCode(thresholdCode);
            k.setThreshold(t);
          }

          List docsList = null;
          if(docLabelsJSON != null){
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

    Integer thresholdId = null;
    if (sThresholdId != null && !(sThresholdId.trim().equals(""))) {
      thresholdId = Integer.parseInt(sThresholdId);
      try {
        Threshold threshold = DAOFactory.getThresholdDAO().loadThresholdById(thresholdId);
        Domain threshodlType = DAOFactory.getDomainDAO().loadDomainById(threshold.getThresholdTypeId());
        sThresholdType = threshodlType.getValueCd();
      } catch (EMFUserError e) {
      }
     
    }
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

   

    if(thresholdsList!=null && !thresholdsList.isEmpty()){
      Iterator th = thresholdsList.iterator();
      while(th.hasNext()){
        Threshold t =(Threshold)th.next();

          if (actualHeight+separatorHeight+10<maxFirstSubTemplateHeight){
            List sourceBeansToAdd4 = newThresholdLine(t);
            if (sourceBeansToAdd4!=null && !sourceBeansToAdd4.isEmpty()){
            Iterator it = sourceBeansToAdd4.iterator();
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

        textValue3.setCharacters(weight);
       
       
        if(t!=null){
          try {
            Threshold tr = DAOFactory.getThresholdDAO().loadThresholdById(t.getThresholdId());
            if (!thresholdsList.contains(tr)){
              thresholdsList.add(tr);
            }
           
          } catch (EMFUserError e) {
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

          logger.error("Threshold type CD does not exist");
          throw new SpagoBIServiceException(SERVICE_NAME,  "Threshold Type ID is undefined");
        }
 
      if (name != null && typeID != null && code != null) {
        Threshold thr = new Threshold();
        thr.setName(name);
        thr.setThresholdTypeCode(typeCD);
        thr.setThresholdTypeId(typeID);
        thr.setCode(code);
 
        if(description != null){
          thr.setDescription(description);
       
       
        List thrValuesList = new ArrayList();
        if(typeCD != null){
          if(typeCD.equals("MINIMUM") || typeCD.equals("MAXIMUM")){
            ThresholdValue tVal = new ThresholdValue();
            if(thrValId!= null && !thrValId.equals("") && !thrValId.equals("0")){
              tVal.setId(Integer.valueOf(thrValId));
            }
            tVal.setLabel(label);           
            tVal.setPosition(position);
            tVal.setColourString(colourString);
            tVal.setValue(value);
            tVal.setSeverityCd(severityCd);
            if(severityCd!=null && !severityCd.equals("")){
              Integer severityId = domainIds.get(severityCd);   
              tVal.setSeverityId(severityId);   
            }

            if(typeCD.equals("MINIMUM")){
              tVal.setMinClosed(minClosed);
              tVal.setMinValue(minValue);
            }else if(typeCD.equals("MAXIMUM")){
              tVal.setMaxClosed(maxClosed);
              tVal.setMaxValue(maxValue);
           
            thrValuesList.add(tVal);
                       
          }else if(typeCD.equals("RANGE")){
            if(thrValuesJSON!=null){
              try {
                thrValuesList = deserializeThresholdValuesJSONArray(thrValuesJSON, domainIds);
              } catch (JSONException e) {
                logger.error("JSON Exception");
                e.printStackTrace();
              }
            }
          }
          thr.setThresholdValues(thrValuesList);
        }
     
        try {

          Integer idToReturnToClient = null;
         
          if(id != null && !id.equals("") && !id.equals("0")){ 
            //modify
            thr.setId(Integer.valueOf(id));
            try{
              thrDao.modifyThreshold(thr);
            }catch(EMFUserError e){
              logger.error(e.getMessage(), e);
              throw e;
View Full Code Here

Examples of it.eng.spagobi.kpi.threshold.bo.Threshold

        }
      }

      // 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.bo.Threshold

        }
      }

      // 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.bo.Threshold

      }

      // 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.