- java.lang.Object
-
- java.lang.Enum<AdbaDataSourceProperty>
-
- jdk.incubator.sql2.AdbaDataSourceProperty
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AdbaDataSourceProperty>
,DataSourceProperty
public enum AdbaDataSourceProperty extends java.lang.Enum<AdbaDataSourceProperty> implements DataSourceProperty
Properties that apply to the DataSource as a whole, not to the individualSession
s that theDataSource
creates.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MAX_IDLE_RESOURCES
MAX_RESOURCES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
defaultValue()
Return the value for this property to use if no other value is set.boolean
isSensitive()
Returns true if thisDataSourceProperty
is contains sensitive information such as a password or encryption key.java.lang.Class<?>
range()
Return the type of the value of thisDataSourceProperty
.boolean
validate(java.lang.Object value)
Determine whether a value is valid for thisDataSourceProperty
.static AdbaDataSourceProperty
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AdbaDataSourceProperty[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface jdk.incubator.sql2.DataSourceProperty
configure, name
-
-
-
-
Enum Constant Detail
-
MAX_RESOURCES
public static final AdbaDataSourceProperty MAX_RESOURCES
-
MAX_IDLE_RESOURCES
public static final AdbaDataSourceProperty MAX_IDLE_RESOURCES
-
-
Method Detail
-
values
public static AdbaDataSourceProperty[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AdbaDataSourceProperty c : AdbaDataSourceProperty.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AdbaDataSourceProperty valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
range
public java.lang.Class<?> range()
Description copied from interface:DataSourceProperty
Return the type of the value of thisDataSourceProperty
. Any value set for this property must be assignable to this type.- Specified by:
range
in interfaceDataSourceProperty
- Returns:
- the type of the values of this
DataSourceProperty
-
defaultValue
public java.lang.Object defaultValue()
Description copied from interface:DataSourceProperty
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.- Specified by:
defaultValue
in interfaceDataSourceProperty
- Returns:
- the default value or
null
if there is no default value
-
isSensitive
public boolean isSensitive()
Description copied from interface:DataSourceProperty
Returns true if thisDataSourceProperty
is contains sensitive information such as a password or encryption key.- Specified by:
isSensitive
in interfaceDataSourceProperty
- Returns:
- true iff this is sensitive
-
validate
public boolean validate(java.lang.Object value)
Description copied from interface:DataSourceProperty
Determine whether a value is valid for thisDataSourceProperty
. Returnstrue
ifvalue
is valid andfalse
otherwise.- Specified by:
validate
in interfaceDataSourceProperty
- Parameters:
value
- a value for thisDataSourceProperty
- Returns:
true
iffvalue
is valid for thisDataSourceProperty
-
-