mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 11:45:31 +01:00
Made all DatabaseHandlers' constructors package-private
This commit is contained in:
parent
77258b2770
commit
dcba17f569
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user