Examples of IObjParuseDAO


Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

        dao.insertModalitiesValue(modVal);
      } else {
        // looks for dependencies associated to the previous lov
        Integer lovId = modVal.getId();
        ModalitiesValue initialLov = DAOFactory.getModalitiesValueDAO().loadModalitiesValueByID(lovId);
        IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
        IParameterUseDAO paruseDAO = DAOFactory.getParameterUseDAO();
        List paruses = paruseDAO.getParameterUsesAssociatedToLov(lovId);
        Iterator parusesIt = paruses.iterator();
        List documents = new ArrayList();
        List correlations = new ArrayList();
        while (parusesIt.hasNext()) {
          ParameterUse aParuse = (ParameterUse) parusesIt.next();
          documents.addAll(objParuseDAO.getDocumentLabelsListWithAssociatedDependencies(aParuse.getUseID()));
          correlations.addAll(objParuseDAO.getAllDependenciesForParameterUse(aParuse.getUseID()));
        }
        // if the document list is not empty means that the lov is in correlation in some documents
        if (documents.size() > 0) {
          if (!initialLov.getITypeCd().equals(modVal.getITypeCd())) {
            // the lov type was changed
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

    logger.debug("IN");
    try {
      Iterator iterBIParams = biparams.iterator();
      while(iterBIParams.hasNext()) {
        BIObjectParameter biparam = (BIObjectParameter)iterBIParams.next();         
        IObjParuseDAO objparuseDao = DAOFactory.getObjParuseDAO();
        List objparlist = objparuseDao.loadObjParuses(biparam.getId());
        Iterator iterObjParuse = objparlist.iterator();
        while(iterObjParuse.hasNext()) {
          ObjParuse objparuse = (ObjParuse)iterObjParuse.next();
          Transaction tx = session.beginTransaction();
          // TODO controllare perch� serve questo controllo: le dipendenze non dovrebbero essere riutilizzabili, per
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

    Integer paruseIdInt = paruse.getUseID();
    if (paruseIdInt == null || paruseIdInt.intValue() == -1) {
      // it means that the ParameterUse in input must be inserted, not modified
      return;
    }
    IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
    IParameterUseDAO paruseDAO = DAOFactory.getParameterUseDAO();
    ParameterUse initialParuse = paruseDAO.loadByUseID(paruseIdInt);
    List documents = objParuseDAO.getDocumentLabelsListWithAssociatedDependencies(paruseIdInt);
    if (documents.size() > 0) {
      // there are some correlations
      if (paruse.getManualInput().intValue() == 1 ||
          paruse.getIdLov().intValue() != initialParuse.getIdLov().intValue()) {
        // the ParameterUse was changed to manual input or the lov id was changed
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

   * @param objParFatherId The id of the BIObjectParameter object to check
   * @throws EMFUserError
   */
  private void checkForDependancies(Integer paruseId) throws EMFUserError {
   
    IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
    List objectsLabels = objParuseDAO.getDocumentLabelsListWithAssociatedDependencies(paruseId);
    if (objectsLabels != null && objectsLabels.size() > 0) {
      HashMap params = new HashMap();
      params.put(AdmintoolsConstants.PAGE,
          DetailParameterModule.MODULE_PAGE);
      Vector v = new Vector();
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

   * @param objParFatherId The id of the BIObjectParameter object to check
   * @throws EMFUserError
   */
  public static EMFValidationError checkForDependancies(Integer objParFatherId) throws EMFUserError {
    EMFValidationError error = null;
    IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
    List objParametersCorrelated = objParuseDAO.getDependencies(objParFatherId);
    if (objParametersCorrelated != null && objParametersCorrelated.size() > 0) {
      HashMap params = new HashMap();
      params.put(AdmintoolsConstants.PAGE,
          DetailBIObjectModule.MODULE_PAGE);
      Vector v = new Vector();
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

    if (objParId == null || objParId.intValue() == -1) {
      // it means that the BIObjectParameter in input must be inserted, not modified
      return;
    }
    // Controls that, if the are some dependencies for the BIObjectParameter, the associated parameter was not changed
    IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
    List correlations = objParuseDAO.loadObjParuses(objParId);
    if (correlations != null && correlations.size() > 0) {
      IBIObjectParameterDAO objParDAO = DAOFactory.getBIObjectParameterDAO();
      BIObjectParameter initialObjPar = objParDAO.loadForDetailByObjParId(objParId);
      if (initialObjPar.getParID().intValue() != objPar.getParID().intValue()) {
        // the ParameterUse was changed to manual input or the lov id was changed
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

 
  private void updateDatabase(List oldCorrelations, List newCorrelations ) throws EMFUserError {
    //TODO all this operations must be performed inside a transaction
    SessionContainer permSess = getRequestContainer().getSessionContainer().getPermanentContainer();
    IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);   
    IObjParuseDAO corrDao = DAOFactory.getObjParuseDAO();
    corrDao.setUserProfile(profile);
    Iterator iterOldCorr = oldCorrelations.iterator();
    while(iterOldCorr.hasNext()) {
      ObjParuse oldCorr = (ObjParuse)iterOldCorr.next();
      corrDao.eraseObjParuse(oldCorr);
    }
    Iterator iterNewCorr = newCorrelations.iterator();
    while(iterNewCorr.hasNext()) {
      ObjParuse newCorr = (ObjParuse)iterNewCorr.next();
      corrDao.insertObjParuse(newCorr);
    }
  }
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

     
      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

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

  public List<ObjParuse> getDependencies(BIObjectParameter parameter) {
    List<ObjParuse> biParameterExecDependencies = new ArrayList<ObjParuse>();
    try {
      IParameterUseDAO parusedao = DAOFactory.getParameterUseDAO();
      ParameterUse biParameterExecModality = parusedao.loadByParameterIdandRole(parameter.getParID(), executionRole);
      IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
      biParameterExecDependencies.addAll(objParuseDAO.loadObjParuse(parameter.getId(), biParameterExecModality.getUseID()));
    } catch (Exception e) {
      throw new SpagoBIRuntimeException("Impossible to get dependencies", e);
    }
    return biParameterExecDependencies;
  }
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.analyticaldriver.dao.IObjParuseDAO

//      objParIdStr = (String)getSession(request).getAttribute("LOOKUP_PARAMETER_ID");
    Integer objParId = Integer.valueOf(objParIdStr);
    // get the id of the paruse correlated
    Integer correlatedParuseId = Integer.valueOf((String) request.getAttribute("correlated_paruse_id"));
    // get dao of objparuse (correlation)
    IObjParuseDAO objParuseDAO = DAOFactory.getObjParuseDAO();
    // get all the objparuse associated to the parameter and paruse
    List ops = objParuseDAO.loadObjParuse(objParId, correlatedParuseId);
    if( (ops!=null) && (ops.size()!=0) ) {
      if(ops.size()==1) {
        ObjParuse objpuse = (ObjParuse)ops.get(0);
        list = filterForCorrelation(list, objpuse, obj);
      } else if (ops.size()==2) {
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.