Package org.iplass.mtp.entity
Interface PropertyNormalizer<T>
- Type Parameters:
T
-
public interface PropertyNormalizer<T>
It is an interface for custom implementation in Java class that normalizes the value of Entity property.
Normalization is performed just before validation.
Normalization can be called multiple times for the same property value. Do not implement logic that has problems when called multiple times like html sanitizing, with PropertyNormalizer.
Normalization is performed just before validation.
Normalization can be called multiple times for the same property value. Do not implement logic that has problems when called multiple times like html sanitizing, with PropertyNormalizer.
Example
public class CustomPropertyNormalizerimplements PropertyNormalizer { public String normalize(Object value, ValidationContext context) { if (value == null) { return null; } return value.toString().replace(".", "_"); } }
-
Method Summary
-
Method Details
-
normalize
-