Package it.eng.spagobi.behaviouralmodel.analyticaldriver.bo

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.bo.ParameterUse


 
  private void lookupReturnBackHandler (SourceBean request, SourceBean response) throws SourceBeanException, EMFUserError {
    RequestContainer requestContainer = this.getRequestContainer();
    SessionContainer session = requestContainer.getSessionContainer();
    Parameter parameter = (Parameter) session.getAttribute("LookupParameter");
    ParameterUse paruse = (ParameterUse) session.getAttribute("LookupParuse");
    String modality = (String) session.getAttribute("modality");
    prepareParameterDetailPage(response, parameter, paruse, paruse.getUseID().toString(), modality, false, false);
    session.delAttribute("LookupParameter");
    session.delAttribute("LookupParUse");
    session.delAttribute("modality");
  }
View Full Code Here


        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
        // object it's an error
View Full Code Here

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

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

   * @param hibParUse The hybernate parameter use mode
   *
   * @return The corrispondent <code>ParameterUse</code> object
   */
  public ParameterUse toParameterUse(SbiParuse hibParUse){
    ParameterUse aParameterUse = new ParameterUse();
    fillParameterUse(aParameterUse, hibParUse);
    return aParameterUse;
  }
View Full Code Here

    List parUseList = null;
    IParameterUseDAO parUseDAO = DAOFactory.getParameterUseDAO();
    parUseList = parUseDAO.loadParametersUseByParId(parId);
    Iterator i = parUseList.iterator();
    while (i.hasNext()){
      ParameterUse parUse = (ParameterUse) i.next();
      parUseDAO.eraseParameterUse(parUse);
    }
  }
View Full Code Here

      for (Iterator iterator = parUseList.iterator(); iterator.hasNext();) {

        aSession = getSession();
        tx = aSession.beginTransaction();
        Object o =  iterator.next();
        ParameterUse parameterUse = (ParameterUse) o;
        SbiParuse sbiParuse = (SbiParuse)aSession.load(SbiParuse.class, parameterUse.getUseID());

        Set checks = sbiParuse.getSbiParuseCks();
        Set dets =  sbiParuse.getSbiParuseDets();

        logger.debug("Delete details");
View Full Code Here

      List genParParuses = DAOFactory.getParameterUseDAO().loadParametersUseByParId(genParamId);
      // exclude form all the paruses the manual input ones 
      List paruses = new ArrayList();
      Iterator allParusesIt = genParParuses.iterator();
      while (allParusesIt.hasNext()) {
        ParameterUse paruse = (ParameterUse) allParusesIt.next();
        if(paruse.getManualInput().intValue() == 0) {
          paruses.add(paruse);
        }
      }
      // fill spago response
      response.setAttribute("biParameter", objParameter);
View Full Code Here

     
      visible = biparam.getVisible() == 1;
     
      ExecutionInstance executionInstance =  getContext().getExecutionInstance( ExecutionInstance.class.getName() );
     
      ParameterUse biParameterExecModality;
      try {
        // load parameter use ...
        IParameterUseDAO parusedao = DAOFactory.getParameterUseDAO();
        biParameterExecModality = parusedao.loadByParameterIdandRole(biparam.getParID(), executionInstance.getExecutionRole());
      } catch (Exception e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Impossible to find any valid execution modality for parameter [" + id + "] and role [" + executionInstance.getExecutionRole() + "]", e);
      }
     
      Assert.assertNotNull(biParameterExecModality, "Impossible to find any valid execution modality for parameter [" + id + "] and role [" + executionInstance.getExecutionRole() + "]" );
     
      parameterUseId = biParameterExecModality.getUseID();
     
      List biParameterExecDependencies;
      try {
        IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
        biParameterExecDependencies = objParuseDAO.loadObjParuse(biparam.getId(), biParameterExecModality.getUseID());
      } catch (EMFUserError e) {
        throw new SpagoBIServiceException("An error occurred while loading parameter dependecies for parameter [" + id + "]", e);
      }
     
      dependencies = new ArrayList();
View Full Code Here

        for (int i = 0; i < rows.size(); i++) {
          paginator.addRow(rows.get(i));
        }
        // filters for correlations
        IParameterUseDAO parusedao = DAOFactory.getParameterUseDAO();
        ParameterUse paruse = parusedao.loadByParameterIdandRole(currbiObjPar.getParID(), roleName);
        list = SelectParametersLookupModule.filterListForParametersCorrelation(paruse, request, list, new HashMap(), errorHandler);
        // gets SourceBean from filtered list
        toReturn = list.getPaginator().getAll();
      }
    }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.behaviouralmodel.analyticaldriver.bo.ParameterUse

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.