Ejemplo n.º 1
0
 @SuppressWarnings("rawtypes")
 public void validate(Object target, Errors errors, Object... validationHints) {
   Set<Class> groups = new LinkedHashSet<Class>();
   if (validationHints != null) {
     for (Object hint : validationHints) {
       if (hint instanceof Class) {
         groups.add((Class) hint);
       }
     }
   }
   processConstraintViolations(
       this.targetValidator.validate(target, groups.toArray(new Class[groups.size()])), errors);
 }
 @Override
 public void validate(Object target, Errors errors, Object... validationHints) {
   if (this.targetValidator != null) {
     Set<Class<?>> groups = new LinkedHashSet<Class<?>>();
     if (validationHints != null) {
       for (Object hint : validationHints) {
         if (hint instanceof Class) {
           groups.add((Class<?>) hint);
         }
       }
     }
     processConstraintViolations(
         this.targetValidator.validate(target, groups.toArray(new Class<?>[groups.size()])),
         errors);
   }
 }
Ejemplo n.º 3
0
 public void validate(Object target, Errors errors) {
   processConstraintViolations(this.targetValidator.validate(target), errors);
 }