svn commit: r953671 - in /ofbiz/trunk/framework: entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java widget/dtd/widget-form.xsd widget/dtd/widget-screen.xsd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r953671 - in /ofbiz/trunk/framework: entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java widget/dtd/widget-form.xsd widget/dtd/widget-screen.xsd

jleroux@apache.org
Author: jleroux
Date: Fri Jun 11 11:44:34 2010
New Revision: 953671

URL: http://svn.apache.org/viewvc?rev=953671&view=rev
Log:
A patch from Ankit Jain "Missing "not-in" operator in condtion-expr tag." (https://issues.apache.org/jira/browse/OFBIZ-3819) - OFBIZ-3819

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java
    ofbiz/trunk/framework/widget/dtd/widget-form.xsd
    ofbiz/trunk/framework/widget/dtd/widget-screen.xsd

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java?rev=953671&r1=953670&r2=953671&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java Fri Jun 11 11:44:34 2010
@@ -199,7 +199,7 @@ public class EntityFinderUtil {
             }
 
             // If IN or BETWEEN operator, see if value is a literal list and split it
-            if ((operator.equals(EntityOperator.IN) || operator.equals(EntityOperator.BETWEEN))
+            if ((operator.equals(EntityOperator.IN) || operator.equals(EntityOperator.BETWEEN) || operator.equals(EntityOperator.NOT_IN))
                     && value instanceof String) {
                 String delim = null;
                 if (((String)value).indexOf("|") >= 0) {
@@ -217,7 +217,7 @@ public class EntityFinderUtil {
             }
 
             // don't convert the field to the desired type if this is an IN or BETWEEN operator and we have a Collection
-            if (!((operator.equals(EntityOperator.IN) || operator.equals(EntityOperator.BETWEEN))
+            if (!((operator.equals(EntityOperator.IN) || operator.equals(EntityOperator.BETWEEN) || operator.equals(EntityOperator.NOT_IN))
                     && value instanceof Collection)) {
                 // now to a type conversion for the target fieldName
                 value = modelEntity.convertFieldValue(modelEntity.getField(fieldName), value, modelFieldTypeReader, context);

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=953671&r1=953670&r2=953671&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Fri Jun 11 11:44:34 2010
@@ -1286,6 +1286,7 @@ under the License.
                     <xs:enumeration value="equals"/>
                     <xs:enumeration value="not-equals"/>
                     <xs:enumeration value="in"/>
+                    <xs:enumeration value="not-in"/>
                     <xs:enumeration value="between"/>
                     <xs:enumeration value="like"/>
                 </xs:restriction>

Modified: ofbiz/trunk/framework/widget/dtd/widget-screen.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-screen.xsd?rev=953671&r1=953670&r2=953671&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-screen.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-screen.xsd Fri Jun 11 11:44:34 2010
@@ -652,6 +652,7 @@ under the License.
                     <xs:enumeration value="equals"/>
                     <xs:enumeration value="not-equals"/>
                     <xs:enumeration value="in"/>
+                    <xs:enumeration value="not-in"/>
                     <xs:enumeration value="between"/>
                     <xs:enumeration value="like"/>
                 </xs:restriction>