Package com.hotels.transformer.validator
Class ValidatorImpl
- java.lang.Object
-
- com.hotels.transformer.validator.ValidatorImpl
-
-
Constructor Summary
Constructors Constructor Description ValidatorImpl()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K> Set<javax.validation.ConstraintViolation<Object>>
getConstraintViolations(K k)
Checks if an object is valid and returns the list of the constraints not met.<K> List<String>
getConstraintViolationsMessages(K k)
Checks if an object is valid and returns the list of the constraints messages not met.<K> void
validate(K k)
Checks if an object is valid.
-
-
-
Method Detail
-
getConstraintViolations
public final <K> Set<javax.validation.ConstraintViolation<Object>> getConstraintViolations(K k)
Checks if an object is valid and returns the list of the constraints not met.- Specified by:
getConstraintViolations
in interfaceValidator
- Type Parameters:
K
- the object class- Parameters:
k
- the object to check- Returns:
- the list of violated constraints.
-
getConstraintViolationsMessages
public final <K> List<String> getConstraintViolationsMessages(K k)
Checks if an object is valid and returns the list of the constraints messages not met.- Specified by:
getConstraintViolationsMessages
in interfaceValidator
- Type Parameters:
K
- the object class- Parameters:
k
- the object to check- Returns:
- the list of violated constraints messages.
-
-