コード例 #1
0
 public void checkAssociationConstraints(Association<?> association)
     throws ConstraintViolationException {
   if (associationConstraints != null) {
     List<ConstraintViolation> violations = associationConstraints.checkConstraints(association);
     if (!violations.isEmpty()) {
       throw new ConstraintViolationException(
           (Composite) association.get(), (Member) accessor, violations);
     }
   }
 }
コード例 #2
0
 @Override
 public void checkConstraints(Object value) throws ConstraintViolationException {
   if (constraints != null) {
     List<ConstraintViolation> violations = constraints.checkConstraints(value);
     if (!violations.isEmpty()) {
       Iterable<Class<?>> empty = empty();
       throw new ConstraintViolationException("", empty, (Member) accessor, violations);
     }
   }
 }