Author: doogie
Date: Mon Sep 14 07:47:38 2009
New Revision: 814508
URL:
http://svn.apache.org/viewvc?rev=814508&view=revLog:
s/List/Comparable in a few places, to stop a CCE from occuring.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java
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=814508&r1=814507&r2=814508&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 Mon Sep 14 07:47:38 2009
@@ -135,14 +135,14 @@
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 ListEntityComparisonOperator(ID_IN, "IN") {
+ public static final EntityComparisonOperator IN = new ComparableEntityComparisonOperator(ID_IN, "IN") {
@Override
public <T> boolean compare(Comparable<T> lhs, T rhs) { return EntityComparisonOperator.compareIn(lhs, rhs); }
@Override
protected void makeRHSWhereStringValue(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sb, ModelField field, Object rhs, DatasourceInfo datasourceInfo) { appendRHSList(entityConditionParams, sb, field, rhs); }
};
static { register("in", IN); }
- public static final EntityComparisonOperator BETWEEN = new ListEntityComparisonOperator(ID_BETWEEN, "BETWEEN") {
+ public static final EntityComparisonOperator BETWEEN = new ComparableEntityComparisonOperator(ID_BETWEEN, "BETWEEN") {
@Override
public <T> boolean compare(Comparable<T> lhs, T rhs) { return EntityComparisonOperator.compareIn(lhs, rhs); }
@Override
@@ -165,7 +165,7 @@
public <T> boolean compare(Comparable<T> lhs, T rhs) { return !EntityComparisonOperator.compareLike(lhs, rhs); }
};
static { register("not-like", NOT_LIKE); }
- public static final EntityComparisonOperator NOT_IN = new ListEntityComparisonOperator(ID_NOT_IN, "NOT IN") {
+ public static final EntityComparisonOperator NOT_IN = new ComparableEntityComparisonOperator(ID_NOT_IN, "NOT IN") {
@Override
public <T> boolean compare(Comparable<T> lhs, T rhs) { return !EntityComparisonOperator.compareIn(lhs, rhs); }
@Override
@@ -278,8 +278,8 @@
}
};
- public static abstract class ListEntityComparisonOperator extends EntityComparisonOperator<Comparable, List<Comparable>> {
- public ListEntityComparisonOperator(int id, String code) {
+ public static abstract class ComparableEntityComparisonOperator extends EntityComparisonOperator<Comparable, Collection<Comparable>> {
+ public ComparableEntityComparisonOperator(int id, String code) {
super(id, code);
}
}