1. /*
  2. * @(#)DriverPropertyInfo.java 1.18 00/02/02
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.sql;
  11. /**
  12. * <p>Driver properties for making a connection. The
  13. * <code>DriverPropertyInfo</code> class is of interest only to advanced programmers
  14. * who need to interact with a Driver via the method
  15. * <code>getDriverProperties</code> to discover
  16. * and supply properties for connections.
  17. */
  18. public class DriverPropertyInfo {
  19. /**
  20. * Constructs a <code>DriverPropertyInfo</code> object with a name and value;
  21. * other members default to their initial values.
  22. *
  23. * @param name the name of the property
  24. * @param value the current value, which may be null
  25. */
  26. public DriverPropertyInfo(String name, String value) {
  27. this.name = name;
  28. this.value = value;
  29. }
  30. /**
  31. * The name of the property.
  32. */
  33. public String name;
  34. /**
  35. * A brief description of the property, which may be null.
  36. */
  37. public String description = null;
  38. /**
  39. * The <code>required</code> field is <code>true</code> if a value must be
  40. * supplied for this property
  41. * during <code>Driver.connect</code> and <code>false</code> otherwise.
  42. */
  43. public boolean required = false;
  44. /**
  45. * The <code>value</code> field specifies the current value of
  46. * the property, based on a combination of the information
  47. * supplied to the method <code>getPropertyInfo</code>, the
  48. * Java environment, and the driver-supplied default values. This field
  49. * may be null if no value is known.
  50. */
  51. public String value = null;
  52. /**
  53. * An array of possible values if the value for the field
  54. * <code>DriverPropertyInfo.value</code> may be selected
  55. * from a particular set of values; otherwise null.
  56. */
  57. public String[] choices = null;
  58. }