public static <T> void validate( T object, Class... groups ) throws ValidationException
{
Set<ConstraintViolation<T>> constraintViolations = ValidationFactory.SINGLE_INSTANCE.getValidator().validate( object, groups );
if ( !constraintViolations.isEmpty() )
{
throw new ValidationException( constraintViolations );
}
}