src/java.sql/share/classes/java/sql/DriverPropertyInfo.java
author kbarrett
Fri, 15 Nov 2019 16:58:29 -0500
changeset 59115 a129f10e1b9a
parent 47216 71c04702a3d5
permissions -rw-r--r--
8233280: Remove GCLockerInvokesConcurrent Summary: Remove use and make option obsolete. Reviewed-by: tschatzl, sjohanss
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.sql;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * <p>Driver properties for making a connection. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * <code>DriverPropertyInfo</code> class is of interest only to advanced programmers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * who need to interact with a Driver via the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * <code>getDriverProperties</code> to discover
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * and supply properties for connections.
44256
12050b22e372 8176721: @since value errors java.sql module
mli
parents: 25859
diff changeset
    34
 *
12050b22e372 8176721: @since value errors java.sql module
mli
parents: 25859
diff changeset
    35
 * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
public class DriverPropertyInfo {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
     * Constructs a <code>DriverPropertyInfo</code> object with a  given
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
     * name and value.  The <code>description</code> and <code>choices</code>
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 5506
diff changeset
    43
     * are initialized to <code>null</code> and <code>required</code> is initialized
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
     * to <code>false</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
     * @param name the name of the property
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
     * @param value the current value, which may be null
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    public DriverPropertyInfo(String name, String value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        this.name = name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
        this.value = value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     * The name of the property.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    public String name;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     * A brief description of the property, which may be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    public String description = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * The <code>required</code> field is <code>true</code> if a value must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
         * supplied for this property
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * during <code>Driver.connect</code> and <code>false</code> otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    public boolean required = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * The <code>value</code> field specifies the current value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
         * the property, based on a combination of the information
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
         * supplied to the method <code>getPropertyInfo</code>, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     * Java environment, and the driver-supplied default values.  This field
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * may be null if no value is known.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    public String value = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * An array of possible values if the value for the field
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
         * <code>DriverPropertyInfo.value</code> may be selected
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
         * from a particular set of values; otherwise null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    public String[] choices = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
}