// Init default values:
// Default database backend
- this.properties.put("org.mxchange.addressbook.database.backendType", "base64csv"); //NOI18N
+ this.properties.put("database.backendType", "base64csv"); //NOI18N
// For MySQL backend
- this.properties.put("org.mxchange.addressbook.database.mysql.host", "localhost"); //NOI18N
- this.properties.put("org.mxchange.addressbook.database.mysql.dbname", "test"); //NOI18N
- this.properties.put("org.mxchange.addressbook.database.mysql.login", ""); //NOI18N
- this.properties.put("org.mxchange.addressbook.database.mysql.password", ""); //NOI18N
+ this.properties.put("database.mysql.host", "localhost"); //NOI18N
+ this.properties.put("database.mysql.dbname", "test"); //NOI18N
+ this.properties.put("database.mysql.login", ""); //NOI18N
+ this.properties.put("database.mysql.password", ""); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
* @return Propety value
*/
protected String getProperty (final String key) {
- return this.properties.getProperty(key);
+ return this.properties.getProperty(String.format("org.mxchange.addressbook.%s", key)); //NOI18N
}
/**
// Generate connection string
String connect = String.format("jdbc:mysql://%s/%s", //NOI18N
- this.getProperty("org.mxchange.addressbook.database.mysql.host"), //NOI18N
- this.getProperty("org.mxchange.addressbook.database.mysql.dbname") //NOI18N
+ this.getProperty("database.mysql.host"), //NOI18N
+ this.getProperty("database.mysql.dbname") //NOI18N
);
// Debug message
// Now get a connection instance back
MySqlDatabaseBackend.connection = DriverManager.getConnection(
connect,
- this.getProperty("org.mxchange.addressbook.database.mysql.login"), //NOI18N
- this.getProperty("org.mxchange.addressbook.database.mysql.password") //NOI18N
+ this.getProperty("database.mysql.login"), //NOI18N
+ this.getProperty("database.mysql.password") //NOI18N
);
// Trace message