Package it.eng.spagobi.kpi.threshold.bo

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


public class DetailThresholdsUtil {

  public static void selectThreshold(Integer id, SourceBean serviceResponse)
      throws SourceBeanException, EMFUserError {
    Threshold toReturn = DAOFactory.getThresholdDAO().loadThresholdById(id);
    serviceResponse.setAttribute("THRESHOLD", toReturn);
  }
View Full Code Here


    serviceResponse.setAttribute("THRESHOLD", toReturn);
  }

  public static void updateThresholdFromRequest(SourceBean serviceRequest,
      Integer id) throws EMFUserError {
    Threshold threshold = getThresholdFromRequest(serviceRequest);
    threshold.setId(id);
    DAOFactory.getThresholdDAO().modifyThreshold(threshold);
  }
View Full Code Here

        String kpiName = k.getKpiName();
        String thresholdName = "";
        List thresholdValues = null;
        if(kI.getThresholdId()!=null){
          thresholdValues=DAOFactory.getThresholdValueDAO().loadThresholdValuesByThresholdId(kI.getThresholdId());
          Threshold thres = DAOFactory.getThresholdDAO().loadThresholdById(kI.getThresholdId());
          thresholdName = thres.getName();
        }
       
        if (kpiCode!=null){
          serviceResponse.setAttribute("KPI_CODE", kpiCode);
        }else{
View Full Code Here

   
    if (sThresholdTypeId != null && ! (sThresholdTypeId.trim().equals(""))) {
      thresholdTypeId = Integer.parseInt(sThresholdTypeId);
    }

    Threshold toReturn = new Threshold();

    toReturn.setName(name);
    toReturn.setDescription(description);
    toReturn.setCode(code);
    toReturn.setThresholdTypeId(thresholdTypeId);

    return toReturn;
  }
View Full Code Here

    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

    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

              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

    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

   

    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

        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

TOP

Related Classes of it.eng.spagobi.kpi.threshold.bo.Threshold

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.