home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / java / sql / DriverPropertyInfo.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  2.2 KB  |  72 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)DriverPropertyInfo.java    1.15 98/09/27
  3.  *
  4.  * Copyright 1996-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.sql;
  16.  
  17. /**
  18.  * <p>Driver properties for making a connection. The
  19.  * <code>DriverPropertyInfo</code> class is of interest only to advanced programmers
  20.  * who need to interact with a Driver via the method
  21.  * <code>getDriverProperties</code> to discover
  22.  * and supply properties for connections.
  23.  */
  24.  
  25. public class DriverPropertyInfo {
  26.  
  27.     /**
  28.      * Constructs a <code>DriverPropertyInfo</code> object with a name and value;
  29.      * other members default to their initial values.
  30.      *
  31.      * @param name the name of the property
  32.      * @param value the current value, which may be null
  33.      */
  34.     public DriverPropertyInfo(String name, String value) {
  35.         this.name = name;
  36.         this.value = value;
  37.     }
  38.  
  39.     /**
  40.      * The name of the property.
  41.      */
  42.     public String name;
  43.  
  44.     /**
  45.      * A brief description of the property, which may be null.
  46.      */
  47.     public String description = null;
  48.  
  49.     /**
  50.      * The <code>required</code> field is <code>true</code> if a value must be 
  51.      * supplied for this property
  52.      * during <code>Driver.connect</code> and <code>false</code> otherwise.
  53.      */
  54.     public boolean required = false;
  55.  
  56.     /**
  57.      * The <code>value</code> field specifies the current value of 
  58.      * the property, based on a combination of the information
  59.      * supplied to the method <code>getPropertyInfo</code>, the
  60.      * Java environment, and the driver-supplied default values.  This field
  61.      * may be null if no value is known.
  62.      */
  63.     public String value = null;
  64.  
  65.     /**
  66.      * An array of possible values if the value for the field 
  67.      * <code>DriverPropertyInfo.value</code> may be selected
  68.      * from a particular set of values; otherwise null.
  69.      */
  70.     public String[] choices = null;
  71. }
  72.