Fixed: Remove unused type parameters (OFBIZ-10909)
No functional change. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857087 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -37,13 +37,13 @@ public class EntityClause {
|
||||
private String secondField = "";
|
||||
private ModelEntity firstModelEntity = null;
|
||||
private ModelEntity secondModelEntity = null;
|
||||
private EntityOperator<?,?,?> interFieldOperation = null;
|
||||
private EntityOperator<?,?,?> intraFieldOperation = null;
|
||||
private EntityOperator<?,?> interFieldOperation = null;
|
||||
private EntityOperator<?,?> intraFieldOperation = null;
|
||||
|
||||
private Object value = null;
|
||||
public EntityClause() {}
|
||||
|
||||
public EntityClause(String firstEntity, String secondEntity, String firstField, String secondField, EntityOperator<?, ?, ?> interFieldOperation, EntityOperator<?, ?, ?> intraFieldOperation) {
|
||||
public EntityClause(String firstEntity, String secondEntity, String firstField, String secondField, EntityOperator<?, ?> interFieldOperation, EntityOperator<?, ?> intraFieldOperation) {
|
||||
this.firstEntity = firstEntity;
|
||||
this.secondEntity = secondEntity;
|
||||
this.firstField = firstField;
|
||||
@@ -52,7 +52,7 @@ public class EntityClause {
|
||||
this.intraFieldOperation = intraFieldOperation;
|
||||
}
|
||||
|
||||
public EntityClause(String firstEntity, String firstField, Object value, EntityOperator<?, ?, ?> interFieldOperation, EntityOperator<?, ?, ?> intraFieldOperation) {
|
||||
public EntityClause(String firstEntity, String firstField, Object value, EntityOperator<?, ?> interFieldOperation, EntityOperator<?, ?> intraFieldOperation) {
|
||||
this.firstEntity = firstEntity;
|
||||
this.firstField = firstField;
|
||||
this.value = value;
|
||||
@@ -83,11 +83,11 @@ public class EntityClause {
|
||||
return value;
|
||||
}
|
||||
|
||||
public <L,R,T> EntityOperator<L,R,T> getInterFieldOperation() {
|
||||
public <L,R> EntityOperator<L,R> getInterFieldOperation() {
|
||||
return UtilGenerics.cast(interFieldOperation);
|
||||
}
|
||||
|
||||
public <L,R,T> EntityOperator<L,R,T> getIntraFieldOperation() {
|
||||
public <L,R> EntityOperator<L,R> getIntraFieldOperation() {
|
||||
return UtilGenerics.cast(intraFieldOperation);
|
||||
}
|
||||
|
||||
@@ -107,11 +107,11 @@ public class EntityClause {
|
||||
this.secondField = secondField;
|
||||
}
|
||||
|
||||
public <L,R,T> void setInterFieldOperation(EntityOperator<L,R,T> interFieldOperation) {
|
||||
public <L,R> void setInterFieldOperation(EntityOperator<L,R> interFieldOperation) {
|
||||
this.interFieldOperation = interFieldOperation;
|
||||
}
|
||||
|
||||
public <L,R,T> void setIntraFieldOperation(EntityOperator<L,R,T> intraFieldOperation) {
|
||||
public <L,R> void setIntraFieldOperation(EntityOperator<L,R> intraFieldOperation) {
|
||||
this.intraFieldOperation = intraFieldOperation;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ import org.apache.oro.text.regex.Perl5Matcher;
|
||||
* Base class for comparisons.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class EntityComparisonOperator<L, R> extends EntityOperator<L, R, Boolean> {
|
||||
public abstract class EntityComparisonOperator<L, R> extends EntityOperator<L, R> {
|
||||
|
||||
public static final String module = EntityComparisonOperator.class.getName();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public final class EntityExpr implements EntityCondition {
|
||||
/** The left hand side of the expression. */
|
||||
private final Object lhs;
|
||||
/** The operator used to combine the two sides of the expression. */
|
||||
private final EntityOperator<Object, Object, ?> operator;
|
||||
private final EntityOperator<Object, Object> operator;
|
||||
/** The right hand side of the expression. */
|
||||
private final Object rhs;
|
||||
|
||||
@@ -120,7 +120,7 @@ public final class EntityExpr implements EntityCondition {
|
||||
*
|
||||
* @return the operator used to combine the two sides of the condition expression.
|
||||
*/
|
||||
public <L,R,T> EntityOperator<L,R,T> getOperator() {
|
||||
public <L,R> EntityOperator<L,R> getOperator() {
|
||||
return UtilGenerics.cast(operator);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ import org.apache.ofbiz.entity.model.ModelEntity;
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityJoinOperator extends EntityOperator<EntityCondition, EntityCondition, Boolean> {
|
||||
public class EntityJoinOperator extends EntityOperator<EntityCondition, EntityCondition> {
|
||||
|
||||
protected boolean shortCircuitValue;
|
||||
|
||||
|
||||
+9
-9
@@ -42,7 +42,7 @@ import org.apache.ofbiz.entity.model.ModelField;
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class EntityOperator<L, R, T> implements Serializable {
|
||||
public abstract class EntityOperator<L, R> implements Serializable {
|
||||
|
||||
public static final int ID_EQUALS = 1;
|
||||
public static final int ID_NOT_EQUAL = 2;
|
||||
@@ -59,25 +59,25 @@ public abstract class EntityOperator<L, R, T> implements Serializable {
|
||||
public static final int ID_NOT_IN = 13;
|
||||
public static final int ID_NOT_LIKE = 14;
|
||||
|
||||
private static HashMap<String, EntityOperator<?,?,?>> registry = new HashMap<>();
|
||||
private static HashMap<String, EntityOperator<?,?>> registry = new HashMap<>();
|
||||
|
||||
private static <L,R,T> void registerCase(String name, EntityOperator<L,R,T> operator) {
|
||||
private static <L,R> void registerCase(String name, EntityOperator<L,R> operator) {
|
||||
registry.put(name.toLowerCase(Locale.getDefault()), operator);
|
||||
registry.put(name.toUpperCase(Locale.getDefault()), operator);
|
||||
}
|
||||
|
||||
public static <L,R,T> void register(String name, EntityOperator<L,R,T> operator) {
|
||||
public static <L,R> void register(String name, EntityOperator<L,R> operator) {
|
||||
registerCase(name, operator);
|
||||
registerCase(name.replaceAll("-", "_"), operator);
|
||||
registerCase(name.replaceAll("_", "-"), operator);
|
||||
}
|
||||
|
||||
public static <L,R,T> EntityOperator<L,R,T> lookup(String name) {
|
||||
public static <L,R> EntityOperator<L,R> lookup(String name) {
|
||||
return UtilGenerics.cast(registry.get(name));
|
||||
}
|
||||
|
||||
public static <L,R> EntityComparisonOperator<L,R> lookupComparison(String name) {
|
||||
EntityOperator<?,?,Boolean> operator = lookup(name);
|
||||
EntityOperator<?,?> operator = lookup(name);
|
||||
if (!(operator instanceof EntityComparisonOperator<?,?>)) {
|
||||
throw new IllegalArgumentException(name + " is not a comparison operator");
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public abstract class EntityOperator<L, R, T> implements Serializable {
|
||||
}
|
||||
|
||||
public static EntityJoinOperator lookupJoin(String name) {
|
||||
EntityOperator<?,?,Boolean> operator = lookup(name);
|
||||
EntityOperator<?,?> operator = lookup(name);
|
||||
if (!(operator instanceof EntityJoinOperator)) {
|
||||
throw new IllegalArgumentException(name + " is not a join operator");
|
||||
}
|
||||
@@ -231,8 +231,8 @@ public abstract class EntityOperator<L, R, T> implements Serializable {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof EntityOperator<?,?,?>) {
|
||||
EntityOperator<?,?,?> otherOper = UtilGenerics.cast(obj);
|
||||
if (obj instanceof EntityOperator<?,?>) {
|
||||
EntityOperator<?,?> otherOper = UtilGenerics.cast(obj);
|
||||
return this.idInt == otherOper.idInt;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -154,7 +154,7 @@ public final class EntityFinderUtil {
|
||||
@SuppressWarnings("serial")
|
||||
public static final class ConditionExpr implements Condition {
|
||||
private final String fieldName;
|
||||
private final EntityOperator<?,?,?> operator;
|
||||
private final EntityOperator<?,?> operator;
|
||||
private final FlexibleMapAccessor<Object> envNameAcsr;
|
||||
private final FlexibleStringExpander valueExdr;
|
||||
private final FlexibleStringExpander ignoreExdr;
|
||||
@@ -258,7 +258,7 @@ public final class EntityFinderUtil {
|
||||
@SuppressWarnings("serial")
|
||||
public static final class ConditionList implements Condition {
|
||||
private final List<Condition> conditionList;
|
||||
private final EntityOperator<?,?,?> operator;
|
||||
private final EntityOperator<?,?> operator;
|
||||
|
||||
public ConditionList(Element conditionListElement) {
|
||||
String operatorAttribute = conditionListElement.getAttribute("combine");
|
||||
|
||||
Reference in New Issue
Block a user