public class StringSizeMetaDataTransformer extends AbstractBeanValidationMetaDataTransformer<Size>
{
protected Map<String, Object> transformMetaData(ConstraintDescriptor<Size> constraintDescriptor)
{
Map<String, Object> results = new HashMap<String, Object>();
Size annotation = constraintDescriptor.getAnnotation();
int minimum = annotation.min();
if(minimum != 0)
{
results.put(CommonMetaDataKeys.MIN_LENGTH, minimum);
}
else
{
results.put(CommonMetaDataKeys.MIN_LENGTH_DEFAULT, minimum);
}
int maximum = annotation.max();
if(maximum != Integer.MAX_VALUE)
{
results.put(CommonMetaDataKeys.MAX_LENGTH, maximum);
}
else