Heavily refactored DatabaseManager.java and SimpleDatabaseManager.java. Fully refactored DatabaseGoodCasesTest.java and DatabaseBadCasesTest.java.
This commit is contained in:
@@ -4,8 +4,26 @@ import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* A database interface with basic database connectivity
|
||||
* @author Riley Schneider
|
||||
*/
|
||||
public interface Database {
|
||||
public void connect() throws SQLException;
|
||||
public void close() throws SQLException;
|
||||
public void clearDatabase() throws SQLException;
|
||||
/**
|
||||
* Creates a connection to the database
|
||||
* @throws SQLException Thrown if database error occurs
|
||||
*/
|
||||
void connect() throws SQLException;
|
||||
|
||||
/**
|
||||
* Closes a connection to the database
|
||||
* @throws SQLException Thrown if database error occurs
|
||||
*/
|
||||
void close() throws SQLException;
|
||||
|
||||
/**
|
||||
* Clears the entire tables in the database and reset primary key counter to each table
|
||||
* @throws SQLException Thrown if database error occurs
|
||||
*/
|
||||
void clearDatabase() throws SQLException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user