|
|
@ -185,14 +185,21 @@ public class Criteria { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} else if (CriteriaType.NE.equals(key)) { |
|
|
|
} else if (CriteriaType.NE.equals(key)) { |
|
|
|
if (expectedVal == null && actualVal == null) { |
|
|
|
|
|
|
|
|
|
|
|
return objectOrAnyCollectionItemMatches(actualVal, new Predicate<Object>() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean accept(Object value) { |
|
|
|
|
|
|
|
if (expectedVal == null && value == null) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if (expectedVal == null) { |
|
|
|
if (expectedVal == null) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return !expectedVal.equals(actualVal); |
|
|
|
return !expectedVal.equals(value); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} else if (CriteriaType.IN.equals(key)) { |
|
|
|
} else if (CriteriaType.IN.equals(key)) { |
|
|
|
|
|
|
|
|
|
|
@ -287,13 +294,18 @@ public class Criteria { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Object actualVal = readSafely(this.key, map); |
|
|
|
Object actualVal = readSafely(this.key, map); |
|
|
|
|
|
|
|
return objectOrAnyCollectionItemMatches(actualVal, new Predicate<Object>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean accept(Object value) { |
|
|
|
if (isValue == null) { |
|
|
|
if (isValue == null) { |
|
|
|
return actualVal == null; |
|
|
|
return value == null; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return isValue.equals(actualVal); |
|
|
|
return isValue.equals(value); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|