FieldConfig fieldConfig = config.getFieldConfig(StringUtils
.toString(parametricRangeNode.getField()));
if (fieldConfig != null) {
NumericConfig numericConfig = fieldConfig
.get(ConfigurationKeys.NUMERIC_CONFIG);
if (numericConfig != null) {
ParametricQueryNode lower = parametricRangeNode.getLowerBound();
ParametricQueryNode upper = parametricRangeNode.getUpperBound();
NumberFormat numberFormat = numericConfig.getNumberFormat();
Number lowerNumber, upperNumber;
try {
lowerNumber = numberFormat.parse(lower.getTextAsString());
} catch (ParseException e) {
throw new QueryNodeParseException(new MessageImpl(
QueryParserMessages.COULD_NOT_PARSE_NUMBER, lower
.getTextAsString(), numberFormat.getClass()
.getCanonicalName()), e);
}
try {
upperNumber = numberFormat.parse(upper.getTextAsString());
} catch (ParseException e) {
throw new QueryNodeParseException(new MessageImpl(
QueryParserMessages.COULD_NOT_PARSE_NUMBER, upper
.getTextAsString(), numberFormat.getClass()
.getCanonicalName()), e);
}
switch (numericConfig.getType()) {
case LONG:
upperNumber = upperNumber.longValue();
lowerNumber = lowerNumber.longValue();
break;
case INT: