Class ValidationUtils

java.lang.Object
api.mpba.rastvdmy.service.validator.ValidationUtils

public class ValidationUtils extends Object
Utility class for common validation methods.
  • Constructor Details

    • ValidationUtils

      public ValidationUtils()
  • Method Details

    • validateNotEmpty

      public static void validateNotEmpty(String field, String message)
      Validates that the given field is not empty or null.
      Parameters:
      field - the field to validate
      message - the error message to throw if the field is empty or null
      Throws:
      ApplicationException - if the field is empty or null
    • throwApplicationException

      public static void throwApplicationException(String message)
      Throws an ApplicationException with the given message.
      Parameters:
      message - the error message
      Throws:
      ApplicationException - always thrown with the given message