Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/sql/DriverPropertyInfo.java
38829 views
/*1* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.sql;2627/**28* <p>Driver properties for making a connection. The29* <code>DriverPropertyInfo</code> class is of interest only to advanced programmers30* who need to interact with a Driver via the method31* <code>getDriverProperties</code> to discover32* and supply properties for connections.33*/3435public class DriverPropertyInfo {3637/**38* Constructs a <code>DriverPropertyInfo</code> object with a given39* name and value. The <code>description</code> and <code>choices</code>40* are initialized to <code>null</code> and <code>required</code> is initialized41* to <code>false</code>.42*43* @param name the name of the property44* @param value the current value, which may be null45*/46public DriverPropertyInfo(String name, String value) {47this.name = name;48this.value = value;49}5051/**52* The name of the property.53*/54public String name;5556/**57* A brief description of the property, which may be null.58*/59public String description = null;6061/**62* The <code>required</code> field is <code>true</code> if a value must be63* supplied for this property64* during <code>Driver.connect</code> and <code>false</code> otherwise.65*/66public boolean required = false;6768/**69* The <code>value</code> field specifies the current value of70* the property, based on a combination of the information71* supplied to the method <code>getPropertyInfo</code>, the72* Java environment, and the driver-supplied default values. This field73* may be null if no value is known.74*/75public String value = null;7677/**78* An array of possible values if the value for the field79* <code>DriverPropertyInfo.value</code> may be selected80* from a particular set of values; otherwise null.81*/82public String[] choices = null;83}848586