Skip to content

Commit

Permalink
Refactor for extension use.
Browse files Browse the repository at this point in the history
Signed-off-by: sguan <sguan@actuate.com>
  • Loading branch information
sguan-actuate committed Jan 6, 2015
1 parent 4eafab7 commit 3d84c6a
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -337,8 +337,8 @@ protected IExtractionResults doRun( ) throws EngineException
protected IExtractionResults extractQuery( DataSetHandle dataset )
throws BirtException
{
QueryDefinition newQuery = constructQuery( dataset );
DataRequestSession session = executionContext.getDataEngine( ).getDTESession( );
QueryDefinition newQuery = constructQuery( dataset, session );
ModelDteApiAdapter apiAdapter = new ModelDteApiAdapter(
executionContext );
apiAdapter.defineDataSet( dataset, session );
Expand All @@ -361,11 +361,16 @@ protected ModuleHandle getModuleHandle( )
return dataset.getModuleHandle( );
}

protected QueryDefinition constructQuery( DataSetHandle dataset )
throws DataException
protected QueryDefinition constructQuery( DataSetHandle dataset, DataRequestSession session )
throws BirtException
{
if ( this.query != null )
return this.query;
if ( dataset
.getCachedMetaDataHandle( ) == null )
{
session.refreshMetaData( dataset );
}
QueryDefinition query = new QueryDefinition( );
query.setDataSetName( dataset.getQualifiedName( ) );
Set<String> existBindings = new HashSet<String>( );
Expand Down

0 comments on commit 3d84c6a

Please sign in to comment.