01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package java.sql;
19:
20: /**
21: * A class holding information about Driver Properties for making a Connection.
22: * This class is returned from the <code>Driver.getDriverProperties</code>
23: * method and is useful in using Connections in an advanced way.
24: */
25: public class DriverPropertyInfo {
26:
27: /**
28: * If the value member can be chosen from a set of possible values, they are
29: * contained here. Otherwise choices is null.
30: */
31: public String[] choices;
32:
33: /**
34: * A description of the property. May be null.
35: */
36: public String description;
37:
38: /**
39: * The name of the property.
40: */
41: public String name;
42:
43: /**
44: * True when the value member must be provided during Driver.connect. False
45: * otherwise.
46: */
47: public boolean required;
48:
49: /**
50: * The current value associated with this property. This is based on the
51: * data gathered by the getPropertyInfo method, the general Java environment
52: * and the default values for the driver.
53: */
54: public String value;
55:
56: /**
57: * Creates a DriverPropertyInfo instance with the supplied name and value.
58: * Other members take their default values.
59: *
60: * @param name
61: * The property name
62: * @param value
63: * The property value
64: */
65: public DriverPropertyInfo(String name, String value) {
66: this .name = name;
67: this .value = value;
68: this .choices = null;
69: this .description = null;
70: this .required = false;
71: }
72: }
|