Interface PrototypeFieldComplexValidator<T>

    • Method Detail

      • getPrototype

        EntityFieldPrototype<T> getPrototype()
        Returns:
        the field prototype validated by this validator
      • validate

        ValidationError validate​(T fieldValue,
                                 CurrentEntityState currentState)
        Validates the new value for the field. The implementation can query the entity only for the fields it has declared in fetchFields().
        Parameters:
        fieldValue - new value of the field
        currentState - existing entity
        Returns:
        a validation error if any, null if none
      • fetchFields

        java.util.stream.Stream<EntityField<?,​?>> fetchFields()
        Returns:
        a list of fields to fetch. Can contain only parent entities fields.