public class LongRangeMetaDataTransformer extends AbstractValidationParameterAwareTransformer
{
protected Map<String, Object> transformMetaData(MetaDataEntry metaDataEntry)
{
Map<String, Object> results = new HashMap<String, Object>();
LongRange annotation = metaDataEntry.getValue(LongRange.class);
long minimum = annotation.minimum();
if(minimum != Long.MIN_VALUE)
{
results.put(CommonMetaDataKeys.RANGE_MIN, minimum);
}
else
{
results.put(CommonMetaDataKeys.RANGE_MIN_DEFAULT, minimum);
}
long maximum = annotation.maximum();
if(maximum != Long.MAX_VALUE)
{
results.put(CommonMetaDataKeys.RANGE_MAX, maximum);
}