java.lang.Object
io.avaje.validation.adapter.AbstractContainerAdapter<T>
- Type Parameters:
T- the type we are validating
- All Implemented Interfaces:
ValidationAdapter<T>
Adapter that validates container types.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ValidationAdapter<T>Adapter placed on the the container typeprotected ValidationAdapter<Object> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractContainerAdapter(ValidationAdapter<T> initialAdapter) -
Method Summary
Modifier and TypeMethodDescriptionandThenMulti(ValidationAdapter<?> adapter) Compose the given adapter with the multiAdapter of this AbstractContainerAdapter for validating multiple items.protected booleanvalidateAll(Iterable<Object> value, ValidationRequest req, String propertyName) Execute validations for all items in the given iterableprotected booleanvalidateArray(Object[] value, ValidationRequest req, String propertyName) Execute validations for all items in the given arrayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.avaje.validation.adapter.ValidationAdapter
andThen, array, checkGroups, list, mapKeys, mapValues, optional, validate, validate
-
Field Details
-
initalAdapter
Adapter placed on the the container type -
multiAdapter
-
-
Constructor Details
-
AbstractContainerAdapter
- Parameters:
initialAdapter- initial adapter that can be used to validate the container itself
-
-
Method Details
-
andThenMulti
Compose the given adapter with the multiAdapter of this AbstractContainerAdapter for validating multiple items. -
validateAll
Execute validations for all items in the given iterable -
validateArray
Execute validations for all items in the given array
-