updated coding rules.
[utils] / system / general / src / test / java / org / wamblee / system / components / DatabaseComponent.java
index afcc581aba29c2a328ab35962cf8c180ea3ab15d..10e679589d95a1c2bd0ca91d3b94c9822eb21367 100644 (file)
@@ -29,36 +29,36 @@ public class DatabaseComponent extends AbstractComponent<Database> {
     
     private static ProvidedInterface DB_PROPS = new DefaultProvidedInterface("dbProps", Properties.class);
     
-    private Database _database; 
+    private Database database; 
     
     public DatabaseComponent(String aName, Database aDatabase) { 
         super(aName); 
-        _database = aDatabase;
+        database = aDatabase;
         addProvidedInterface(DB_PROPS);
     }
 
     @Override
     protected Database doStart(Scope aScope) {
-        _database.start(); 
+        database.start(); 
         
         Properties props = new Properties();
-        if ( _database instanceof DerbyDatabase ) { 
+        if ( database instanceof DerbyDatabase ) { 
             props.put("database.type", DatabaseType.DERBY.toString());
         } else { 
-            throw new IllegalArgumentException("Unknown database type " + _database); 
+            throw new IllegalArgumentException("Unknown database type " + database); 
         }
-        //props.put("database.driver", _database.getDriverClassName());
-        props.put("database.url", _database.getJdbcUrl());
-        props.put("database.username", _database.getUsername());
-        props.put("database.password", _database.getPassword());
+        //props.put("database.driver", database.getDriverClassName());
+        props.put("database.url", database.getJdbcUrl());
+        props.put("database.username", database.getUsername());
+        props.put("database.password", database.getPassword());
 
         addInterface(DB_PROPS, props, aScope);
-        return _database; 
+        return database; 
     }
 
     @Override
     protected void doStop(Database aRuntime) {
-        _database.stop();
+        database.stop();
     }
 
 }