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