Examples of SbiParuseCk


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

      SbiParuseCkId hibParuseCkId = new SbiParuseCkId();
      SbiChecks hibChecks = (SbiChecks)session.load(SbiChecks.class, check.getCheckId());
      SbiParuse hibParuse = (SbiParuse)session.load(SbiParuse.class, parUse.getUseID());
      hibParuseCkId.setSbiChecks(hibChecks);
      hibParuseCkId.setSbiParuse(hibParuse);
      SbiParuseCk hibParuseCheck = new SbiParuseCk(hibParuseCkId);
      hibParuseCheck.setProg(new Integer(0));
      session.save(hibParuseCheck);
      tx.commit();
    } catch (Exception e) {
      logger.error("Error while inserting paruse and check association into export database " , e);
      throw new EMFUserError(EMFErrorSeverity.ERROR, "8005", "component_impexp_messages");
View Full Code Here

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

      Integer paruseid = (Integer) uniqueMap.get("paruseid");
      Integer checkid = (Integer) uniqueMap.get("checkid");
      hql = "from SbiParuseCk puc where puc.id.sbiChecks.checkId = " + checkid + " and puc.id.sbiParuse.useId = "
      + paruseid;
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiParuseCk hibParuseCk = (SbiParuseCk) hqlQuery.uniqueResult();
      return hibParuseCk;
    } else if (hibObj instanceof SbiObjPar) {
      Map uniqueMap = (Map) unique;
      Integer paramid = (Integer) uniqueMap.get("paramid");
      Integer biobjid = (Integer) uniqueMap.get("biobjid");
View Full Code Here

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

      hibParuse.getSbiParuseDets();
      hibParuse.setSbiParuseDets(parUseDetsToSave);

      // Recreate Relations with sbi_paruse_ck
      List newChecks = aParameterUse.getAssociatedChecks();
      SbiParuseCk hibParUseCk = null;
      SbiParuseCkId hibParUseCkId = null;

      SbiChecks tmpCheck = null;
      Set parUseCkToSave = new HashSet();
      for (int i = 0; i < newChecks.size(); i++) {
        hibParUseCkId = new SbiParuseCkId();
        hibParUseCkId.setSbiParuse(hibParuse);
        tmpCheck = (SbiChecks) aSession.load(SbiChecks.class,
            ((Check) newChecks.get(i)).getCheckId());
        hibParUseCkId.setSbiChecks(tmpCheck);
        hibParUseCk = new SbiParuseCk(hibParUseCkId);
        aSession.save(hibParUseCk);
        parUseCkToSave.add(hibParUseCk);
      }

      hibParuse.getSbiParuseCks();
View Full Code Here

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

      hibParuse.setSbiParuseDets(parUseDetsToSave);


      //       Recreate Relations with sbi_paruse_ck
      List newChecks = aParameterUse.getAssociatedChecks();
      SbiParuseCk hibParUseCk = null;
      SbiParuseCkId hibParUseCkId = null;

      SbiChecks tmpCheck = null;
      Set parUseCkToSave = new HashSet();
      for (int i=0; i < newChecks.size(); i++){
        hibParUseCkId = new SbiParuseCkId();
        hibParUseCkId.setSbiParuse(hibParuse);
        tmpCheck = (SbiChecks)aSession.load(SbiChecks.class, ((Check)newChecks.get(i)).getCheckId());
        hibParUseCkId.setSbiChecks(tmpCheck);
        hibParUseCk = new SbiParuseCk(hibParUseCkId);
        updateSbiCommonInfo4Insert(hibParUseCk);
        aSession.save(hibParUseCk);
        parUseCkToSave.add(hibParUseCk);
      }
      hibParuse.setSbiParuseCks(parUseCkToSave);
View Full Code Here

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

      aParameterUse.setIdLov(hibParUse.getSbiLov().getLovId());
    }
    aParameterUse.setManualInput(hibParUse.getManualInput());

    Set hibParUseCheks = hibParUse.getSbiParuseCks();
    SbiParuseCk aSbiParuseCk = null;
    CheckDAOHibImpl checkDAOHibImpl = new CheckDAOHibImpl();
    Check tmpCheck = null;

    List checkList = new ArrayList();
    for (Iterator itParUseCk = hibParUseCheks.iterator(); itParUseCk.hasNext();){
      aSbiParuseCk = (SbiParuseCk)itParUseCk.next();
      tmpCheck = checkDAOHibImpl.toCheck(aSbiParuseCk.getId().getSbiChecks());
      checkList.add(tmpCheck);
    }


    Set hibParUseDets = hibParUse.getSbiParuseDets();
