Class ElementConstraintsDto

java.lang.Object
org.evomaster.client.java.controller.api.dto.constraint.ElementConstraintsDto

public class ElementConstraintsDto extends Object
Set of possible constraints applicable to a single element (ie, no intra-dependency constraints among different elements).

Note: the type and id of the element is undefined here. Some constraint might be interpreted differently based on the type of the element. For example, a min value could be an integer or a double based on the element. This also implies that numeric values are passed as string (this also helps with JSON representation issues)

  • Field Details

    • isNullable

      public Boolean isNullable
    • isOptional

      public Boolean isOptional
    • minValue

      public Long minValue
      Represents the minimum value (@Min) allowed for a field of an entity. The following types are supported:
      • BigDecimal
      • BigInteger
      • byte, short, int, long, and their respective wrappers
      Note that double and float are not supported due to rounding errors (some providers might provide some approximative support). For more information, see the official documentation.
    • maxValue

      public Long maxValue
      Represents the maximum value (@Max) allowed for a field of an entity. The following types are supported:
      • BigDecimal
      • BigInteger
      • byte, short, int, long, and their respective wrappers
      Note that double and float are not supported due to rounding errors (some providers might provide some approximative support). For more information, see the official documentation.
    • enumValuesAsStrings

      public List<String> enumValuesAsStrings
    • decimalMinValue

      public String decimalMinValue
      Contains the value of @DecimalMin(value=String) for an annotated element of an entity. Supported types are: - BigDecimal - BigInteger - CharSequence - byte, short, int, long, and their respective wrappers Note that double and float are not supported due to rounding errors (some providers might provide some approximative support). null elements are considered valid. See official documentation
    • decimalMaxValue

      public String decimalMaxValue
      Contains the value of @DecimalMax(value=String) for an annotated element of an entity. Supported types are: - BigDecimal - BigInteger - CharSequence - byte, short, int, long, and their respective wrappers Note that double and float are not supported due to rounding errors (some providers might provide some approximative support). null elements are considered valid. Official documentation
    • isNotBlank

      public Boolean isNotBlank
      Indicates that the element contains a @NotBlank annotation. The annotated element must not be null and must contain at least one non-whitespace character. Accepts CharSequence. Official documentation
    • isEmail

      public Boolean isEmail
      Indicates the element contains a @Email annotaion The string has to be a well-formed email address. Accepts CharSequence. Official documentation
    • isNegative

      public Boolean isNegative
      The element contains a @Negative annotation. Supported types are: - BigDecimal - BigInteger - byte, short, int, long, float, double and their respective wrappers. null elements are considered valid. E.g. if a field foo is annotated @Negative, the value of foo can be null. Official documentation
    • isNegativeOrZero

      public Boolean isNegativeOrZero
      The element contains a @NegativeOrZero annotation. Supported types are: - BigDecimal - BigInteger - byte, short, int, long, float, double and their respective wrappers. null elements are considered valid. E.g. if a field foo is annotated @NegativeOrZero, the value of foo can be null. See official documentation
    • isPositive

      public Boolean isPositive
      The element contains a @Positive annotation. Supported types are: - BigDecimal - BigInteger - byte, short, int, long, float, double and their respective wrappers. null elements are considered valid. E.g. if a field foo is annotated @Positive, the value of foo can be null. Official documentation
    • isPositiveOrZero

      public Boolean isPositiveOrZero
      The element contains a @PositiveOrZero annotation. Supported types are: - BigDecimal - BigInteger - byte, short, int, long, float, double and their respective wrappers. null elements are considered valid. E.g. if a field foo is annotated @PositiveOrZero, the value of foo can be null. Official documentation
    • isFuture

      public Boolean isFuture
    • isFutureOrPresent

      public Boolean isFutureOrPresent
    • isPast

      public Boolean isPast
    • isPastOrPresent

      public Boolean isPastOrPresent
    • isAlwaysNull

      public Boolean isAlwaysNull
    • patternRegExp

      public String patternRegExp
      Stores the string value of a @Pattern(regexp=string) annotation for a given element. The regular expression follows the Java regular expression conventions see Pattern. null elements are considered valid. If a field foo contains the @Pattern(regexp=string) annotation, foo can be null (unless explicitly @NotNull). Accepts CharSequence.
    • sizeMin

      public Integer sizeMin
    • sizeMax

      public Integer sizeMax
    • digitsInteger

      public Integer digitsInteger
    • digitsFraction

      public Integer digitsFraction
  • Constructor Details

    • ElementConstraintsDto

      public ElementConstraintsDto()