| author | xwu | 2012-06-14 05:50:49 (EDT) |
|---|---|---|
| committer | mwu | 2012-06-14 05:50:49 (EDT) |
| commit | 92ceae237eb12fcaf3d61484a15675fb9892a9c9 (patch) (side-by-side diff) | |
| tree | 231c1f1a3c29f5f4df0a2f181ac43416111f429f | |
| parent | e5e05a6643c99651d87e6b35334e796617d3fe2a (diff) | |
| download | org.eclipse.birt-92ceae237eb12fcaf3d61484a15675fb9892a9c9.zip org.eclipse.birt-92ceae237eb12fcaf3d61484a15675fb9892a9c9.tar.gz org.eclipse.birt-92ceae237eb12fcaf3d61484a15675fb9892a9c9.tar.bz2 | |
- Summary:
Fix an issue Data Set Editor's Max Rows Preference should have been
passed to ODA Driver[48508].
- Bug (s) Resolved:
48508
Description:.
When the fetching rows limit in the data set settings page is set to
default, say no limit is set, then we pass the value of maximum rows to
display to ODA driver.
- Code Reviewer:
Bin Feng
- Tests Description:
- Notes to Build Team:
N/A
- Notes to Developers:
N/A
- Notes to QA:
N/A
- Notes to Documentation
| -rw-r--r-- | data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java index 74d6391..f76acbf 100644 --- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java +++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java @@ -290,7 +290,16 @@ public class DataSourceQuery extends BaseQuery implements IDataSourceQuery, IPre addParameterDefns(); //Here the "max rows" means the max number of rows that can fetch from data source. - odaStatement.setMaxRows( this.getRowFetchLimit( ) ); + int maxRows = this.getRowFetchLimit( ); + if ( maxRows <= 0 ) + { + if ( this.getQueryDefinition( ) instanceof IQueryDefinition ) + { + IQueryDefinition qd = (IQueryDefinition) this.getQueryDefinition( ); + maxRows = qd.getMaxRows( ); + } + } + odaStatement.setMaxRows( maxRows ); IOdaDataSetDesign design = null; if( session.getDataSetCacheManager( ).getCurrentDataSetDesign( ) instanceof IOdaDataSetDesign ) @@ -883,6 +892,7 @@ public class DataSourceQuery extends BaseQuery implements IDataSourceQuery, IPre IOdaDataSetDesign design = null; if( session.getDataSetCacheManager( ).getCurrentDataSetDesign( ) instanceof IOdaDataSetDesign ) design = (IOdaDataSetDesign)session.getDataSetCacheManager( ).getCurrentDataSetDesign( ); + if ( session.getDataSetCacheManager( ).doesSaveToCache( ) ) { @@ -900,6 +910,19 @@ public class DataSourceQuery extends BaseQuery implements IDataSourceQuery, IPre cacheCountConfig = session.getDataSetCacheManager( ) .getCacheCountConfig( ); } + + if( fetchRowLimit <= 0 ) + { + int displayMaxRows = -1; + if( this.getQueryDefinition( ) instanceof IQueryDefinition ) + { + IQueryDefinition qd = (IQueryDefinition) this.getQueryDefinition( ); + displayMaxRows = qd.getMaxRows(); + } + + fetchRowLimit = displayMaxRows; + } + if ( cacheCountConfig > 0 ) { if ( fetchRowLimit != 0 && fetchRowLimit < cacheCountConfig ) |

