Package org.faktorips.runtime.validation
Class DatabaseLengthValidation
java.lang.Object
org.faktorips.runtime.validation.DatabaseLengthValidation
Utility class for length validation.
This class performs a generic validation of String lengths, and precision (and scale) for
numeric values based on the limits specified. It does not validate against any
constraints that may be defined via JPA annotations.
- Since:
- 25.7
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvalidateOnly(IModelObject modelObject) Validates that all string attributes in the model object do not exceed the specified maximum byte length, and all numeric attributes in the model object do not exceed the given precision and scale.validateWithChildren(IModelObject modelObject) Validates that all string attributes in the model object and all its child objects do not exceed the specified maximum byte length, and all numeric attributes in the model object do not exceed the given precision and scale.static DatabaseLengthValidation
-
Method Details
-
with
-
validateWithChildren
Validates that all string attributes in the model object and all its child objects do not exceed the specified maximum byte length, and all numeric attributes in the model object do not exceed the given precision and scale.- Parameters:
modelObject- the model object to validate- Returns:
- a list of validation messages, empty if no attribute exceeds its constraints
- See Also:
-
validateOnly
Validates that all string attributes in the model object do not exceed the specified maximum byte length, and all numeric attributes in the model object do not exceed the given precision and scale.- Parameters:
modelObject- the model object to validate- Returns:
- a list of validation messages, empty if no attribute exceeds its constraints
- See Also:
-