added databasecomponent and now using Derby in the unit tests.
[utils] / support / general / src / test / java / org / wamblee / persistence / Database.java
index 39dffed1f39e43dd6223bb492b7242e941230e79..5b0ae98cb476d390f552590b0c8c0fec5388f7ff 100644 (file)
  * 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.persistence;
 
 import java.sql.Connection;
 import java.sql.SQLException;
 
-
 /**
  * Represents a database.
- *
+ * 
  * @author Erik Brakkee
  */
 public interface Database {
     /**
-     * Starts a database. This call should not block and return
-     * as soon as the database has been started.
-     * @throws Exception
+     * Starts a database. This call should not block and return as soon as the
+     * database has been started.
      */
-    void start(  ) throws Exception;
+    void start();
 
     /**
      * Gets the Jdbc Url to connect to this database.
+     * 
      * @return Jdbc Url.
      */
-    String getJdbcUrl(  );
-    
+    String getJdbcUrl();
+
     /**
-     * Gets the external Jdbc URL to connect to this database from other JVMs. 
+     * Gets the external Jdbc URL to connect to this database from other JVMs.
      */
     String getExternalJdbcUrl();
-    
+
     /**
-     * Gets the driver class name used to connect to the database from another JVM.  
-     * @return Driver class name. 
+     * Gets the driver class name used to connect to the database from another
+     * JVM.
+     * 
+     * @return Driver class name.
      */
-    String getDriverClassName(); 
-    
+    String getDriverClassName();
+
     /**
-     * Gets the username to connect to the database. 
-     * @return username. 
+     * Gets the username to connect to the database.
+     * 
+     * @return username.
      */
-    String getUsername(); 
-    
+    String getUsername();
+
     /**
-     * Gets the password to connect to the database. 
-     * @return password. 
+     * Gets the password to connect to the database.
+     * 
+     * @return password.
      */
-    String getPassword(); 
+    String getPassword();
 
     /**
-     * Creates a new database connection. It is the caller's
-     * responsibility to close this connection.
-     *
+     * Creates a new database connection. It is the caller's responsibility to
+     * close this connection.
+     * 
      * @return Newly created database connection.
      */
-    Connection createConnection(  ) throws SQLException;
+    Connection createConnection() throws SQLException;
 
     /**
      * Stops a database.
-     * @throws Exception
      */
-    void stop(  ) throws Exception;
+    void stop();
 }