Package it.eng.spagobi.tools.dataset.bo

Examples of it.eng.spagobi.tools.dataset.bo.JDBCDataSet.loadData()


        logger.debug("Executable query for user [" + userProfile.getUserId() + "] (SQL): [" + inlineSQLQuery + "]");
        auditlogger.info("[" + userProfile.getUserId() + "]:: SQL: " + inlineSQLQuery);
        JDBCDataSet dataSet = new JDBCDataSet();
        dataSet.setDataSource(dataSource);
        dataSet.setQuery(inlineSQLQuery);
        dataSet.loadData();
        dataStore = (DataStore) dataSet.getDataStore();
      } else {
        logger.debug("Using temporary table strategy....");
   
        logger.debug("Temporary table definition for user [" + userProfile.getUserId() + "] (SQL): [" + sqlQuery + "]");
View Full Code Here


    sqlStatement = sqlStatement.substring(0, beginIndex) + tableName + sqlStatement.substring(endIndex);
    logger.debug("SQL statement is [" + sqlStatement + "]");
    JDBCDataSet dataSet = new JDBCDataSet();
    dataSet.setDataSource(dataSource);
    dataSet.setQuery(sqlStatement);
    dataSet.loadData();
    DataStore dataStore = (DataStore) dataSet.getDataStore();
    logger.debug("Data store retrieved successfully");
    logger.debug("OUT");
    return dataStore;
   
View Full Code Here

        dataSource.setDriver(connection.getDriverClass());
        dataSource.setUser(connection.getUsername());
        dataSource.setPwd(connection.getPassword());
        dataSet.setDataSource(dataSource);
        dataSet.setQuery(sqlQuery);
        dataSet.loadData(start, limit, -1);
        dataStore = dataSet.getDataStore();
      } catch (Exception e) {
        logger.debug("Query execution aborted because of an internal exceptian");
        SpagoBIEngineServiceException exception;
        String message;
View Full Code Here

            IDataSource datasource = (IDataSource) this.getEnv().get( EngineConstants.ENV_DATASOURCE );
            dataset.setDataSource(datasource);
            dataset.setUserProfileAttributes(UserProfileUtils.getProfileAttributes( (UserProfile) this.getEnv().get(EngineConstants.ENV_USER_PROFILE)));
            dataset.setQuery(sqlQuery);
            logger.debug("Executing query ...");
            dataset.loadData();
            dataStore = dataset.getDataStore();
          }
         
          Exporter exp = new Exporter(dataStore);
          exp.setExtractedFields(extractedFields);
View Full Code Here

        dataSource.setDriver(connection.getDriverClass());
        dataSource.setUser(connection.getUsername());
        dataSource.setPwd(connection.getPassword());
        dataSet.setDataSource(dataSource);
        dataSet.setQuery(sqlQuery);
        dataSet.loadData(start, limit, -1);
        dataStore = dataSet.getDataStore();
        IDataStoreMetaData dataStoreMetadata = dataStore.getMetaData();
        for(int i = 0; i < dataStoreMetadata.getFieldCount(); i++) {
          ISelectField queryField = (ISelectField)queryFields.get(i);
          dataStoreMetadata.changeFieldAlias(i, queryField.getAlias());
View Full Code Here

    logger.debug("Executing query " + sqlQuery + " ...");
    JDBCDataSet dataSet = new JDBCDataSet();
    JDBCSharedConnectionDataProxy proxy = new JDBCSharedConnectionDataProxy(session.connection());
    dataSet.setDataProxy(proxy);
    dataSet.setQuery(sqlQuery);
    dataSet.loadData(0, 1, -1);
    logger.debug("Query " + sqlQuery + " executed");
    IDataStore dataStore = dataSet.getDataStore();
    logger.debug("Data store retrieved");
    resultNumber = ((Number)dataStore.getRecordAt(0).getFieldAt(0).getValue()).intValue();
    logger.debug("Result number is " + resultNumber);
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.