Class ValidationUtil.ValidationExecutor

java.lang.Object
jp.ecuacion.lib.core.util.ValidationUtil.ValidationExecutor
Enclosing class:
ValidationUtil

public static class ValidationUtil.ValidationExecutor extends Object
Executes validation.
  • Constructor Details

    • ValidationExecutor

      public ValidationExecutor(boolean isMessageWithItemName, @Nullable PropertyFileUtil.Arg messagePrefix, @Nullable PropertyFileUtil.Arg messagePostfix)
      Construct a new instance.
      Parameters:
      isMessageWithItemName - isMessageWithItemName
      messagePrefix - messagePrefix
      messagePostfix - messagePostfix
  • Method Details

    • validateThenThrow

      public <T> void validateThenThrow(@RequireNonnull T object) throws MultipleAppException
      Validates and throws MultipleAppException if validation errors exist.
      Type Parameters:
      T - any class
      Parameters:
      object - object to validate
      Throws:
      MultipleAppException - MultipleAppException
    • validateThenReturn

      @Nullable public <T> MultipleAppException validateThenReturn(@RequireNonnull T object)
      Validates and returns MultipleAppException if validation errors exist.
      Type Parameters:
      T - any class
      Parameters:
      object - object which is treated as Locale.getDefault().
      Returns:
      MultipleAppException, may be null when no validation errors exist.