Examples of ValidationConstraintViolationException


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

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

Examples of com.cloudcontrolled.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
TOP
Copyright © 2018 www.massapi.com. 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.