Interface PropertyValidator

    • Method Detail

      • chain

        static ValidatorChain chain()
        Returns:
        empty chain of property validators, enabling to add arbitrary property validators and validate a given map of properties by applying all validators subsequently.
      • forStructureElement

        static PropertyValidator forStructureElement​(SqlDialect.StructureElementSupport availableSupport,
                                                     String elementName,
                                                     String propertyName)
        Create property validator for an optional property specifying a structure element.
        Parameters:
        availableSupport - type of support provided by the dialect
        elementName - name of the structure element to be included in the message of the validation exception
        propertyName - name of the property
        Returns:
        property validator for a property specifying a structure element
      • ignoreEmpty

        static PropertyValidator ignoreEmpty​(String propertyName,
                                             PropertyValidator.PropertyValueValidator valueValidator)
        Create property validator for an optional property allowing an empty value.
        Parameters:
        propertyName - name of the property
        valueValidator - Validator for the value of the current property if the property is set
        Returns:
        property validator for a property ignoring an empty value for this property
      • optional

        static PropertyValidator optional​(String propertyName,
                                          PropertyValidator.PropertyValueValidator valueValidator)
        Create property validator for an optional property.
        Parameters:
        propertyName - name of the property
        valueValidator - Validator for the value of the current property if the property is set
        Returns:
        property validator for an optional property