*
* @throws InvalidQueryException Thrown if the parameters are invalid.
*/
public void validateParameters(List<ValueType> types) throws InvalidQueryException {
if (types.size() != 2) {
throw new InvalidQueryException("The function " + FUNCTION_NAME
+ " requires 2 parmaeters ");
}
for (ValueType type : types) {
if (type != ValueType.NUMBER) {
throw new InvalidQueryException("Can't perform the function "
+ FUNCTION_NAME + " on values that are not numbers");
}
}
}