Package com.apitrary.api.client.exception

Examples of com.apitrary.api.client.exception.ValidationConstraintViolationException


          Object value = null;
          try {
            value = field.get(request);
          } catch (Exception e) {
            // not cool...
            throw new ValidationConstraintViolationException(e);
          }

          if (value == null || value instanceof String && ((String) value).isEmpty()) {
            ConstraintViolation violation = ConstraintViolation.newConstraintViolation("@" + Required.class.getSimpleName(), field);
            leafs.add(violation);
          }
        }
      }

      if (!leafs.isEmpty()) {
        throw new ValidationConstraintViolationException(preMessage, leafs);
      }
    }
  }
View Full Code Here


          Object value = null;
          try {
            value = field.get(request);
          } catch (Exception e) {
            // not cool...
            throw new ValidationConstraintViolationException(e);
          }

          if (value == null || value instanceof String && ((String) value).isEmpty()) {
            ConstraintViolation violation = ConstraintViolation.newConstraintViolation("@" + Required.class.getSimpleName(), field);
            leafs.add(violation);
          }
        }
      }

      if (!leafs.isEmpty()) {
        throw new ValidationConstraintViolationException(preMessage, leafs);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.apitrary.api.client.exception.ValidationConstraintViolationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.