Package it.eng.spagobi.analiticalmodel.document.metadata

Examples of it.eng.spagobi.analiticalmodel.document.metadata.SbiObjFunc


    logger.debug("IN");
    try {
      List exportedFunctObjects = importer.getFilteredExportedSbiObjects(sessionExpDB, "SbiObjFunc", "id.sbiObjects.biobjId", exportedBIObjectId);
      Iterator iterSbiFunctObjects = exportedFunctObjects.iterator();
      while (iterSbiFunctObjects.hasNext()) {
        SbiObjFunc objfunct = (SbiObjFunc) iterSbiFunctObjects.next();
        // get ids of exported role, function and state associzted
        Integer functid = objfunct.getId().getSbiFunctions().getFunctId();
        Integer objid = objfunct.getId().getSbiObjects().getBiobjId();
        Integer prog = objfunct.getProg();
        // get association of roles and paruses
        Map functIdAss = metaAss.getFunctIDAssociation();
        Map biobjIdAss = metaAss.getBIobjIDAssociation();
        // try to get from association the id associate to the exported
        // metadata
        Integer newFunctid = (Integer) functIdAss.get(functid);
        Integer newObjectid = (Integer) biobjIdAss.get(objid);
        // build a new id for the SbiObjFunct
        SbiObjFuncId objfunctid = objfunct.getId();
        if (objfunctid != null) {
          SbiFunctions sbifunct = objfunctid.getSbiFunctions();
          SbiFunctions newFunct = ImportUtilities.makeNewSbiFunction(sbifunct, newFunctid);
          objfunctid.setSbiFunctions(newFunct);
          functid = newFunctid;
        }
        if (newObjectid != null) {
          SbiObjects sbiobj = objfunctid.getSbiObjects();
          SbiObjects newObj = ImportUtilities.makeNewSbiObject(sbiobj, newObjectid);
          objfunctid.setSbiObjects(newObj);
          objid = newObjectid;
        }
        objfunct.setId(objfunctid);
        // check if the association between metadata already exist
        Map unique = new HashMap();
        unique.put("objectid", objid);
        unique.put("functionid", functid);
        Object existObj = importer.checkExistence(unique, sessionCurrDB, new SbiObjFunc());
        if (existObj == null) {
          sessionCurrDB.save(objfunct);
          metaLog.log("Inserted new association between function "
              + objfunct.getId().getSbiFunctions().getName() + " and object "
              + objfunct.getId().getSbiObjects().getName());
        }
      }
    } catch (HibernateException he) {
      logger.error("Error while inserting object ", he);
      throw new EMFUserError(EMFErrorSeverity.ERROR, "8004", "component_impexp_messages");
View Full Code Here


      SbiObjFuncId hibObjFunctId = new SbiObjFuncId();
      SbiFunctions hibFunct = (SbiFunctions)session.load(SbiFunctions.class, funct.getId());
      SbiObjects hibObj = (SbiObjects)session.load(SbiObjects.class, biobj.getId());
      hibObjFunctId.setSbiObjects(hibObj);
      hibObjFunctId.setSbiFunctions(hibFunct);
      SbiObjFunc hibObjFunct = new SbiObjFunc(hibObjFunctId);
      hibObjFunct.setProg(new Integer(0));
      session.save(hibObjFunct);
      tx.commit();
    } catch (Exception e) {
      logger.error("Error while inserting function and object association into export database " , e);
      throw new EMFUserError(EMFErrorSeverity.ERROR, "8005", "component_impexp_messages");
View Full Code Here

      Integer objid = (Integer) uniqueMap.get("objectid");
      Integer functionid = (Integer) uniqueMap.get("functionid");
      hql = "from SbiObjFunc objfun where objfun.id.sbiObjects.biobjId = " + objid
      + " and objfun.id.sbiFunctions.functId = " + functionid;
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiObjFunc hibObjFunct = (SbiObjFunc) hqlQuery.uniqueResult();
      return hibObjFunct;
    } else if (hibObj instanceof SbiSubreports) {
      Map uniqueMap = (Map) unique;
      Integer masterid = (Integer) uniqueMap.get("masterid");
      Integer subid = (Integer) uniqueMap.get("subid");
View Full Code Here

        Integer functId = (Integer) it.next();
        SbiFunctions aSbiFunctions = (SbiFunctions) aSession.load(SbiFunctions.class, functId);
        SbiObjFuncId aSbiObjFuncId = new SbiObjFuncId();
        aSbiObjFuncId.setSbiFunctions(aSbiFunctions);
        aSbiObjFuncId.setSbiObjects(hibBIObject);
        SbiObjFunc aSbiObjFunc = new SbiObjFunc(aSbiObjFuncId);
        updateSbiCommonInfo4Update(aSbiObjFunc);
        aSession.save(aSbiObjFunc);
        hibObjFunc.add(aSbiObjFunc);
      }
      hibBIObject.setSbiObjFuncs(hibObjFunc);
