Stay organized with collections
Save and categorize content based on your preferences.
DriverPropertyInfo
public
class
DriverPropertyInfo
extends Object
Driver properties for making a connection. The
DriverPropertyInfo
class is of interest only to advanced programmers
who need to interact with a Driver via the method
getDriverProperties
to discover
and supply properties for connections.
Summary
Fields |
public
String[] |
choices
An array of possible values if the value for the field
DriverPropertyInfo.value may be selected
from a particular set of values; otherwise null.
|
public
String |
description
A brief description of the property, which may be null.
|
public
String |
name
The name of the property.
|
public
boolean |
required
The required field is true if a value must be
supplied for this property
during Driver.connect and false otherwise.
|
public
String |
value
The value field specifies the current value of
the property, based on a combination of the information
supplied to the method getPropertyInfo , the
Java environment, and the driver-supplied default values.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Fields
choices
public String[] choices
An array of possible values if the value for the field
DriverPropertyInfo.value
may be selected
from a particular set of values; otherwise null.
description
public String description
A brief description of the property, which may be null.
name
public String name
The name of the property.
required
public boolean required
The required
field is true
if a value must be
supplied for this property
during Driver.connect
and false
otherwise.
value
public String value
The value
field specifies the current value of
the property, based on a combination of the information
supplied to the method getPropertyInfo
, the
Java environment, and the driver-supplied default values. This field
may be null if no value is known.
Public constructors
DriverPropertyInfo
public DriverPropertyInfo (String name,
String value)
Constructs a DriverPropertyInfo
object with a given
name and value. The description
and choices
are intialized to null
and required
is initialized
to false
.
Parameters |
name |
String : the name of the property |
value |
String : the current value, which may be null |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DriverPropertyInfo\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Fields](#lfields) \\| [Ctors](#pubctors) \\| [Inherited Methods](#inhmethods) \n\nDriverPropertyInfo\n==================\n\n\n`\npublic\n\n\nclass\nDriverPropertyInfo\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|-----------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | java.sql.DriverPropertyInfo |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\nDriver properties for making a connection. The\n`DriverPropertyInfo` class is of interest only to advanced programmers\nwho need to interact with a Driver via the method\n`getDriverProperties` to discover\nand supply properties for connections.\n\nSummary\n-------\n\n| ### Fields ||\n|---------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public `[String[]](/reference/java/lang/String) | [choices](/reference/java/sql/DriverPropertyInfo#choices) An array of possible values if the value for the field `DriverPropertyInfo.value` may be selected from a particular set of values; otherwise null. |\n| ` public `[String](/reference/java/lang/String) | [description](/reference/java/sql/DriverPropertyInfo#description) A brief description of the property, which may be null. |\n| ` public `[String](/reference/java/lang/String) | [name](/reference/java/sql/DriverPropertyInfo#name) The name of the property. |\n| ` public boolean` | [required](/reference/java/sql/DriverPropertyInfo#required) The `required` field is `true` if a value must be supplied for this property during `Driver.connect` and `false` otherwise. |\n| ` public `[String](/reference/java/lang/String) | [value](/reference/java/sql/DriverPropertyInfo#value) The `value` field specifies the current value of the property, based on a combination of the information supplied to the method `getPropertyInfo`, the Java environment, and the driver-supplied default values. |\n\n| ### Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[DriverPropertyInfo](/reference/java/sql/DriverPropertyInfo#DriverPropertyInfo(java.lang.String,%20java.lang.String))`(`[String](/reference/java/lang/String)` name, `[String](/reference/java/lang/String)` value) ` Constructs a `DriverPropertyInfo` object with a given name and value. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nFields\n------\n\n### choices\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic String[] choices\n```\n\nAn array of possible values if the value for the field\n`DriverPropertyInfo.value` may be selected\nfrom a particular set of values; otherwise null.\n\n\u003cbr /\u003e\n\n### description\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic String description\n```\n\nA brief description of the property, which may be null.\n\n\u003cbr /\u003e\n\n### name\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic String name\n```\n\nThe name of the property.\n\n\u003cbr /\u003e\n\n### required\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic boolean required\n```\n\nThe `required` field is `true` if a value must be\nsupplied for this property\nduring `Driver.connect` and `false` otherwise.\n\n\u003cbr /\u003e\n\n### value\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic String value\n```\n\nThe `value` field specifies the current value of\nthe property, based on a combination of the information\nsupplied to the method `getPropertyInfo`, the\nJava environment, and the driver-supplied default values. This field\nmay be null if no value is known.\n\n\u003cbr /\u003e\n\nPublic constructors\n-------------------\n\n### DriverPropertyInfo\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic DriverPropertyInfo (String name, \n String value)\n```\n\nConstructs a `DriverPropertyInfo` object with a given\nname and value. The `description` and `choices`\nare intialized to `null` and `required` is initialized\nto `false`.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|-------------------------------------------------------|\n| `name` | `String`: the name of the property \u003cbr /\u003e |\n| `value` | `String`: the current value, which may be null \u003cbr /\u003e |"]]