java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java
branchv_0
changeset 194 629c9c7eab01
parent 188 54bacc7ed42b
child 203 504c4ba56d1c
--- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java	Sun May 17 13:15:21 2015 +0200
+++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java	Sun May 17 13:51:40 2015 +0200
@@ -32,10 +32,30 @@
 public class DatabaseDefinition implements NameIdentified {
 
 	private static final Logger log = Logger.getLogger(DatabaseDefinition.class.getName());
+	/**
+	 * database name in SQL-DK configuration
+	 */
 	private String name;
+	/**
+	 * JDBC URL
+	 */
 	private String url;
+	/**
+	 * JDBC user name
+	 */
 	private String userName;
+	/**
+	 * JDBC password
+	 */
 	private String password;
+	/**
+	 * optional JDBC driver – if empty, the DriverManager is used to lookup specific Driver for
+	 * given URL
+	 */
+	private String driver;
+	/**
+	 * JDBC properties
+	 */
 	private Properties properties = new Properties();
 
 	@XmlElement(name = "name", namespace = CONFIGURATION)
@@ -75,6 +95,14 @@
 		this.password = password;
 	}
 
+	public String getDriver() {
+		return driver;
+	}
+
+	public void setDriver(String driver) {
+		this.driver = driver;
+	}
+
 	@XmlElement(name = "property", namespace = CONFIGURATION)
 	public Properties getProperties() {
 		return properties;
@@ -87,7 +115,7 @@
 	/**
 	 * @param properties ad-hoc properties from CLI options (for the JDBC driver)
 	 * @param jmxBean JMX management bean for progress reporting | null = disable JMX
-	 * @return 
+	 * @return
 	 * @throws java.sql.SQLException
 	 */
 	public DatabaseConnection connect(Properties properties, ConnectionManagement jmxBean) throws SQLException {
@@ -96,7 +124,7 @@
 
 	/**
 	 * @param properties
-	 * @return 
+	 * @return
 	 * @throws java.sql.SQLException
 	 * @see #connect(info.globalcode.sql.dk.configuration.Properties, java.lang.String)
 	 * With disabled JMX reporting.