View Full Code Here

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

          SbiParuseDet det = (SbiParuseDet) iterator2.next();
          sessionCurrDB.delete(det);
        }
        logger.debug("Delete checks");
        for (Iterator iterator2 = checks.iterator(); iterator2.hasNext();) {
          SbiParuseCk check = (SbiParuseCk) iterator2.next();
          sessionCurrDB.delete(check);
        }

        logger.debug("Delete obj Paruse used on correlation parameters");
        eraseParameterObjUseByParuseIdSameSession(sbiParuse.getUseId(), sessionCurrDB);
View Full Code Here

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

    if (newCheckid != null) {
      SbiChecks sbicheck = parusecheckid.getSbiChecks();
      SbiChecks newCheck = ImportUtilities.makeNewSbiCheck(sbicheck, newCheckid);
      newParusecheckid.setSbiChecks(newCheck);
    }
    SbiParuseCk newParuseck = new SbiParuseCk();
    newParuseck.setId(newParusecheckid);
    newParuseck.setProg(paruseck.getProg());
    logger.debug("OUT");
    return newParuseck;
  }
View Full Code Here

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

   *
   * @throws EMFUserError
   */
  private void importParuseCheck(Integer paruseOldId) throws EMFUserError {
    logger.debug("IN");
    SbiParuseCk paruseck = null;
    try {
      List exportedParuseChecks = importer.getFilteredExportedSbiObjects(sessionExpDB, "SbiParuseCk", "id.sbiParuse", paruseOldId);
      Iterator iterSbiParuseChecks = exportedParuseChecks.iterator();
      while (iterSbiParuseChecks.hasNext()) {
        paruseck = (SbiParuseCk) iterSbiParuseChecks.next();
        // get ids of exported paruse and check associzted
        Integer paruseid = paruseck.getId().getSbiParuse().getUseId();
        Integer checkid = paruseck.getId().getSbiChecks().getCheckId();
        // get association of checks and paruses
        Map paruseIdAss = metaAss.getParuseIDAssociation();
        Map checkIdAss = metaAss.getCheckIDAssociation();
        // try to get from association the id associate to the exported
        // metadata
        Integer newParuseid = (Integer) paruseIdAss.get(paruseid);
        Integer newCheckid = (Integer) checkIdAss.get(checkid);
        // build a new paruse check
        SbiParuseCk newParuseCk = ImportUtilities.makeNewSbiParuseCk(paruseck, newParuseid, newCheckid);
        // check if the association between metadata already exist
        Map unique = new HashMap();
        unique.put("paruseid", newParuseid);
        unique.put("checkid", newCheckid);
        Object existObj = importer.checkExistence(unique, sessionCurrDB, new SbiParuseCk());
        if (existObj == null) {
          sessionCurrDB.save(newParuseCk);
          metaLog.log("Inserted new association between paruse " + paruseck.getId().getSbiParuse().getName()
              + " and check " + paruseck.getId().getSbiChecks().getName());
        }
View Full Code Here

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

      for (Iterator iterator2 = dets.iterator(); iterator2.hasNext();) {
        SbiParuseDet det = (SbiParuseDet) iterator2.next();
        sessionCurrDB.delete(det);
      }
      for (Iterator iterator2 = checks.iterator(); iterator2.hasNext();) {
        SbiParuseCk check = (SbiParuseCk) iterator2.next();
        sessionCurrDB.delete(check);
      }

      sessionCurrDB.delete(sbiParuse);
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.