Examples of SbiOrgUnitNodes


Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

      Query hibQuery = aSession.createQuery(" from SbiOrgUnitNodes n where n.sbiOrgUnitHierarchies.id = ? " +
          " and n.sbiOrgUnitNodes is null");
      hibQuery.setInteger(0, hierarchyId);
     
      SbiOrgUnitNodes root = (SbiOrgUnitNodes) hibQuery.uniqueResult();

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

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

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

      SbiOrgUnitNodes hibNode = (SbiOrgUnitNodes) aSession.load(SbiOrgUnitNodes.class, node.getNodeId());
      aSession.delete(hibNode);
     
      tx.commit();
    } finally {
      rollbackIfActiveAndClose(tx, aSession);
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

      Query hibQuery = aSession.createQuery(" from SbiOrgUnitNodes n where n.sbiOrgUnitHierarchies.id = ? " +
          " and n.path = ? ");
      hibQuery.setInteger(0, hierarchyId);
      hibQuery.setString(1, path);
     
      SbiOrgUnitNodes hibNode = (SbiOrgUnitNodes) hibQuery.uniqueResult();
      toReturn = toOrganizationalUnitNode(hibNode);
     
    } finally {
      rollbackIfActiveAndClose(tx, aSession);
    }
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

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

      SbiOrgUnitNodes hibNode = new SbiOrgUnitNodes();
     
      Query hibQuery = aSession.createQuery(" from SbiOrgUnitHierarchies s where s.id = ? ");
      hibQuery.setInteger(0, aNode.getHierarchy().getId());
      SbiOrgUnitHierarchies hierarchy = (SbiOrgUnitHierarchies) hibQuery.uniqueResult();
      hibNode.setSbiOrgUnitHierarchies(hierarchy);
     
      hibNode.setPath(aNode.getPath());
     
      hibQuery = aSession.createQuery(" from SbiOrgUnit s where s.id = ? ");
      hibQuery.setInteger(0, aNode.getOu().getId());
      SbiOrgUnit ou = (SbiOrgUnit) hibQuery.uniqueResult();
      hibNode.setSbiOrgUnit(ou);
     
      if (aNode.getParentNodeId() != null) {
        hibQuery = aSession.createQuery(" from SbiOrgUnitNodes s where s.nodeId = ? ");
        hibQuery.setInteger(0, aNode.getParentNodeId());
        SbiOrgUnitNodes parentNode = (SbiOrgUnitNodes) hibQuery.uniqueResult();
        hibNode.setSbiOrgUnitNodes(parentNode);
      }
      updateSbiCommonInfo4Insert(hibNode);
      aSession.save(hibNode);
      tx.commit();
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

        SbiOrgUnitGrantNodes grantNode = new SbiOrgUnitGrantNodes();
     
        SbiOrgUnitGrantNodesId grantNodeId = new SbiOrgUnitGrantNodesId(hierarchyNodeId, kpiModelInstNodeId, grantId);
        grantNode.setId(grantNodeId);
       
        SbiOrgUnitNodes hibNode = (SbiOrgUnitNodes) aSession.load(SbiOrgUnitNodes.class, hierarchyNodeId);
        grantNode.setSbiOrgUnitNodes(hibNode);
       
        SbiKpiModelInst kpiModelInst = (SbiKpiModelInst) aSession.load(SbiKpiModelInst.class, kpiModelInstNodeId);
        grantNode.setSbiKpiModelInst(kpiModelInst);
       
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

      Query hibQuery = aSession.createQuery(" from SbiOrgUnitNodes n where n.sbiOrgUnitHierarchies.id = ? " +
          " and n.sbiOrgUnitNodes is null");
      hibQuery.setInteger(0, hierarchyId);
     
      SbiOrgUnitNodes root = (SbiOrgUnitNodes) hibQuery.uniqueResult();

      if (root != null) {
        OrganizationalUnitNode node = toOrganizationalUnitNode(root);
        toReturn = getNodeWithGrants(node, grantId, aSession);
      }
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

      if(!hibList.isEmpty()) {
        return;
      }
      SbiOrgUnit ou = (SbiOrgUnit)session.load(SbiOrgUnit.class, node.getOu().getId());
      SbiOrgUnitHierarchies hier =(SbiOrgUnitHierarchies)session.load(SbiOrgUnitHierarchies.class, node.getHierarchy().getId());
      SbiOrgUnitNodes parent = null;
      if(node.getParentNodeId() != null){
        parent =(SbiOrgUnitNodes)session.load(SbiOrgUnitNodes.class, node.getParentNodeId());
      }
      // main attributes     
      SbiOrgUnitNodes hibNode = new SbiOrgUnitNodes();
      hibNode.setNodeId(node.getNodeId());
      hibNode.setPath(node.getPath());
      hibNode.setSbiOrgUnit(ou);
      hibNode.setSbiOrgUnitHierarchies(hier);
      hibNode.setSbiOrgUnitNodes(parent);

      Transaction tx = session.beginTransaction();
      session.save(hibNode);
      tx.commit();
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

        return;
      }

      SbiKpiModelInst mi =(SbiKpiModelInst)session.load(SbiKpiModelInst.class, ou.getModelInstanceNode().getModelInstanceNodeId());
      SbiOrgUnitGrant g =(SbiOrgUnitGrant)session.load(SbiOrgUnitGrant.class, ou.getGrant().getId());
      SbiOrgUnitNodes n =(SbiOrgUnitNodes)session.load(SbiOrgUnitNodes.class, ou.getOuNode().getNodeId());
      // main attributes     
      SbiOrgUnitGrantNodes hibGrant = new SbiOrgUnitGrantNodes();
      SbiOrgUnitGrantNodesId id = new SbiOrgUnitGrantNodesId();
      id.setKpiModelInstNodeId(ou.getModelInstanceNode().getModelInstanceNodeId());
      id.setGrantId(ou.getGrant().getId());
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

      Map uniqueMap = (Map) unique;
      Integer ouId = (Integer) uniqueMap.get("ouId");
      Integer hierarchyId = (Integer) uniqueMap.get("hierarchyId");
      hql = "from SbiOrgUnitNodes n where n.sbiOrgUnit.id = " + ouId + " and n.sbiOrgUnitHierarchies.id = "+hierarchyId;
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiOrgUnitNodes hibnode = (SbiOrgUnitNodes) hqlQuery.uniqueResult();
      return hibnode;   
    }else if (hibObj instanceof SbiOrgUnitGrant) {
      String label = (String) unique;
      hql = "from SbiOrgUnitGrant u where u.label = '" + label + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
View Full Code Here

Examples of it.eng.spagobi.kpi.ou.metadata.SbiOrgUnitNodes

      Integer newNodeId=(Integer)nodeAss.get(oldNodeId);
      if(newNodeId==null) {
        logger.error("could not find association with node id with id " + oldNodeId);       
      }
      else{
        SbiOrgUnitNodes newSbiNode = (SbiOrgUnitNodes) sessionCurrDB.load(SbiOrgUnitNodes.class, newNodeId);
        exportedGrantNode.setSbiOrgUnitNodes(newSbiNode);
        id.setNodeId(newSbiNode.getNodeId());
      }
    }
    existingGrantNode.setId(id);
    logger.debug("OUT");
  }
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.