home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / DriverPropertyInfo.java < prev    next >
Text File  |  1997-05-20  |  2KB  |  76 lines

  1. /*
  2.  * @(#)DriverPropertyInfo.java    1.5 96/11/23
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  * 
  21.  */
  22.  
  23. package java.sql;
  24.  
  25. /**
  26.  * <p>The DriverPropertyInfo class is only of interest to advanced programmers
  27.  * who need to interact with a Driver via getDriverProperties to discover
  28.  * and supply properties for connections.
  29.  */
  30.  
  31. public class DriverPropertyInfo {
  32.  
  33.     /**
  34.      * Constructor a DriverPropertyInfo with a name and value; other
  35.      * members default to their initial values.
  36.      *
  37.      * @param name the name of the property
  38.      * @param value the current value, which may be null
  39.      */
  40.     public DriverPropertyInfo(String name, String value) {
  41.         this.name = name;
  42.         this.value = value;
  43.     }
  44.  
  45.     /**
  46.      * The name of the property.
  47.      */
  48.     public String name;
  49.  
  50.     /**
  51.      * A brief description of the property.  This may be null.
  52.      */
  53.     public String description = null;
  54.  
  55.     /**
  56.      * "required" is true if a value must be supplied for this property
  57.      * during Driver.connect.  Otherwise the property is optional.
  58.      */
  59.     public boolean required = false;
  60.  
  61.     /**
  62.      * "value" specifies the current value of the property, based on a
  63.      * combination of the information supplied to getPropertyInfo, the
  64.      * Java environment, and driver supplied default values.  This
  65.      * may be null if no value is known.
  66.      */
  67.     public String value = null;
  68.  
  69.     /**
  70.      * If the value may be selected from a particular set of values,
  71.      * then this is an array of the possible values.  Otherwise it should
  72.      * be null.
  73.      */
  74.     public String[] choices = null;
  75. }
  76.