472473474475476477478479480481482
Errors errors = new Errors(); for (TypeMap<?, ?> typeMap : getTypeMaps()) { try { typeMap.validate(); } catch (ValidationException e) { errors.merge(e.getErrorMessages()); } } errors.throwValidationExceptionIfErrorsExist(); }