Examples of SbiDataSetConfig


Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

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

      SbiDataSetConfig hibDataSet = (SbiDataSetConfig) aSession.load(SbiDataSetConfig.class,dsID);
      aSession.delete(hibDataSet);

      tx.commit();     
    catch (ConstraintViolationException cve) {
      if (tx != null && tx.isActive()) {
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

            logger.error("The Domain with value_id= "+dataSetActiveDetail.getCategoryId()+" does not exist.");
            throw new EMFUserError(EMFErrorSeverity.ERROR, 1035);
          }
        }
        Date currentTStamp = new Date();
        SbiDataSetConfig dsConfig = new SbiDataSetConfig();     
        dsConfig.setLabel(dataSet.getLabel());
        dsConfig.setDescription(dataSet.getDescription());
        dsConfig.setName(dataSet.getName())
        updateSbiCommonInfo4Insert(dsConfig);

        String userIn = dsConfig.getCommonInfo().getUserIn();
        String sbiVersionIn = dsConfig.getCommonInfo().getSbiVersionIn();
        hibDataSet.setUserIn(userIn);
        hibDataSet.setSbiVersionIn(sbiVersionIn);   
        hibDataSet.setVersionNum(1);
        hibDataSet.setTimeIn(currentTStamp)
       
        hibDataSet.setActive(true);     

        hibDataSet.setTransformer(transformer);
        hibDataSet.setPivotColumnName(dataSetActiveDetail.getPivotColumnName());
        hibDataSet.setPivotRowName(dataSetActiveDetail.getPivotRowName());
        hibDataSet.setPivotColumnValue(dataSetActiveDetail.getPivotColumnValue());
        hibDataSet.setNumRows(dataSetActiveDetail.isNumRows());

        hibDataSet.setCategory(category);
        hibDataSet.setParameters(dataSetActiveDetail.getParameters());
        hibDataSet.setDsMetadata(dataSetActiveDetail.getDsMetadata());

        Integer dsId =(Integer) aSession.save(dsConfig);
        dsConfig.setDsId(dsId);
        hibDataSet.setSbiDsConfig(dsConfig);

        aSession.save(hibDataSet);

        idToReturn = dsId;
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

        hibernateQuery.setInteger(1, dsId)
        SbiDataSetHistory dsDetail =(SbiDataSetHistory)hibernateQuery.uniqueResult();
        dsDetail.setActive(true);
       
        if(dsActiveDetail.getSbiDsConfig()!=null){
          SbiDataSetConfig hibDs = dsActiveDetail.getSbiDsConfig();
          updateSbiCommonInfo4Update(hibDs);
          aSession.update(hibDs);
        }
       
        if(dsDetail.getSbiDsConfig()!=null){
          SbiDataSetConfig hibDs = dsDetail.getSbiDsConfig();
          updateSbiCommonInfo4Update(hibDs);
          aSession.update(hibDs);
        }

        aSession.update(dsActiveDetail);
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

        hibDataSet.setCategory(category);
        hibDataSet.setParameters(dsActiveDetailToSet.getParameters());
        hibDataSet.setDsMetadata(dsActiveDetailToSet.getDsMetadata());

        SbiDataSetConfig hibGenericDataSet = (SbiDataSetConfig) aSession.load(SbiDataSetConfig.class,dsId);         
        hibGenericDataSet.setLabel(dataSet.getLabel());
        hibGenericDataSet.setDescription(dataSet.getDescription());
        hibGenericDataSet.setName(dataSet.getName())
       
        updateSbiCommonInfo4Update(hibGenericDataSet);

        String userUp = hibGenericDataSet.getCommonInfo().getUserUp();
        String sbiVersionUp = hibGenericDataSet.getCommonInfo().getSbiVersionUp();
        hibDataSet.setUserIn(userUp);
        hibDataSet.setSbiVersionIn(sbiVersionUp)
        hibDataSet.setTimeIn(currentTStamp);

        Integer currenthigherVersion = getHigherVersionNumForDS(dsId);
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

      aSession = getSession();
      tx = aSession.beginTransaction();
      Criterion labelCriterrion = Expression.eq("label", label);
      Criteria criteria = aSession.createCriteria(SbiDataSetConfig.class);
      criteria.add(labelCriterrion)
      SbiDataSetConfig hibDS = (SbiDataSetConfig) criteria.uniqueResult();
      if (hibDS == null) return null;

      Integer dsId = hibDS.getDsId();

      Query hibQuery = aSession.createQuery("from SbiDataSetHistory h where h.active = ? and h.sbiDsConfig = ?" );
      hibQuery.setBoolean(0, true);
      hibQuery.setInteger(1, dsId)
      SbiDataSetHistory dsActiveDetail =(SbiDataSetHistory)hibQuery.uniqueResult();
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

      }
      // reading exist datasource
      SbiDataSource localDS = getAssociatedSbiDataSource(exportedObj, sessionCurrDB, metaAss);
      if (localDS != null) obj.setDataSource(localDS);
      // reading exist datasset
      SbiDataSetConfig localDataSet = getAssociatedSbiDataSet(exportedObj, sessionCurrDB, metaAss);
      if (localDataSet != null) obj.setDataSet(localDataSet);
    } finally {
      logger.debug("OUT");
    }
  }
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

  private static SbiDataSetConfig getAssociatedSbiDataSet(
      SbiObjects exportedObj, Session sessionCurrDB,
      MetadataAssociations metaAss) {
    logger.debug("IN");
    SbiDataSetConfig expDataset = exportedObj.getDataSet();
    if (expDataset != null) {
      Integer existingDatasetId = (Integer) metaAss.getDataSetIDAssociation().get(new Integer(expDataset.getDsId()));
      SbiDataSetConfig localDS = (SbiDataSetConfig) sessionCurrDB.load(SbiDataSetConfig.class, existingDatasetId);
      logger.debug("OUT");
      return localDS;
    } else {
      logger.debug("OUT");
      return null;
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

   *
   * @return the sbi data set
   */
  public static SbiDataSetConfig makeNewSbiDataSet(SbiDataSetConfig dataset, SessionContainer session){
    logger.debug("IN");
    SbiDataSetConfig newDsConfig = new SbiDataSetConfig();

    newDsConfig.setLabel(dataset.getLabel());
    newDsConfig.setName(dataset.getName());
    newDsConfig.setDescription(dataset.getDescription());
    SbiCommonInfo i = new SbiCommonInfo();
    IEngUserProfile profile = (IEngUserProfile)session.getPermanentContainer().getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    String userid = "biadmin";
    if(profile!=null){
      userid =(String) profile.getUserUniqueIdentifier();
    }
    i.setTimeIn(new Date());
    i.setUserIn(userid);
    i.setSbiVersionIn(SbiCommonInfo.SBI_VERSION);
    newDsConfig.setCommonInfo(i);

    logger.debug("OUT");
    return newDsConfig;
 
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

   *
   * @throws EMFUserError    */
  public static SbiDataSetConfig modifyExistingSbiDataSet(SbiDataSetConfig exportedDataset,
      Session sessionCurrDB, Integer existingId, Session sessionExpDB, SessionContainer session) {
    logger.debug("IN");
    SbiDataSetConfig existingDataset = null;
    try {
      existingDataset = (SbiDataSetConfig) sessionCurrDB.load(SbiDataSetConfig.class, existingId);
      existingDataset.setLabel(exportedDataset.getLabel());
      existingDataset.setName(exportedDataset.getName());     
      existingDataset.setDescription(exportedDataset.getDescription());
      existingDataset.setLabel(exportedDataset.getLabel());
      existingDataset.setName(exportedDataset.getName());     
      existingDataset.setDescription(exportedDataset.getDescription());
      SbiCommonInfo i = new SbiCommonInfo();
      IEngUserProfile profile = (IEngUserProfile)session.getPermanentContainer().getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      String userid = "biadmin";
      if(profile!=null){
        userid =(String) profile.getUserUniqueIdentifier();
      }
      i.setTimeIn(new Date());
      i.setUserIn(userid);
      i.setSbiVersionIn(SbiCommonInfo.SBI_VERSION);
      existingDataset.setCommonInfo(i);


      // Make precedent active inactive, new one will be active
      Query hibQueryPreActive = sessionCurrDB.createQuery("from SbiDataSetHistory h where h.active = ? and h.sbiDsConfig = ?" );
      hibQueryPreActive.setBoolean(0, true);
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.metadata.SbiDataSetConfig

      if(newDataSetId==null) {
        logger.error("could not find dataset "+exportedKpi.getSbiDataSet().getLabel());
        existingKpi.setSbiDataSet(null);
      }
      else{
        SbiDataSetConfig newSbiDataset = (SbiDataSetConfig) sessionCurrDB.load(SbiDataSetConfig.class, newDataSetId);
        existingKpi.setSbiDataSet(newSbiDataset);
      }
    }
    else{
      existingKpi.setSbiDataSet(null);
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.