svn commit: r687936 - in /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition: EntityComparisonOperator.java EntityOperator.java

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

svn commit: r687936 - in /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition: EntityComparisonOperator.java EntityOperator.java

doogie-3
Author: doogie
Date: Thu Aug 21 21:00:57 2008
New Revision: 687936

URL: http://svn.apache.org/viewvc?rev=687936&view=rev
Log:
Fix breakage with IN type operations.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java?rev=687936&r1=687935&r2=687936&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java Thu Aug 21 21:00:57 2008
@@ -175,7 +175,7 @@
         super(id, code);
     }
 
-    public static final <T extends Comparable<T>> boolean compareEqual(T lhs, T rhs) {
+    public static final boolean compareEqual(Comparable lhs, Object rhs) {
         if (lhs == null) {
             if (rhs != null) {
                 return false;
@@ -186,7 +186,7 @@
         return true;
     }
 
-    public static final <T extends Comparable<T>> boolean compareNotEqual(T lhs, T rhs) {
+    public static final boolean compareNotEqual(Comparable lhs, Object rhs) {
         if (lhs == null) {
             if (rhs == null) {
                 return false;
@@ -197,7 +197,7 @@
         return true;
     }
 
-    public static final <T extends Comparable<T>> boolean compareGreaterThan(T lhs, T rhs) {
+    public static final boolean compareGreaterThan(Comparable lhs, Object rhs) {
         if (lhs == null) {
             if (rhs != null) {
                 return false;
@@ -208,7 +208,7 @@
         return true;
     }
 
-    public static final <T extends Comparable<T>> boolean compareGreaterThanEqualTo(T lhs, T rhs) {
+    public static final boolean compareGreaterThanEqualTo(Comparable lhs, Object rhs) {
         if (lhs == null) {
             if (rhs != null) {
                 return false;
@@ -219,7 +219,7 @@
         return true;
     }
 
-    public static final <T extends Comparable<T>> boolean compareLessThan(T lhs, T rhs) {
+    public static final boolean compareLessThan(Comparable lhs, Object rhs) {
         if (lhs == null) {
             if (rhs != null) {
                 return false;
@@ -230,7 +230,7 @@
         return true;
     }
 
-    public static final <T extends Comparable<T>> boolean compareLessThanEqualTo(T lhs, T rhs) {
+    public static final boolean compareLessThanEqualTo(Comparable lhs, Object rhs) {
         if (lhs == null) {
             if (rhs != null) {
                 return false;

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java?rev=687936&r1=687935&r2=687936&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java Thu Aug 21 21:00:57 2008
@@ -78,7 +78,7 @@
     }
 
     public static final EntityComparisonOperator EQUALS = new EntityComparisonOperator(ID_EQUALS, "=") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareEqual(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareEqual(lhs, rhs); }
         protected void makeRHSWhereString(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sb, ModelField field, Object rhs, DatasourceInfo datasourceInfo) {
             if (rhs == null || rhs == GenericEntity.NULL_FIELD) {
                 //Debug.logInfo("makeRHSWhereString: field IS NULL: " + field.getName(), module);
@@ -91,7 +91,7 @@
     };
     static { register( "equals", EQUALS ); }
     public static final EntityComparisonOperator NOT_EQUAL = new EntityComparisonOperator(ID_NOT_EQUAL, "<>") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareNotEqual(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareNotEqual(lhs, rhs); }
         protected void makeRHSWhereString(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sb, ModelField field, Object rhs, DatasourceInfo datasourceInfo) {
             if (rhs == null || rhs == GenericEntity.NULL_FIELD) {
                 sb.append(" IS NOT NULL");
@@ -104,31 +104,31 @@
     static { register( "not-equals", NOT_EQUAL ); }
     static { register( "notEqual", NOT_EQUAL ); }
     public static final EntityComparisonOperator LESS_THAN = new EntityComparisonOperator(ID_LESS_THAN, "<") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareLessThan(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareLessThan(lhs, rhs); }
     };
     static { register( "less", LESS_THAN ); }
     static { register( "less-than", LESS_THAN ); }
     static { register( "lessThan", LESS_THAN ); }
     public static final EntityComparisonOperator GREATER_THAN = new EntityComparisonOperator(ID_GREATER_THAN, ">") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareGreaterThan(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareGreaterThan(lhs, rhs); }
     };
     static { register( "greater", GREATER_THAN ); }
     static { register( "greater-than", GREATER_THAN ); }
     static { register( "greaterThan", GREATER_THAN ); }
     public static final EntityComparisonOperator LESS_THAN_EQUAL_TO = new EntityComparisonOperator(ID_LESS_THAN_EQUAL_TO, "<=") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareLessThanEqualTo(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareLessThanEqualTo(lhs, rhs); }
     };
     static { register( "less-equals", LESS_THAN_EQUAL_TO ); }
     static { register( "less-than-equal-to", LESS_THAN_EQUAL_TO ); }
     static { register( "lessThanEqualTo", LESS_THAN_EQUAL_TO ); }
     public static final EntityComparisonOperator GREATER_THAN_EQUAL_TO = new EntityComparisonOperator(ID_GREATER_THAN_EQUAL_TO, ">=") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareGreaterThanEqualTo(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareGreaterThanEqualTo(lhs, rhs); }
     };
     static { register( "greater-equals", GREATER_THAN_EQUAL_TO ); }
     static { register( "greater-than-equal-to", GREATER_THAN_EQUAL_TO ); }
     static { register( "greaterThanEqualTo", GREATER_THAN_EQUAL_TO ); }
     public static final EntityComparisonOperator IN = new EntityComparisonOperator(ID_IN, "IN") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareIn(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareIn(lhs, rhs); }
         protected void makeRHSWhereStringValue(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sb, ModelField field, Object rhs) { appendRHSList(entityConditionParams, sb, field, rhs); }
     };
     static { register( "in", IN ); }
@@ -141,15 +141,15 @@
     public static final EntityJoinOperator OR = new EntityJoinOperator(ID_OR, "OR", true);
     static { register( "or", OR ); }
     public static final EntityComparisonOperator LIKE = new EntityComparisonOperator(ID_LIKE, "LIKE") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return EntityComparisonOperator.compareLike(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return EntityComparisonOperator.compareLike(lhs, rhs); }
     };
     static { register( "like", LIKE ); }
     public static final EntityComparisonOperator NOT_LIKE = new EntityComparisonOperator(ID_NOT_LIKE, "NOT LIKE") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return !EntityComparisonOperator.compareLike(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return !EntityComparisonOperator.compareLike(lhs, rhs); }
     };
     static { register( "not-like", NOT_LIKE); }
     public static final EntityComparisonOperator NOT_IN = new EntityComparisonOperator(ID_NOT_IN, "NOT IN") {
-        public <T extends Comparable<T>> boolean compare(T lhs, T rhs) { return !EntityComparisonOperator.compareIn(lhs, rhs); }
+        public boolean compare(Comparable lhs, Object rhs) { return !EntityComparisonOperator.compareIn(lhs, rhs); }
         protected void makeRHSWhereStringValue(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sb, ModelField field, Object rhs) { appendRHSList(entityConditionParams, sb, field, rhs); }
     };
     static { register( "not-in", NOT_IN ); }