Module jp.ecuacion.lib.core
Package jp.ecuacion.lib.core.util
Class ValidationUtil.ValidationExecutor
java.lang.Object
jp.ecuacion.lib.core.util.ValidationUtil.ValidationExecutor
- Enclosing class:
ValidationUtil
Executes validation.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationExecutor(boolean isMessageWithItemName, PropertyFileUtil.Arg messagePrefix, PropertyFileUtil.Arg messagePostfix) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvalidateThenReturn(T object) Validates and returnsMultipleAppExceptionif validation errors exist.<T> voidvalidateThenThrow(T object) Validates and throwsMultipleAppExceptionif validation errors exist.
-
Constructor Details
-
ValidationExecutor
public ValidationExecutor(boolean isMessageWithItemName, @Nullable PropertyFileUtil.Arg messagePrefix, @Nullable PropertyFileUtil.Arg messagePostfix) Construct a new instance.- Parameters:
isMessageWithItemName- isMessageWithItemNamemessagePrefix- messagePrefixmessagePostfix- messagePostfix
-
-
Method Details
-
validateThenThrow
Validates and throwsMultipleAppExceptionif validation errors exist.- Type Parameters:
T- any class- Parameters:
object- object to validate- Throws:
MultipleAppException- MultipleAppException
-
validateThenReturn
Validates and returnsMultipleAppExceptionif validation errors exist.- Type Parameters:
T- any class- Parameters:
object- object which is treated asLocale.getDefault().- Returns:
- MultipleAppException, may be null when no validation errors exist.
-