KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > DriverPropertyInfo


1 /*
2  * @(#)DriverPropertyInfo.java 1.21 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.sql;
9
10 /**
11  * <p>Driver properties for making a connection. The
12  * <code>DriverPropertyInfo</code> class is of interest only to advanced programmers
13  * who need to interact with a Driver via the method
14  * <code>getDriverProperties</code> to discover
15  * and supply properties for connections.
16  */

17
18 public class DriverPropertyInfo {
19
20     /**
21      * Constructs a <code>DriverPropertyInfo</code> object with a name and value;
22      * other members default to their initial values.
23      *
24      * @param name the name of the property
25      * @param value the current value, which may be null
26      */

27     public DriverPropertyInfo(String JavaDoc name, String JavaDoc value) {
28         this.name = name;
29         this.value = value;
30     }
31
32     /**
33      * The name of the property.
34      */

35     public String JavaDoc name;
36
37     /**
38      * A brief description of the property, which may be null.
39      */

40     public String JavaDoc description = null;
41
42     /**
43      * The <code>required</code> field is <code>true</code> if a value must be
44      * supplied for this property
45      * during <code>Driver.connect</code> and <code>false</code> otherwise.
46      */

47     public boolean required = false;
48
49     /**
50      * The <code>value</code> field specifies the current value of
51      * the property, based on a combination of the information
52      * supplied to the method <code>getPropertyInfo</code>, the
53      * Java environment, and the driver-supplied default values. This field
54      * may be null if no value is known.
55      */

56     public String JavaDoc value = null;
57
58     /**
59      * An array of possible values if the value for the field
60      * <code>DriverPropertyInfo.value</code> may be selected
61      * from a particular set of values; otherwise null.
62      */

63     public String JavaDoc[] choices = null;
64 }
65
Popular Tags