Examples of SbiOrgUnit


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

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

      SbiOrgUnit hibOU = (SbiOrgUnit) aSession.load(SbiOrgUnit.class, id);

      toReturn = toOrganizationalUnit(hibOU);
     
    } finally {
      rollbackIfActiveAndClose(tx, aSession);
View Full Code Here

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

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
     
      SbiOrgUnit hibOU = (SbiOrgUnit) aSession.load(SbiOrgUnit.class, ouId);
      aSession.delete(hibOU);
     
      tx.commit();
    } finally {
      rollbackIfActiveAndClose(tx, aSession);
View Full Code Here

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

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
     
      SbiOrgUnit hibOU = new SbiOrgUnit();
      hibOU.setLabel(ou.getLabel());
      hibOU.setName(ou.getName());
      hibOU.setDescription(ou.getDescription());

      //look for preexisting one with same same label-name key
      Query hibQuery = aSession.createQuery(" from SbiOrgUnit s where s.name = ? and s.label = ?");
      hibQuery.setString(0, ou.getName());
      hibQuery.setString(1, ou.getLabel());
 
      SbiOrgUnit exists= (SbiOrgUnit)hibQuery.uniqueResult();
      updateSbiCommonInfo4Insert(hibOU);
      if(exists == null){
        aSession.save(hibOU)
        tx.commit();
        ou.setId(hibOU.getId());
      }else{
        ou.setId(exists.getId());
        tx.commit();
      }
     
    } finally {
      rollbackIfActiveAndClose(tx, aSession);
View Full Code Here

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

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
     
      SbiOrgUnit hibOU = (SbiOrgUnit) aSession.load(SbiOrgUnit.class, ou.getId());
      hibOU.setLabel(ou.getLabel());
      hibOU.setName(ou.getName());
      hibOU.setDescription(ou.getDescription());
      updateSbiCommonInfo4Update(hibOU);
      aSession.save(hibOU);
     
      tx.commit();
    } finally {
View Full Code Here

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

     
      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());
View Full Code Here

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

      aSession = getSession();
      tx = aSession.beginTransaction();
      Query hibQuery = aSession.createQuery(" from SbiOrgUnit o where o.label = ? and o.name = ?");
      hibQuery.setString(0, label);
      hibQuery.setString(1, name);
      SbiOrgUnit hibOU = (SbiOrgUnit)hibQuery.uniqueResult();
      if(hibOU != null){
        toReturn = toOrganizationalUnit(hibOU);
      }else
        return null;
     
View Full Code Here

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

      List hibList = hibQuery.list();
      if(!hibList.isEmpty()) {
        return;
      }
      // main attributes     
      SbiOrgUnit hibOu = new SbiOrgUnit();
      hibOu.setDescription(ou.getDescription());
      hibOu.setId(ou.getId());
      hibOu.setLabel(ou.getLabel());
      hibOu.setName(ou.getName());

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

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

      Query hibQuery = session.createQuery(" from SbiOrgUnitNodes n where n.nodeId = " + node.getNodeId());
      List hibList = hibQuery.list();
      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());
      }
View Full Code Here

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

     
      hql = "from SbiOrgUnit u where u.label = '" + label  + "' and u.name = ?";
      hqlQuery = sessionCurrDB.createQuery(hql);
      hqlQuery.setString(0, name);

      SbiOrgUnit hibOu = (SbiOrgUnit) hqlQuery.uniqueResult();
      return hibOu;   
    }else if (hibObj instanceof SbiOrgUnitHierarchies) {

      Map uniqueMap = (Map) unique;
      String label = (String) uniqueMap.get("label");
View Full Code Here

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

        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);
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.