AdbaDataSourceProperty
public interface DataSourceProperty
DataSource
that can be configured to influence its
behavior. Implementors of this interface define the properties of
DataSource
s. The DataSource.Builder.property(jdk.incubator.sql2.DataSourceProperty, java.lang.Object)
method is used
to set the values of DataSource
properties.
Implementations must be thread safe.Modifier and Type | Method | Description |
---|---|---|
default void |
configure(DataSource ds,
java.lang.Object value) |
|
java.lang.Object |
defaultValue() |
Return the value for this property to use if no other value is set.
|
boolean |
isSensitive() |
Returns true if this
DataSourceProperty is contains sensitive
information such as a password or encryption key. |
java.lang.String |
name() |
Return the name of this
DataSourceProperty . |
java.lang.Class<?> |
range() |
Return the type of the value of this
DataSourceProperty . |
default boolean |
validate(java.lang.Object value) |
Determine whether a value is valid for this
DataSourceProperty . |
java.lang.String name()
DataSourceProperty
.DataSourceProperty
java.lang.Class<?> range()
DataSourceProperty
. Any value
set for this property must be assignable to this type.DataSourceProperty
default boolean validate(java.lang.Object value)
DataSourceProperty
.
Returns true
if value
is valid and false
otherwise.value
- a value for this DataSourceProperty
true
iff value
is valid for this
DataSourceProperty
java.lang.Object defaultValue()
null
if there is no default valueboolean isSensitive()
DataSourceProperty
is contains sensitive
information such as a password or encryption key.default void configure(DataSource ds, java.lang.Object value)
DataSource
as appropriate for the given value
of this DataSourceProperty
. This is primarily for the use of user
defined properties.ds
- the DataSource
to configurevalue
- the value of this propertyReport a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
DRAFT JDBC 4.4 EA5