package rename for test libraries.
[utils] / system / general / src / test / java / org / wamblee / system / components / DatabaseComponent.java
index e903b9de992735998d51cd3490d44d3a5b16a2e1..fc941724e9a2b215edd45313ba435f4032c3a79b 100644 (file)
@@ -1,55 +1,44 @@
 /*
- * Copyright 2008 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- *
+ * 
  *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */
+ */ 
 package org.wamblee.system.components;
 
-import org.wamblee.support.persistence.Database;
-import org.wamblee.support.persistence.DerbyDatabase;
+import java.util.Properties;
 
 import org.wamblee.system.components.ORMappingConfig.DatabaseType;
 import org.wamblee.system.core.AbstractComponent;
 import org.wamblee.system.core.DefaultProvidedInterface;
 import org.wamblee.system.core.ProvidedInterface;
 import org.wamblee.system.core.Scope;
-
-import java.util.Properties;
-
+import org.wamblee.test.persistence.Database;
+import org.wamblee.test.persistence.DerbyDatabase;
 
 /**
- * DOCUMENT ME!
- *
+ * 
  * @author $author$
  * @version $Revision$
 */
+ */
 public class DatabaseComponent extends AbstractComponent<Database> {
-    /**
-     * DOCUMENT ME!
-     */
-    private static ProvidedInterface DB_PROPS = new DefaultProvidedInterface("dbProps",
-            Properties.class);
+    private static ProvidedInterface DB_PROPS = new DefaultProvidedInterface(
+        "dbProps", Properties.class);
 
-    /**
-     * DOCUMENT ME!
-     */
     private Database database;
 
     /**
      * Creates a new DatabaseComponent object.
-     *
-     * @param aName DOCUMENT ME!
-     * @param aDatabase DOCUMENT ME!
+     * 
      */
     public DatabaseComponent(String aName, Database aDatabase) {
         super(aName);
@@ -57,13 +46,6 @@ public class DatabaseComponent extends AbstractComponent<Database> {
         addProvidedInterface(DB_PROPS);
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aScope DOCUMENT ME!
-     *
-     * @return DOCUMENT ME!
-     */
     @Override
     protected Database doStart(Scope aScope) {
         database.start();
@@ -73,11 +55,11 @@ public class DatabaseComponent extends AbstractComponent<Database> {
         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.driver", database.getDriverClassName());
         props.put("database.url", database.getJdbcUrl());
         props.put("database.username", database.getUsername());
         props.put("database.password", database.getPassword());
@@ -87,11 +69,6 @@ public class DatabaseComponent extends AbstractComponent<Database> {
         return database;
     }
 
-    /**
-     * DOCUMENT ME!
-     *
-     * @param aRuntime DOCUMENT ME!
-     */
     @Override
     protected void doStop(Database aRuntime) {
         database.stop();