Package org.pentaho.metadata.model

Examples of org.pentaho.metadata.model.SqlPhysicalModel


    final List<LogicalTable> tables = queryObject.getLogicalModel().getLogicalTables();
    if (tables.isEmpty())
    {
      throw new ReportDataFactoryException("No Tables in this query");
    }
    final SqlPhysicalModel sqlModel = (SqlPhysicalModel) tables.get(0).getPhysicalTable().getPhysicalModel();
    return ThinModelConverter.convertToLegacy(sqlModel.getId(), sqlModel.getDatasource());
  }
View Full Code Here


    final List<LogicalTable> tables = queryObject.getLogicalModel().getLogicalTables();
    if (tables.isEmpty())
    {
      throw new ReportDataFactoryException("No Tables in this query");
    }
    final SqlPhysicalModel sqlModel = (SqlPhysicalModel) tables.get(0).getPhysicalTable().getPhysicalModel();
    return ThinModelConverter.convertToLegacy(sqlModel.getId(), sqlModel.getDatasource());
  }
View Full Code Here

    return domain;
  }

  public Domain getBasicDomain() {

    SqlPhysicalModel model = new SqlPhysicalModel();
    SqlDataSource dataSource = new SqlDataSource();
    dataSource.setDatabaseName( "SampleData" );
    dataSource.setDialectType( "HYPERSONIC" );
    dataSource.setType( DataSourceType.JNDI );

    model.setDatasource( dataSource );
    SqlPhysicalTable table = new SqlPhysicalTable( model );
    table.setId( "PT1" );
    model.getPhysicalTables().add( table );
    table.setTargetTableType( TargetTableType.INLINE_SQL );
    table.setTargetTable( "select distinct customername, salesrepemployeenumber from customers" );

    SqlPhysicalColumn column = new SqlPhysicalColumn( table );
    column.setId( "PC1" );
View Full Code Here

  }

  public IPentahoResultSet executeQuery( Query queryObject ) {

    // need to get the correct DatabaseMeta
    SqlPhysicalModel sqlModel = (SqlPhysicalModel) queryObject.getLogicalModel().getPhysicalModel();
    DatabaseMeta databaseMeta = ThinModelConverter.convertToLegacy( sqlModel.getId(), sqlModel.getDatasource() );
    // this connection needs closed
    boolean closeConnection = true;

    DatabaseMeta activeDatabaseMeta = getActiveDatabaseMeta( databaseMeta );
    SQLConnection sqlConnection = getConnection( activeDatabaseMeta );
View Full Code Here

TOP

Related Classes of org.pentaho.metadata.model.SqlPhysicalModel

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.