summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcmr2012-03-28 23:06:57 (EDT)
committer mwu2012-03-28 23:06:57 (EDT)
commita435bab73d0b78187de4651541d48e4d8fecc4d5 (patch)
tree9e31fa9ed8c8dc2068683aeb947eb7012bd2a8e9
parenta3ec060e6e194cc7d337df2a4bfe09ec26573200 (diff)
downloadorg.eclipse.birt-a435bab73d0b78187de4651541d48e4d8fecc4d5.zip
org.eclipse.birt-a435bab73d0b78187de4651541d48e4d8fecc4d5.tar.gz
org.eclipse.birt-a435bab73d0b78187de4651541d48e4d8fecc4d5.tar.bz2
fix TED – Issue 43715' not(no value) case
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/internal/adapter/FilterAdapter.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/internal/adapter/FilterAdapter.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/internal/adapter/FilterAdapter.java
index dcb8c12..ef33398 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/internal/adapter/FilterAdapter.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/internal/adapter/FilterAdapter.java
@@ -15,6 +15,8 @@ package org.eclipse.birt.report.data.adapter.internal.adapter;
import java.util.ArrayList;
import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.birt.data.engine.api.IScriptExpression;
import org.eclipse.birt.data.engine.api.querydefn.FilterDefinition;
@@ -57,12 +59,21 @@ public class FilterAdapter extends FilterDefinition
&& !filterOpr.equals( DesignChoiceConstants.FILTER_OPERATOR_NOT_IN ) )
{
String operand1 = modelFilter.getValue1( );
-// String operand2 = modelFilter.getValue2( );
-
- setExpression( adapter.adaptConditionalExpression( DataAdapterUtil.getExpression( modelFilter.getExpressionProperty( FilterCondition.EXPR_MEMBER )),
+ String operand2 = modelFilter.getValue2( );
+ Expression mainExpr=DataAdapterUtil.getExpression( modelFilter.getExpressionProperty( FilterCondition.EXPR_MEMBER ));
+ String exp= mainExpr.getStringExpression( );
+ if (operand1==null&&operand2==null )
+ {
+ Pattern pattern = Pattern.compile("LOWER\\((.*?)\\)");
+ Matcher matcher = pattern.matcher(exp);
+ while(matcher.find()){
+ exp=matcher.group(1);
+ }
+ }
+ setExpression( adapter.adaptConditionalExpression( (new Expression((Object)exp,mainExpr.getType( ))),
filterOpr,
operand1 == null? null: modelFilter.getValue1ExpressionList( ).getListValue().get( 0 ),
- DataAdapterUtil.getExpression( modelFilter.getExpressionProperty( FilterCondition.VALUE2_MEMBER ))));
+ DataAdapterUtil.getExpression( modelFilter.getExpressionProperty( FilterCondition.VALUE2_MEMBER ))));
}
else
{