View Full Code Here

        Integer functId = (Integer) it.next();
        SbiFunctions aSbiFunctions = (SbiFunctions) aSession.load(SbiFunctions.class, functId);
        SbiObjFuncId aSbiObjFuncId = new SbiObjFuncId();
        aSbiObjFuncId.setSbiFunctions(aSbiFunctions);
        aSbiObjFuncId.setSbiObjects(hibBIObject);
        SbiObjFunc aSbiObjFunc = new SbiObjFunc(aSbiObjFuncId);
        updateSbiCommonInfo4Insert(aSbiObjFunc);
        aSession.save(aSbiObjFunc);
        hibObjFunc.add(aSbiObjFunc);
      }
      hibBIObject.setSbiObjFuncs(hibObjFunc)
View Full Code Here

      SbiObjects hibBIObject = (SbiObjects) aSession.load(SbiObjects.class, obj.getId());     
      // erase object from functionalities
      Set hibObjFuncs = hibBIObject.getSbiObjFuncs();
      Iterator itObjFunc = hibObjFuncs.iterator();
      while (itObjFunc.hasNext()) {
        SbiObjFunc aSbiObjFunc = (SbiObjFunc) itObjFunc.next();
        if (idFunct == null || aSbiObjFunc.getId().getSbiFunctions().getFunctId().intValue() == idFunct.intValue()) {
          logger.debug("Deleting object [" + obj.getName() + "] from folder [" + aSbiObjFunc.getId().getSbiFunctions().getPath() + "]");
          aSession.delete(aSbiObjFunc);
        }
      }

      aSession.flush();
View Full Code Here

      String objectState = hibBIObject.getState().getValueCd();
      String permission = ObjectsAccessVerifier.getPermissionFromDocumentState(objectState);
      Set hibObjFuncs = hibBIObject.getSbiObjFuncs();
      Iterator itObjFunc = hibObjFuncs.iterator();
      while (itObjFunc.hasNext()) {
        SbiObjFunc aSbiObjFunc = (SbiObjFunc) itObjFunc.next();
        SbiFunctions aSbiFunctions = aSbiObjFunc.getId().getSbiFunctions();
        String funcTypeCd = aSbiFunctions.getFunctTypeCd();
        logger.debug("Folder type [" + funcTypeCd + "]");
        if(!funcTypeCd.equalsIgnoreCase("USER_FUNCT")){
          logger.debug("Folder id [" + aSbiFunctions.getFunctId() + "]");
          logger.debug("Document state [" + objectState + "]");
View Full Code Here

    aBIObject.setStateID(hibBIObject.getState().getValueId());

    List functionlities = new ArrayList();
    Set hibObjFuncs = hibBIObject.getSbiObjFuncs();
    for (Iterator it = hibObjFuncs.iterator(); it.hasNext(); ) {
      SbiObjFunc aSbiObjFunc = (SbiObjFunc) it.next();
      Integer functionalityId = aSbiObjFunc.getId().getSbiFunctions().getFunctId();
      functionlities.add(functionalityId);
    }
    aBIObject.setFunctionalities(functionlities);
   
    List businessObjectParameters = new ArrayList();
View Full Code Here

      try {
        objDAO = (BIObjectDAOHibImpl) DAOFactory.getBIObjectDAO();

        Set hibObjFuncs = hibFunct.getSbiObjFuncs();
        for (Iterator it = hibObjFuncs.iterator(); it.hasNext();) {
          SbiObjFunc hibObjFunc = (SbiObjFunc) it.next();
          BIObject object = objDAO.toBIObject(hibObjFunc.getId()
              .getSbiObjects());
          biObjects.add(object);
        }
      } catch (EMFUserError e) {
        logger.error("Error", e);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.analiticalmodel.document.metadata.SbiObjFunc

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.