author | psadhukhan |
Fri, 09 Nov 2018 09:29:43 +0530 | |
changeset 52543 | 3853631e6a07 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
21278
diff
changeset
|
2 |
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.sql; |
|
27 |
||
28 |
/** |
|
29 |
* <p>Driver properties for making a connection. The |
|
30 |
* <code>DriverPropertyInfo</code> class is of interest only to advanced programmers |
|
31 |
* who need to interact with a Driver via the method |
|
32 |
* <code>getDriverProperties</code> to discover |
|
33 |
* and supply properties for connections. |
|
44256 | 34 |
* |
35 |
* @since 1.1 |
|
2 | 36 |
*/ |
37 |
||
38 |
public class DriverPropertyInfo { |
|
39 |
||
40 |
/** |
|
41 |
* Constructs a <code>DriverPropertyInfo</code> object with a given |
|
42 |
* name and value. The <code>description</code> and <code>choices</code> |
|
21278 | 43 |
* are initialized to <code>null</code> and <code>required</code> is initialized |
2 | 44 |
* to <code>false</code>. |
45 |
* |
|
46 |
* @param name the name of the property |
|
47 |
* @param value the current value, which may be null |
|
48 |
*/ |
|
49 |
public DriverPropertyInfo(String name, String value) { |
|
50 |
this.name = name; |
|
51 |
this.value = value; |
|
52 |
} |
|
53 |
||
54 |
/** |
|
55 |
* The name of the property. |
|
56 |
*/ |
|
57 |
public String name; |
|
58 |
||
59 |
/** |
|
60 |
* A brief description of the property, which may be null. |
|
61 |
*/ |
|
62 |
public String description = null; |
|
63 |
||
64 |
/** |
|
65 |
* The <code>required</code> field is <code>true</code> if a value must be |
|
66 |
* supplied for this property |
|
67 |
* during <code>Driver.connect</code> and <code>false</code> otherwise. |
|
68 |
*/ |
|
69 |
public boolean required = false; |
|
70 |
||
71 |
/** |
|
72 |
* The <code>value</code> field specifies the current value of |
|
73 |
* the property, based on a combination of the information |
|
74 |
* supplied to the method <code>getPropertyInfo</code>, the |
|
75 |
* Java environment, and the driver-supplied default values. This field |
|
76 |
* may be null if no value is known. |
|
77 |
*/ |
|
78 |
public String value = null; |
|
79 |
||
80 |
/** |
|
81 |
* An array of possible values if the value for the field |
|
82 |
* <code>DriverPropertyInfo.value</code> may be selected |
|
83 |
* from a particular set of values; otherwise null. |
|
84 |
*/ |
|
85 |
public String[] choices = null; |
|
86 |
} |