public class LengthMetaDataTransformer extends AbstractValidationParameterAwareTransformer
{
protected Map<String, Object> transformMetaData(MetaDataEntry metaDataEntry)
{
Map<String, Object> results = new HashMap<String, Object>();
Length annotation = metaDataEntry.getValue(Length.class);
int minimum = annotation.minimum();
if(minimum != 0)
{
results.put(CommonMetaDataKeys.MIN_LENGTH, minimum);
}
else
{
results.put(CommonMetaDataKeys.MIN_LENGTH_DEFAULT, minimum);
}
int maximum = annotation.maximum();
if(maximum != Integer.MAX_VALUE)
{
results.put(CommonMetaDataKeys.MAX_LENGTH, maximum);
}
else