Class ValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.tocco.nice2.model.entity.api.BaseRuntimeException
ch.tocco.nice2.model.entity.api.ValidationException
- All Implemented Interfaces:
Serializable
Thrown when the data coming in to be stored does not validate the model.
This happens for example when setting a value of type string to a field of type integer. Maybe the user is to blame, maybe the code, we can't tell.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationException(String message) ValidationException(String message, Throwable cause) ValidationException(Throwable cause) -
Method Summary
Modifier and TypeMethodDescription@Nullable AbstractValidationResultDeprecated.setValidationResult(@Nullable AbstractValidationResult validationResult) setValidationResults(List<AbstractValidationResult> validationResults) Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationException
public ValidationException() -
ValidationException
-
ValidationException
-
ValidationException
-
-
Method Details
-
getValidationResult
Deprecated.ValidationExceptioncan contain multiple validation results from different entities. if you are sure that you only require the first one, usegetFirstValidationResult(), otherwise usegetValidationResults()and handle all of them -
getFirstValidationResult
-
getValidationResults
-
setValidationResult
-
setValidationResults
-