1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java Sun May 17 13:15:21 2015 +0200
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java Sun May 17 13:51:40 2015 +0200
1.3 @@ -32,10 +32,30 @@
1.4 public class DatabaseDefinition implements NameIdentified {
1.5
1.6 private static final Logger log = Logger.getLogger(DatabaseDefinition.class.getName());
1.7 + /**
1.8 + * database name in SQL-DK configuration
1.9 + */
1.10 private String name;
1.11 + /**
1.12 + * JDBC URL
1.13 + */
1.14 private String url;
1.15 + /**
1.16 + * JDBC user name
1.17 + */
1.18 private String userName;
1.19 + /**
1.20 + * JDBC password
1.21 + */
1.22 private String password;
1.23 + /**
1.24 + * optional JDBC driver – if empty, the DriverManager is used to lookup specific Driver for
1.25 + * given URL
1.26 + */
1.27 + private String driver;
1.28 + /**
1.29 + * JDBC properties
1.30 + */
1.31 private Properties properties = new Properties();
1.32
1.33 @XmlElement(name = "name", namespace = CONFIGURATION)
1.34 @@ -75,6 +95,14 @@
1.35 this.password = password;
1.36 }
1.37
1.38 + public String getDriver() {
1.39 + return driver;
1.40 + }
1.41 +
1.42 + public void setDriver(String driver) {
1.43 + this.driver = driver;
1.44 + }
1.45 +
1.46 @XmlElement(name = "property", namespace = CONFIGURATION)
1.47 public Properties getProperties() {
1.48 return properties;
1.49 @@ -87,7 +115,7 @@
1.50 /**
1.51 * @param properties ad-hoc properties from CLI options (for the JDBC driver)
1.52 * @param jmxBean JMX management bean for progress reporting | null = disable JMX
1.53 - * @return
1.54 + * @return
1.55 * @throws java.sql.SQLException
1.56 */
1.57 public DatabaseConnection connect(Properties properties, ConnectionManagement jmxBean) throws SQLException {
1.58 @@ -96,7 +124,7 @@
1.59
1.60 /**
1.61 * @param properties
1.62 - * @return
1.63 + * @return
1.64 * @throws java.sql.SQLException
1.65 * @see #connect(info.globalcode.sql.dk.configuration.Properties, java.lang.String)
1.66 * With disabled JMX reporting.