@Test public void testGetQueryHash() { Object result = dataFactoryCore.getQueryHash( metaData, mock( DataFactory.class ), QUERY, parameter ); assertThat( result, is( nullValue() ) ); result = dataFactoryCore.getQueryHash( metaData, element, QUERY, parameter ); assertThat( result, is( instanceOf( String[].class ) ) ); assertThat( (String[]) result, is( equalTo( FIELDS ) ) ); }
public Object getQueryHash( final DataFactoryMetaData dataFactoryMetaData, final DataFactory dataFactory, final String queryName, final DataRow parameter ) { if ( dataFactory instanceof DataFactoryMetaProvider ) { try { DataFactoryMetaProvider p = (DataFactoryMetaProvider) dataFactory; return p.getReferencedFields( queryName, parameter ); } catch ( final ReportDataFactoryException e ) { logger.info( "Unable to compute design-time data: Query Hash", e ); } } return null; }
DefaultDataFactoryCore implements DataFactoryCore { public Object getQueryHash( final DataFactoryMetaData dataFactoryMetaData, final DataFactory dataFactory, final String queryName, final DataRow parameter ) { if ( dataFactory instanceof DataFactoryMetaProvider ) { try { DataFactoryMetaProvider p = (DataFactoryMetaProvider) dataFactory; return p.getReferencedFields( queryName, parameter ); } catch ( final ReportDataFactoryException e ) { logger.info( "Unable to compute design-time data: Query Hash", e ); } } return null; } }
DefaultDataFactoryCore implements DataFactoryCore { public Object getQueryHash( final DataFactoryMetaData dataFactoryMetaData, final DataFactory dataFactory, final String queryName, final DataRow parameter ) { if ( dataFactory instanceof DataFactoryMetaProvider ) { try { DataFactoryMetaProvider p = (DataFactoryMetaProvider) dataFactory; return p.getReferencedFields( queryName, parameter ); } catch ( final ReportDataFactoryException e ) { logger.info( "Unable to compute design-time data: Query Hash", e ); } } return null; } DefaultDataFactoryCore(); }
DefaultDataFactoryCore implements DataFactoryCore { public Object getQueryHash( final DataFactoryMetaData dataFactoryMetaData, final DataFactory dataFactory, final String queryName, final DataRow parameter ) { if ( dataFactory instanceof DataFactoryMetaProvider ) { try { DataFactoryMetaProvider p = (DataFactoryMetaProvider) dataFactory; return p.getReferencedFields( queryName, parameter ); } catch ( final ReportDataFactoryException e ) { logger.info( "Unable to compute design-time data: Query Hash", e ); } } return null; } DefaultDataFactoryCore(); String[] getReferencedFields( final DataFactoryMetaData metaData, final DataFactory element,
      final String query, final DataRow parameter ); ResourceReference[] getReferencedResources( final DataFactoryMetaData metaData, final DataFactory element,
      final ResourceManager resourceManager, final String query, final DataRow parameter ); String getDisplayConnectionName( final DataFactoryMetaData metaData, final DataFactory dataFactory ); Object getQueryHash( final DataFactoryMetaData dataFactoryMetaData, final DataFactory dataFactory,
      final String queryName, final DataRow parameter ); }
DefaultDataFactoryCore implements DataFactoryCore { public Object getQueryHash( final DataFactoryMetaData dataFactoryMetaData, final DataFactory dataFactory, final String queryName, final DataRow parameter ) { if ( dataFactory instanceof DataFactoryMetaProvider ) { try { DataFactoryMetaProvider p = (DataFactoryMetaProvider) dataFactory; return p.getReferencedFields( queryName, parameter ); } catch ( final ReportDataFactoryException e ) { logger.info( "Unable to compute design-time data: Query Hash", e ); } } return null; } DefaultDataFactoryCore(); String[] getReferencedFields( final DataFactoryMetaData metaData, final DataFactory element,
      final String query, final DataRow parameter ); ResourceReference[] getReferencedResources( final DataFactoryMetaData metaData, final DataFactory element,
      final ResourceManager resourceManager, final String query, final DataRow parameter ); String getDisplayConnectionName( final DataFactoryMetaData metaData, final DataFactory dataFactory ); Object getQueryHash( final DataFactoryMetaData dataFactoryMetaData, final DataFactory dataFactory,
      final String queryName, final DataRow parameter );  }