* 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();
}