Interface AncestorsValidator

    • Method Detail

      • ancestorsFields

        java.util.stream.Stream<EntityField<?,​?>> ancestorsFields()
        Returns:
        the fields of the ancestor entities whose value is required for the validation
      • validate

        ValidationError validate​(CurrentEntityState ancestorsFieldsState)
        Called by the framework to check if the change is restricted by ancestors. The implementation can query the entity only for the fields it has declared in ancestorsFields().
        Parameters:
        ancestorsFieldsState - ancestor's fields
        Returns:
        a validation error if any, null if none