summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlzhang2012-02-16 04:19:35 (EST)
committer mwu2012-02-16 04:19:35 (EST)
commit3cabcfa7c1f87bef93b5f1ad6619d168a2e7a072 (patch)
treec20146425fbd7d1c30250099d15d4f165f66bb11
parent48de6533c649b455256fa85f5569f0f100adf40f (diff)
downloadorg.eclipse.birt-3cabcfa7c1f87bef93b5f1ad6619d168a2e7a072.zip
org.eclipse.birt-3cabcfa7c1f87bef93b5f1ad6619d168a2e7a072.tar.gz
org.eclipse.birt-3cabcfa7c1f87bef93b5f1ad6619d168a2e7a072.tar.bz2
Exception is thrown out when preview report if add Top/Buttom N filter
in cube [47438]
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/CubeCreationQueryDefinition.java24
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQueryUtil.java9
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java9
3 files changed, 1 insertions, 41 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/CubeCreationQueryDefinition.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/CubeCreationQueryDefinition.java
index 7d68cb8..41e1da6 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/CubeCreationQueryDefinition.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/CubeCreationQueryDefinition.java
@@ -11,10 +11,6 @@
*******************************************************************************/
package org.eclipse.birt.data.engine.impl;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.birt.data.engine.api.IFilterDefinition;
import org.eclipse.birt.data.engine.api.querydefn.QueryDefinition;
@@ -25,24 +21,4 @@ import org.eclipse.birt.data.engine.api.querydefn.QueryDefinition;
public class CubeCreationQueryDefinition extends QueryDefinition
{
- private List<IFilterDefinition> dataSetFilter = new ArrayList<IFilterDefinition>( );
-
- /**
- * Returns the filters defined in this transform, as an ordered list of
- * <code>IFilterDefintion</code> objects.
- *
- * @return the filters. null if no filter is defined.
- */
- public List<IFilterDefinition> getDataSetFilters( )
- {
- return dataSetFilter;
- }
-
- /**
- * Add one filter to the filter list
- */
- public void addDataSetFilter( IFilterDefinition filter )
- {
- dataSetFilter.add( filter );
- }
}
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQueryUtil.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQueryUtil.java
index 1d83411..8a6e657 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQueryUtil.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQueryUtil.java
@@ -107,15 +107,6 @@ public class PreparedQueryUtil
IPreparedQuery preparedQuery;
IBaseDataSetDesign dset = cloneDataSetDesign( dataEngine.getDataSetDesign( queryDefn.getDataSetName( ) ) , appContext);
-
- if ( queryDefn instanceof CubeCreationQueryDefinition )
- {
- if ( dataEngine.getDataSetDesign( queryDefn.getDataSetName( ) ) != null )
- {
- dset.getFilters( )
- .addAll( ( (CubeCreationQueryDefinition) queryDefn ).getDataSetFilters( ) );
- }
- }
if( dset!= null )
{
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java
index 4f8a452..d9893fa 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java
@@ -2305,14 +2305,7 @@ public class DataRequestSessionImpl extends DataRequestSession
while( filterIterator.hasNext( ) )
{
FilterConditionHandle filter = (FilterConditionHandle) filterIterator.next( );
- if ( query instanceof CubeCreationQueryDefinition )
- {
- ( (CubeCreationQueryDefinition) query ).addDataSetFilter( session.getModelAdaptor( )
- .adaptFilter( filter ) );
- }
- else
- query.addFilter( session.getModelAdaptor( )
- .adaptFilter( filter ) );
+ query.addFilter( session.getModelAdaptor( ).adaptFilter( filter ) );
}
}