Examples of SbiObjParuse


Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

          SbiObjPar objparfather = (SbiObjPar)session.load(SbiObjPar.class, objparuse.getObjParFatherId());
          hibObjParuseId.setSbiObjPar(hibObjPar);
          hibObjParuseId.setSbiParuse(hibParuse);
          hibObjParuseId.setFilterOperation(objparuse.getFilterOperation());
          hibObjParuseId.setSbiObjParFather(objparfather);
          SbiObjParuse hibObjParuse = new SbiObjParuse(hibObjParuseId);
          hibObjParuse.setFilterColumn(objparuse.getFilterColumn());
          hibObjParuse.setProg(objparuse.getProg());
          hibObjParuse.setPreCondition(objparuse.getPreCondition());
          hibObjParuse.setPostCondition(objparuse.getPostCondition());
          hibObjParuse.setLogicOperator(objparuse.getLogicOperator());
          session.save(hibObjParuse);
          tx.commit()
        }
      }
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

      hql = "from SbiObjParuse objparuse where objparuse.id.sbiObjPar.objParId = " + objparid
      + " and objparuse.id.sbiParuse.useId = " + paruseid
      + " and objparuse.id.sbiObjParFather.objParId = " + objparfathid
      + " and objparuse.id.filterOperation = '" + filterOp + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiObjParuse hibObjParUse = (SbiObjParuse) hqlQuery.uniqueResult();
      return hibObjParUse;
    } else if (hibObj instanceof SbiDataSetConfig) {
      String label = (String) unique;
      hql = "from SbiDataSetConfig ds where ds.label = '" + label + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

      hqlQuery.setInteger(0, aObjParuse.getObjParId().intValue());
      hqlQuery.setInteger(1, aObjParuse.getParuseId().intValue());
      hqlQuery.setInteger(2, aObjParuse.getObjParFatherId().intValue());
      hqlQuery.setString(3, aObjParuse.getFilterOperation());
     
      SbiObjParuse sbiObjParuse = (SbiObjParuse)hqlQuery.uniqueResult();
      if (sbiObjParuse == null) {
        SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),
              "modifyObjParuse", "the ObjParuse relevant to BIObjectParameter with " +
              "id="+aObjParuse.getObjParId()+" and ParameterUse with " +
              "id="+aObjParuse.getParuseId()+" does not exist.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1043);
      }
      // delete the existing object
      aSession.delete(sbiObjParuse);
      // create the new object
      SbiObjPar sbiObjPar = (SbiObjPar) aSession.load(SbiObjPar.class, aObjParuse.getObjParId());
      SbiParuse sbiParuse = (SbiParuse) aSession.load(SbiParuse.class, aObjParuse.getParuseId());
      SbiObjPar sbiObjParFather = (SbiObjPar) aSession.load(SbiObjPar.class, aObjParuse.getObjParFatherId());
      if (sbiObjParFather == null) {
        SpagoBITracer.major(SpagoBIConstants.NAME_MODULE,  this.getClass().getName(),
                          "modifyObjParuse", "the BIObjectParameter with " +
                          "id="+aObjParuse.getObjParFatherId()+" does not exist.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1043);
      }
      SbiObjParuseId correlationId = new SbiObjParuseId();
      correlationId.setSbiObjPar(sbiObjPar);
      correlationId.setSbiParuse(sbiParuse);
      correlationId.setSbiObjParFather(sbiObjParFather);
      correlationId.setFilterOperation(aObjParuse.getFilterOperation());
      SbiObjParuse correlation = new SbiObjParuse(correlationId);
      correlation.setProg(aObjParuse.getProg());
      correlation.setFilterColumn(aObjParuse.getFilterColumn());
      correlation.setPreCondition(aObjParuse.getPreCondition());
      correlation.setPostCondition(aObjParuse.getPostCondition());
      correlation.setLogicOperator(aObjParuse.getLogicOperator());
      // save new object
      updateSbiCommonInfo4Insert(correlation);
      aSession.save(correlation);
      tx.commit();
    } catch (HibernateException he) {
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

      SbiObjParuseId correlationId = new SbiObjParuseId();
      correlationId.setSbiObjPar(sbiObjPar);
      correlationId.setSbiParuse(sbiParuse);
      correlationId.setSbiObjParFather(sbiObjParFather);
      correlationId.setFilterOperation(aObjParuse.getFilterOperation());
      SbiObjParuse correlation = new SbiObjParuse(correlationId);
      correlation.setProg(aObjParuse.getProg());
      correlation.setFilterColumn(aObjParuse.getFilterColumn());
      correlation.setPreCondition(aObjParuse.getPreCondition());
      correlation.setPostCondition(aObjParuse.getPostCondition());
      correlation.setLogicOperator(aObjParuse.getLogicOperator());
      updateSbiCommonInfo4Insert(correlation);
      aSession.save(correlation);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

    hqlQuery.setInteger(0, aObjParuse.getObjParId().intValue());
    hqlQuery.setInteger(1, aObjParuse.getParuseId().intValue());
    hqlQuery.setInteger(2, aObjParuse.getObjParFatherId().intValue());
    hqlQuery.setString(3,  aObjParuse.getFilterOperation());
   
    SbiObjParuse sbiObjParuse = (SbiObjParuse)hqlQuery.uniqueResult();
    if (sbiObjParuse == null) {   
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),
          "eraseObjParuse", "the ObjParuse relevant to BIObjectParameter with " +
          "id="+aObjParuse.getObjParId()+" and ParameterUse with " +
          "id="+aObjParuse.getParuseId()+" does not exist.");
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

      if (objParuses == null || objParuses.size() == 0)
        return toReturn;
      // add to the list all the distinct labels of parameter which depend form the father parameter
      Iterator it = objParuses.iterator();
      while (it.hasNext()) {
        SbiObjParuse objParuseHib = (SbiObjParuse) it.next();
        Integer objParId = objParuseHib.getId().getSbiObjPar().getObjParId();
        SbiObjPar hibObjPar = (SbiObjPar) aSession.load(SbiObjPar.class, objParId);
        String label = hibObjPar.getLabel();
        if(!toReturn.contains(label)){
          toReturn.add(label);
        }
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

      List sbiObjParuses = query.list();
      if(sbiObjParuses==null)
        return objparuses;
      Iterator itersbiOP = sbiObjParuses.iterator();
      while(itersbiOP.hasNext()) {
        SbiObjParuse sbiop = (SbiObjParuse)itersbiOP.next();
          ObjParuse op = toObjParuse(sbiop);
          objparuses.add(op);
      }
      tx.commit();
    } catch (HibernateException he) {
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

    Query hqlQuery = sessionCurrDB.createQuery(q);
    try{
      List hibUse = (List) hqlQuery.list();

      for (Iterator iterator = hibUse.iterator(); iterator.hasNext();) {
        SbiObjParuse object = (SbiObjParuse) iterator.next();
        sessionCurrDB.delete(object);
      }

    }
    catch (Exception e) {
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

        Query query = sessionCurrDB.createQuery(" from SbiObjParuse where id.sbiObjPar.objParId = " + objPar.getObjParId());
        List dependencies = query.list();
        if (dependencies != null && !dependencies.isEmpty()) {
          Iterator it = dependencies.iterator();
          while (it.hasNext()) {
            SbiObjParuse aSbiObjParuse = (SbiObjParuse) it.next();
            sessionCurrDB.delete(aSbiObjParuse);
          }
        }
        sessionCurrDB.delete(objPar);
      }
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.metadata.SbiObjParuse

    logger.debug("IN");
    try {
      List exportedParDepends = importer.getFilteredExportedSbiObjects(sessionExpDB, "SbiObjParuse", "id.sbiObjPar.sbiObject.biobjId", exportedBIObjectId);
      Iterator iterParDep = exportedParDepends.iterator();
      while (iterParDep.hasNext()) {
        SbiObjParuse pardep = (SbiObjParuse) iterParDep.next();
        // get ids of objpar and paruse associated
        Integer objparId = pardep.getId().getSbiObjPar().getObjParId();
        Integer paruseId = pardep.getId().getSbiParuse().getUseId();
        Integer objparfathId = pardep.getId().getSbiObjParFather().getObjParId();
        String filterOp = pardep.getId().getFilterOperation();
        // get association of objpar and paruses
        Map objparIdAss = metaAss.getObjparIDAssociation();
        Map paruseIdAss = metaAss.getParuseIDAssociation();
        // try to get from association the id associate to the exported
        // metadata
        Integer newObjparId = (Integer) objparIdAss.get(objparId);
        Integer newParuseId = (Integer) paruseIdAss.get(paruseId);
        Integer newObjParFathId = (Integer) objparIdAss.get(objparfathId);
        // build a new id for the SbiObjParuse
        SbiObjParuseId objparuseid = pardep.getId();
        objparuseid.setFilterOperation(filterOp);
        if (newParuseId != null) {
          SbiParuse sbiparuse = objparuseid.getSbiParuse();
          SbiParuse newParuse = ImportUtilities.makeNewSbiParuse(sbiparuse, newParuseId);
          objparuseid.setSbiParuse(newParuse);
          paruseId = newParuseId;
        }
        if (newObjparId != null) {
          SbiObjPar sbiobjpar = objparuseid.getSbiObjPar();
          SbiObjPar newObjPar = ImportUtilities.makeNewSbiObjpar(sbiobjpar, newObjparId);
          objparuseid.setSbiObjPar(newObjPar);
          objparId = newObjparId;
        }
        if (newObjParFathId != null) {
          SbiObjPar sbiobjparfath = objparuseid.getSbiObjParFather();
          SbiObjPar newObjParFath = ImportUtilities.makeNewSbiObjpar(sbiobjparfath, newObjParFathId);
          objparuseid.setSbiObjParFather(newObjParFath);
          objparfathId = newObjParFathId;
        }

        pardep.setId(objparuseid);

        Map unique = new HashMap();
        unique.put("objparid", objparId);
        unique.put("paruseid", paruseId);
        unique.put("objparfathid", objparfathId);
        unique.put("filterop", filterOp);
        Object existObj = importer.checkExistence(unique, sessionCurrDB, new SbiObjParuse());
        if (existObj == null) {
          sessionCurrDB.save(pardep);
          metaLog.log("Inserted new dependecies between biparameter "
              + pardep.getId().getSbiObjPar().getLabel() + " of the biobject "
              + pardep.getId().getSbiObjPar().getSbiObject().getLabel() + " and paruse "
              + pardep.getId().getSbiParuse().getLabel());
        }
      }
    } catch (HibernateException he) {
      logger.error("Error while inserting object ", he);
      throw new EMFUserError(EMFErrorSeverity.ERROR, "8004", "component_impexp_messages");
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.