Package it.eng.spagobi.kpi.goal.metadata

Examples of it.eng.spagobi.kpi.goal.metadata.SbiGoalHierarchy


      Query hibQuery = aSession.createQuery(" from SbiGoalHierarchy n where n.goalId = ? " +
          " and n.sbiGoalHierarchy is null and n.orgUnitId= ?");
      hibQuery.setInteger(0, goalId);
      hibQuery.setInteger(1, ouId);
     
      SbiGoalHierarchy root = (SbiGoalHierarchy) hibQuery.uniqueResult();

      if (root != null) {
        toReturn = toGoalNode(root);
      }
    } finally {
View Full Code Here


    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();

      SbiGoalHierarchy hibGoalHierarchy = new SbiGoalHierarchy();
      hibGoalHierarchy.setName(goalNode.getName());
      hibGoalHierarchy.setLabel(goalNode.getLabel());
      hibGoalHierarchy.setGoal(goalNode.getGoalDescr());
      hibGoalHierarchy.setOrgUnitId(goalNode.getOuId());
      hibGoalHierarchy.setGoalId(goalNode.getGoalId());
      if(fatherId!=null){
        Query hibQuery = aSession.createQuery(" from SbiGoalHierarchy s where s.goalHierarchyId = ? ");
        hibQuery.setInteger(0, fatherId);
        SbiGoalHierarchy father= (SbiGoalHierarchy)hibQuery.uniqueResult();
        hibGoalHierarchy.setSbiGoalHierarchy(father);
      }
      updateSbiCommonInfo4Insert(hibGoalHierarchy);
      aSession.save(hibGoalHierarchy)
      tx.commit();
View Full Code Here

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();

      SbiGoalHierarchy hibGrantNode = (SbiGoalHierarchy) aSession.load(SbiGoalHierarchy.class, goalNodeId);
      aSession.delete(hibGrantNode);

      tx.commit();
    } finally {
      rollbackIfActiveAndClose(tx, aSession);
View Full Code Here

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();

      SbiGoalHierarchy hibGrantNode = (SbiGoalHierarchy) aSession.load(SbiGoalHierarchy.class, goalId);
      hibGrantNode.setName(newName);
      updateSbiCommonInfo4Update(hibGrantNode);
      aSession.update(hibGrantNode);

      tx.commit();
    } finally {
View Full Code Here

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      Query hibQuery = aSession.createQuery(" from SbiGoalHierarchy s where s.goalHierarchyId = ? ");
      hibQuery.setInteger(0, goalNode.getId());
      SbiGoalHierarchy exists= (SbiGoalHierarchy)hibQuery.uniqueResult();
      exists.setName(goalNode.getName());
      exists.setLabel(goalNode.getLabel());
      exists.setGoal(goalNode.getGoalDescr());
      updateSbiCommonInfo4Update(exists);
      aSession.update(exists)
      tx.commit();     
    } finally {
      rollbackIfActiveAndClose(tx, aSession);
View Full Code Here

      aSession = getSession();
      tx = aSession.beginTransaction();
     
      Query hibQuery = aSession.createQuery(" from SbiGoalHierarchy s where s.goalHierarchyId = ? ");
      hibQuery.setInteger(0, goalNodeId);
      SbiGoalHierarchy goalNodel= (SbiGoalHierarchy)hibQuery.uniqueResult();

      for(int i=0; i<goalKpis.size(); i++){
        insertGoalKpi(goalKpis.get(i), goalNodel, aSession, tx);
      }
     
View Full Code Here

TOP

Related Classes of it.eng.spagobi.kpi.goal.metadata.SbiGoalHierarchy

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.