Examples of SbiKpiModelInst


Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

    Transaction tx = null;
    ModelInstance toReturn = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiKpiModelInst hibSbiKpiModelInst = (SbiKpiModelInst) aSession
      .load(SbiKpiModelInst.class, id);
      toReturn = toModelInstanceWithChildren(aSession,
          hibSbiKpiModelInst, null);
    } catch (HibernateException he) {
      logger.error("Error while loading the ModelInstance with id "
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

    Transaction tx = null;
    ModelInstance toReturn = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiKpiModelInst hibSbiKpiModelInst = (SbiKpiModelInst) aSession
      .load(SbiKpiModelInst.class, label);
      toReturn = toModelInstanceWithChildren(aSession,
          hibSbiKpiModelInst, null);
    } catch (HibernateException he) {
      logger.error("Error while loading the ModelInstance with label "
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

    critt.createCriteria("sbiKpiModel").addOrder(Order.asc("kpiModelCd"));

    List children = critt.list();

    for (Iterator iterator = children.iterator(); iterator.hasNext();) {
      SbiKpiModelInst sbiKpichild = (SbiKpiModelInst) iterator.next();
      ModelInstance child = toModelInstanceWithChildren(session,
          sbiKpichild, id);
      childrenNodes.add(child);
    }
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

    Transaction tx = null;
    List toReturn = new ArrayList();
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiKpiModelInst sbiKpiModelInst = (SbiKpiModelInst) aSession.load(
          SbiKpiModelInst.class, parentId);
      SbiKpiModel aModel = (SbiKpiModel) sbiKpiModelInst.getSbiKpiModel();

      // Load all Children
      if (aModel != null) {
        Set modelChildren = aModel.getSbiKpiModels();
        // Load all ModelInstance Children
        Set modelInstanceChildren = sbiKpiModelInst
        .getSbiKpiModelInsts();
        // Remove all Children just instantiated
        for (Iterator iterator = modelInstanceChildren.iterator(); iterator
        .hasNext();) {
          SbiKpiModelInst child = (SbiKpiModelInst) iterator.next();
          modelChildren.remove(child.getSbiKpiModel());
        }
        for (Iterator iterator = modelChildren.iterator(); iterator
        .hasNext();) {
          SbiKpiModel sbiKpiModelCandidate = (SbiKpiModel) iterator
          .next();
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

  public boolean deleteModelInstance(Integer modelId) throws EMFUserError {
    Session aSession = getSession();
    Transaction tx = null;
    try {
      tx = aSession.beginTransaction();
      SbiKpiModelInst aModelInst = (SbiKpiModelInst) aSession.load(
          SbiKpiModelInst.class, modelId);
      recursiveStepDelete(aSession, aModelInst);
      deleteModelInstKpiInstResourceValue(aSession, aModelInst);

      tx.commit();
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

  private void recursiveStepDelete(Session aSession,
      SbiKpiModelInst aModelInst) throws EMFUserError {
    Set children = aModelInst.getSbiKpiModelInsts();
    for (Iterator iterator = children.iterator(); iterator.hasNext();) {
      SbiKpiModelInst modelInstChild = (SbiKpiModelInst) iterator.next();
      recursiveStepDelete(aSession, modelInstChild);
      // delete Model Instance, Kpi Inst, History, Resource and Value
      deleteModelInstKpiInstResourceValue(aSession, modelInstChild);
    }
  }
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

      }

      List sbiKpiModelInstanceList = crit.list();
      for (Iterator iterator = sbiKpiModelInstanceList.iterator(); iterator
      .hasNext();) {
        SbiKpiModelInst sbiKpiModelInst = (SbiKpiModelInst) iterator
        .next();
        ModelInstance aModelInst = toModelInstanceWithoutChildren(
            sbiKpiModelInst, aSession);
        toReturn.add(aModelInst);
      }
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiKpiModelInst

      if(hibSbiKpiModelInstances!=null && hibSbiKpiModelInstances.size() != 0){

        Iterator it = hibSbiKpiModelInstances.iterator();
        while (it.hasNext()) {
          KpiAlarmInstance kpiAlarm = new KpiAlarmInstance();
          SbiKpiModelInst kpiModelInst = (SbiKpiModelInst) it.next();
          String modelName = kpiModelInst.getName();
          kpiAlarm.setKpiModelName(modelName);
          SbiKpiInstance kpiInst = kpiModelInst.getSbiKpiInstance();
          if(kpiInst != null){
            Integer kpiInstId = kpiInst.getIdKpiInstance();
            kpiAlarm.setKpiInstanceId(kpiInstId);
            SbiKpi sk = kpiInst.getSbiKpi();
            if(sk != 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.