Interface DataSourceProperty

    • Method Detail

      • range

        java.lang.Class<?> range()
        Return the type of the value of this DataSourceProperty. Any value set for this property must be assignable to this type.
        Returns:
        the type of the values of this DataSourceProperty
      • validate

        default boolean validate​(java.lang.Object value)
        Determine whether a value is valid for this DataSourceProperty. Returns true if value is valid and false otherwise.
        Parameters:
        value - a value for this DataSourceProperty
        Returns:
        true iff value is valid for this DataSourceProperty
      • defaultValue

        java.lang.Object defaultValue()
        Return the value for this property to use if no other value is set. This has no meaning for user defined properties as the implementation is not aware of the the existence of the property. Default values are used for standard and implementation defined properties.
        Returns:
        the default value or null if there is no default value
      • isSensitive

        boolean isSensitive()
        Returns true if this DataSourceProperty is contains sensitive information such as a password or encryption key.
        Returns:
        true iff this is sensitive
      • configure

        default void configure​(DataSource ds,
                               java.lang.Object value)
        Configure the DataSource as appropriate for the given value of this DataSourceProperty. This is primarily for the use of user defined properties.
        Parameters:
        ds - the DataSource to configure
        value - the value of this property