Package dk.mada.jaxrs.model
Interface Validation
@Immutable
public interface Validation
Models the validation requirements for a type/property/parameter.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Validation
No validation input.static final Validation
Simple required validation. -
Method Summary
Modifier and TypeMethodDescriptionstatic dk.mada.jaxrs.model.ImmutableValidation.Builder
builder()
Returns a builder for this type.default boolean
Returns true if this is an empty validation, otherwise false.Returns optional nullable state for the reference.Returns optional read-only state for the reference.Returns optional required state for the reference.maximum()
Returns optional validation maximum.maxItems()
Returns optional validation maximum items.Returns optional validation maximum length.minimum()
Returns optional validation minimum.minItems()
Returns optional validation minimum items.Returns optional validation minimum length.pattern()
Returns optional validation pattern.
-
Field Details
-
NO_VALIDATION
No validation input. -
REQUIRED_VALIDATION
Simple required validation.
-
-
Method Details
-
builder
static dk.mada.jaxrs.model.ImmutableValidation.Builder builder()Returns a builder for this type.- Returns:
- a builder for this type
-
isEmptyValidation
default boolean isEmptyValidation()Returns true if this is an empty validation, otherwise false.- Returns:
- true if this is an empty validation, otherwise false
-
isRequired
Returns optional required state for the reference.- Returns:
- optional required state for the reference
-
isNullable
Returns optional nullable state for the reference.- Returns:
- optional nullable state for the reference
-
isReadonly
Returns optional read-only state for the reference.- Returns:
- optional read-only state for the reference
-
minItems
Returns optional validation minimum items.- Returns:
- optional validation minimum items
-
maxItems
Returns optional validation maximum items.- Returns:
- optional validation maximum items
-
minLength
Returns optional validation minimum length.- Returns:
- optional validation minimum length
-
maxLength
Returns optional validation maximum length.- Returns:
- optional validation maximum length
-
minimum
Optional<BigDecimal> minimum()Returns optional validation minimum.- Returns:
- optional validation minimum
-
maximum
Optional<BigDecimal> maximum()Returns optional validation maximum.- Returns:
- optional validation maximum
-
pattern
Returns optional validation pattern.- Returns:
- optional validation pattern
-