Made all DatabaseHandlers' constructors package-private

This commit is contained in:
Florian CUNY 2018-10-28 15:34:02 +01:00
parent 77258b2770
commit dcba17f569
3 changed files with 3 additions and 5 deletions

View File

@ -64,7 +64,7 @@ public class FlatFileDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
* @param type - class to store in the database
* @param databaseConnector - the database credentials, in this case, just the YAML functions
*/
public FlatFileDatabaseHandler(BentoBox plugin, Class<T> type, DatabaseConnector databaseConnector) {
FlatFileDatabaseHandler(BentoBox plugin, Class<T> type, DatabaseConnector databaseConnector) {
super(plugin, type, databaseConnector);
}

View File

@ -36,7 +36,6 @@ public class MongoDBDatabaseHandler<T> extends AbstractJSONDatabaseHandler<T> {
private MongoCollection<Document> collection;
private DatabaseConnector dbConnecter;
/**
* Handles the connection to the database and creation of the initial database schema (tables) for
* the class that will be stored.
@ -44,7 +43,7 @@ public class MongoDBDatabaseHandler<T> extends AbstractJSONDatabaseHandler<T> {
* @param type - the type of class to be stored in the database. Must inherit DataObject
* @param dbConnecter - authentication details for the database
*/
public MongoDBDatabaseHandler(BentoBox plugin, Class<T> type, DatabaseConnector dbConnecter) {
MongoDBDatabaseHandler(BentoBox plugin, Class<T> type, DatabaseConnector dbConnecter) {
super(plugin, type, dbConnecter);
this.dbConnecter = dbConnecter;

View File

@ -42,7 +42,6 @@ public class MySQLDatabaseHandler<T> extends AbstractJSONDatabaseHandler<T> {
*/
private Connection connection;
/**
* Handles the connection to the database and creation of the initial database schema (tables) for
* the class that will be stored.
@ -50,7 +49,7 @@ public class MySQLDatabaseHandler<T> extends AbstractJSONDatabaseHandler<T> {
* @param type - the type of class to be stored in the database. Must inherit DataObject
* @param dbConnecter - authentication details for the database
*/
public MySQLDatabaseHandler(BentoBox plugin, Class<T> type, DatabaseConnector dbConnecter) {
MySQLDatabaseHandler(BentoBox plugin, Class<T> type, DatabaseConnector dbConnecter) {
super(plugin, type, dbConnecter);
connection = (Connection)dbConnecter.createConnection();
// Check if the table exists in the database and if not, create it