Examples of SbiKpiValue


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

    Criteria critt = aSession.createCriteria(SbiKpiValue.class);
    critt.add(Expression.eq("sbiKpiInstance", sbiKpiInst));
    List sbiKpiValueList = critt.list();

    for (Iterator iterator = sbiKpiValueList.iterator(); iterator.hasNext();) {
      SbiKpiValue sbiKpiValue = (SbiKpiValue) iterator.next();

      aSession.delete(sbiKpiValue);

    }
  }
View Full Code Here

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

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

      for (Iterator iterator = sbiKpiValueList.iterator(); iterator
      .hasNext();) {
        SbiKpiValue sbiKpiValue = (SbiKpiValue) iterator.next();

        aSession.delete(sbiKpiValue);
      }
    } catch (HibernateException he) {
      if (tx != null)
View Full Code Here

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

    Transaction tx = null;

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiKpiValue hibSbiKpiValue = (SbiKpiValue) aSession.load(SbiKpiValue.class, kpiValueId);
      xmlToReturn = hibSbiKpiValue.getXmlData();

    } catch (HibernateException he) {
      logger.error("Error while loading the KpiValue with id "
          + ((kpiValueId == null) ? "" : kpiValueId.toString()), he);
View Full Code Here

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

      if (!l.isEmpty()) {
        logger.debug("The result list is not empty");
        for (int k = l.size() - 1; k >= 0; k--) {
          Object[] tempL =  (Object[])l.get(k);
          Integer kpiValueId = (Integer) tempL[0];
          SbiKpiValue temp = (SbiKpiValue) aSession.load(SbiKpiValue.class, kpiValueId);
          SourceBean sb2 = new SourceBean("ROW");
          if (temp!=null && temp.getValue() != null) {
            sb2.setAttribute("x", temp.getBeginDt());
            sb2.setAttribute("KPI_VALUE", temp.getValue());
            sb.setAttribute(sb2);
          }
        }
      } else {
        logger.debug("The result list is empty");
View Full Code Here

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

      if (!l.isEmpty()) {
        logger.debug("The result list is not empty");
        for (int k = l.size() - 1; k >= 0; k--) {
          Object[] tempL =  (Object[])l.get(k);
          Integer kpiValueId = (Integer) tempL[0];
          SbiKpiValue temp = (SbiKpiValue) aSession.load(SbiKpiValue.class, kpiValueId);
          SourceBean sb2 = new SourceBean("ROW");
          if (temp !=null && temp.getValue() != null) {
            sb2.setAttribute("x", temp.getBeginDt());
            sb2.setAttribute("KPI_VALUE", temp.getValue());
            sb.setAttribute(sb2);
          }
        }
      } else {
        logger.debug("The result list is empty");
View Full Code Here

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

      if (dom != null)
        chartType = dom.getValueCd();

      Iterator iVa = kpiValues.iterator();
      while (iVa.hasNext()) {
        SbiKpiValue value = (SbiKpiValue) iVa.next();
        Date kpiValueBegDt = value.getBeginDt();
        logger.debug("Kpi value begin date: "
            + (kpiValueBegDt != null ? kpiValueBegDt.toString()
                : "Begin date null"));
        Date kpiValueEndDt = value.getEndDt();
        logger.debug("Kpi value end date: "
            + (kpiValueEndDt != null ? kpiValueEndDt.toString()
                : "End date null"));

        logger.debug("Date in which the value has to be valid: "
View Full Code Here

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

    Integer kpiValueId = null;

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiKpiValue hibKpiValue = new SbiKpiValue();
      Date beginDt = value.getBeginDate();
      logger
      .debug("Kpi value begin date: "
          + (beginDt != null ? beginDt.toString()
              : "Begin date null"));
      Date endDt = value.getEndDate();
      logger.debug("Kpi value end date: "
          + (endDt != null ? endDt.toString() : "End date null"));
      String valueDescr = value.getValueDescr();
      logger.debug("Kpi value: "
          + (valueDescr != null ? valueDescr
              : "value Description null"));
      String kpiValue = value.getValue();
      logger.debug("Kpi value: "
          + (kpiValue != null ? kpiValue : "Value null"));
      Integer kpiInstanceId = value.getKpiInstanceId();
      logger.debug("Kpi Instance ID: "
          + (kpiInstanceId != null ? kpiInstanceId.toString()
              : "Kpi Instance ID null"));
      SbiKpiInstance sbiKpiInstance = (SbiKpiInstance) aSession.load(
          SbiKpiInstance.class, kpiInstanceId);
      Resource r = value.getR();
      if (r != null) {
        IResourceDAO resDaoImpl=DAOFactory.getResourceDAO();
        SbiResources sbiResources = resDaoImpl.toSbiResource(r);
        logger.debug("Resource: "
            + (r.getName() != null ? r.getName()
                : "Resource name null"));
        hibKpiValue.setSbiResources(sbiResources);
      }
      OrganizationalUnitGrantNode grantNode = value.getGrantNodeOU();
      if (grantNode != null) {
        OrganizationalUnit ou = grantNode.getOuNode().getOu();
        SbiOrgUnit hibOU = new SbiOrgUnit();
        hibOU.setLabel(ou.getLabel());
        hibOU.setName(ou.getName());
        hibOU.setDescription(ou.getDescription());
        hibOU.setId(ou.getId());
       
        logger.debug("Organizational unit: "
            + (ou.getName() != null ? ou.getName()
                : "OU name null"));
        hibKpiValue.setSbiOrgUnit(hibOU);
        //same for hierarchy
        OrganizationalUnitHierarchy hier = grantNode.getOuNode().getHierarchy();
        SbiOrgUnitHierarchies hibHier = new SbiOrgUnitHierarchies();
        hibHier.setDescription(hier.getDescription());
        hibHier.setId(hier.getId());
        hibHier.setLabel(hier.getLabel());
        hibHier.setName(hier.getName());
        hibHier.setTarget(hier.getTarget());
        hibHier.setCompany(hier.getCompany());
       
        hibKpiValue.setSbiOrgUnitHierarchies(hibHier);
        //inserts company too as standalone column field
        hibKpiValue.setCompany(hier.getCompany());
       
      }
      hibKpiValue.setDescription(valueDescr);
      logger.debug("Kpi value description setted");
      hibKpiValue.setBeginDt(beginDt);
      logger.debug("Kpi value begin date setted");
      hibKpiValue.setEndDt(endDt);
      logger.debug("Kpi value end date setted");
      hibKpiValue.setValue(kpiValue);
      logger.debug("Kpi value setted");
      hibKpiValue.setSbiKpiInstance(sbiKpiInstance);
      logger.debug("Kpi Instance setted");
      hibKpiValue.setXmlData(value.getValueXml());
      updateSbiCommonInfo4Insert(hibKpiValue);
      kpiValueId = (Integer)aSession.save(hibKpiValue);
      tx.commit();
      return kpiValueId;
    } catch (HibernateException he) {
View Full Code Here

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

      List l = finder.list();
      if (!l.isEmpty()) {
        KpiValue tem = null;
        Iterator it = l.iterator();
        while (it.hasNext()) {
          SbiKpiValue temp = (SbiKpiValue) it.next();
          toReturn = toKpiValue(temp, d);
        }
      }

    } catch (HibernateException he) {
View Full Code Here

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

      List l = finder.list();
      if (!l.isEmpty()) {
        KpiValue tem = null;
        Iterator it = l.iterator();
        while (it.hasNext()) {
          SbiKpiValue temp = (SbiKpiValue) it.next();
          toReturn = toKpiValue(temp, from, to);
        }
      }

    } catch (HibernateException he) {
View Full Code Here

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

      List l = finder.list();
      if (!l.isEmpty()) {
        KpiValue tem = null;
        Iterator it = l.iterator();
        while (it.hasNext()) {         
          SbiKpiValue temp = (SbiKpiValue) it.next();
          aSession.delete(temp);
        }
      }
      tx.commit();
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.