Examples of SbiParuse


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

      Query hibQuery = session.createQuery(" from SbiParuse where useId = " + parUse.getUseID());
      List hibList = hibQuery.list();
      if(!hibList.isEmpty()) {
        return;
      }
      SbiParuse hibParuse = new SbiParuse(parUse.getUseID());
      // Set the relation with parameter
      SbiParameters hibParameters = (SbiParameters)session.load(SbiParameters.class, parUse.getId());
      hibParuse.setSbiParameters(hibParameters);
      // Set the relation with idLov (if the parameter ha a lov related)
      Integer lovId = parUse.getIdLov();
      if(lovId!=null){
        SbiLov hibLov = (SbiLov)session.load(SbiLov.class, parUse.getIdLov());
        hibParuse.setSbiLov(hibLov);
      }
      hibParuse.setLabel(parUse.getLabel());
      hibParuse.setName(parUse.getName());
      hibParuse.setDescr(parUse.getDescription());
      hibParuse.setManualInput(parUse.getManualInput());
      hibParuse.setSelectionType(parUse.getSelectionType());
      hibParuse.setMultivalue(parUse.isMultivalue()? new Integer(1): new Integer(0));
      session.save(hibParuse);
      tx.commit();
    } catch (Exception e) {
      logger.error("Error while inserting parameter use 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.SbiParuse

            continue;
          }
          // built key
          SbiObjParuseId hibObjParuseId = new SbiObjParuseId();
          SbiObjPar hibObjPar = (SbiObjPar)session.load(SbiObjPar.class, objparuse.getObjParId());
          SbiParuse hibParuse = (SbiParuse)session.load(SbiParuse.class, objparuse.getParuseId());
          SbiObjPar objparfather = (SbiObjPar)session.load(SbiObjPar.class, objparuse.getObjParFatherId());
          hibObjParuseId.setSbiObjPar(hibObjPar);
          hibObjParuseId.setSbiParuse(hibParuse);
          hibObjParuseId.setFilterOperation(objparuse.getFilterOperation());
          hibObjParuseId.setSbiObjParFather(objparfather);
View Full Code Here

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

        return;
      }
      // built key
      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);
View Full Code Here

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

      if(!hibList.isEmpty()) {
        return;
      }
      // built key
      SbiParuseDetId hibParuseDetId = new SbiParuseDetId();
      SbiParuse hibParuse = (SbiParuse)session.load(SbiParuse.class, parUse.getUseID());
      SbiExtRoles hibExtRole = (SbiExtRoles)session.load(SbiExtRoles.class, role.getId());
      hibParuseDetId.setSbiExtRoles(hibExtRole);
      hibParuseDetId.setSbiParuse(hibParuse);
      SbiParuseDet hibParuseDet = new SbiParuseDet(hibParuseDetId);
      session.save(hibParuseDet);
View Full Code Here

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

      Map uniqueMap = (Map) unique;
      String label = (String) uniqueMap.get("label");
      Integer parid = (Integer) uniqueMap.get("idpar");
      hql = "from SbiParuse pu where pu.label='" + label + "' and pu.sbiParameters.parId = " + parid;
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiParuse hibParuse = (SbiParuse) hqlQuery.uniqueResult();
      return hibParuse;
    } else if (hibObj instanceof SbiFuncRole) {
      Map uniqueMap = (Map) unique;
      Integer stateid = (Integer) uniqueMap.get("stateid");
      Integer roleid = (Integer) uniqueMap.get("roleid");
View Full Code Here

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

      }
      // 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.");
View Full Code Here

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

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      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.");
View Full Code Here

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

     
     
      List parUseAssociated = new ArrayList();
      Iterator parusesIter = paruses.iterator();
      while(parusesIter.hasNext()) {
        SbiParuse hibParuse = (SbiParuse)parusesIter.next();
        Iterator paruseDetsIter = hibParuse.getSbiParuseDets().iterator();
       
       
        while(paruseDetsIter.hasNext()){
          SbiParuseDet hibParuseDet = (SbiParuseDet)paruseDetsIter.next();
          if (hibParuseDet.getId().getSbiExtRoles().getExtRoleId().equals(role.getId())){
            parUseAssociated.add(hibParuse);
          }
        }
      }
   
     
      if(parUseAssociated.size() == 1) {
        SbiParuse hibParuse = (SbiParuse)parUseAssociated.get(0);
        SbiLov sbiLov = hibParuse.getSbiLov();
       
        //if modval is null, then the parameter always has a man_in modality
        //force the man_in modality to the parameter
        Integer man_in = hibParuse.getManualInput();
        //Integer sbiLovId = sbiLov.getLovId();
        if(man_in.intValue() == 1){
          ModalitiesValue manInModVal = new ModalitiesValue();
          manInModVal.setITypeCd("MAN_IN");
          manInModVal.setITypeId("37");
          parameter.setModalityValue(manInModVal);
         
        }else{
        ModalitiesValue modVal  = DAOFactory.getModalitiesValueDAO().loadModalitiesValueByID(hibParuse.getSbiLov().getLovId());
        modVal.setSelectionType(hibParuse.getSelectionType());
        modVal.setMultivalue(hibParuse.getMultivalue() != null && hibParuse.getMultivalue().intValue() > 0);
        parameter.setModalityValue(modVal);
        }
        ParameterUse aParameterUse = DAOFactory.getParameterUseDAO().loadByUseID(hibParuse.getUseId());
        parameter.setChecks(aParameterUse.getAssociatedChecks())
      } else {
        // this part of code wouldn't never be executed because one role can have only one parameteruse
        // for each parameter. The control is executed before the load of the object so
        // the list would have to contain only one element but if the list contains more than one
View Full Code Here

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

   * @throws EMFUserError the EMF user error
   *
   * @see it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IParameterUseDAO#loadById(java.lang.Integer)
   */
  public SbiParuse loadById(Integer id) throws EMFUserError {
    SbiParuse toReturn = null;
    Session aSession = null;
    Transaction tx = null;
    try{
      aSession = getSession();
      tx = aSession.beginTransaction();
View Full Code Here

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

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


      SbiParuse hibParuse = (SbiParuse)aSession.load(SbiParuse.class,  useID);

      toReturn = toParameterUse(hibParuse);
      tx.commit();

    }catch(HibernateException he){
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.