mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-17 21:51:41 +01:00
Prepared possible MongoDB implementation
This commit is contained in:
parent
465d85f358
commit
a419a66939
@ -4,6 +4,7 @@ import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.config.Settings;
|
||||
import us.tastybento.bskyblock.database.flatfile.FlatFileDatabase;
|
||||
import us.tastybento.bskyblock.database.managers.AbstractDatabaseHandler;
|
||||
import us.tastybento.bskyblock.database.mongodb.MongoDBDatabase;
|
||||
import us.tastybento.bskyblock.database.mysql.MySQLDatabase;
|
||||
import us.tastybento.bskyblock.database.sqlite.SQLiteDatabase;
|
||||
|
||||
@ -23,6 +24,7 @@ public abstract class BSBDatabase {
|
||||
|
||||
public enum DatabaseType{
|
||||
FLATFILE(new FlatFileDatabase()),
|
||||
MONGODB(new MongoDBDatabase()),
|
||||
MYSQL(new MySQLDatabase()),
|
||||
SQLITE(new SQLiteDatabase());
|
||||
|
||||
@ -41,6 +43,4 @@ public abstract class BSBDatabase {
|
||||
*/
|
||||
public abstract AbstractDatabaseHandler<?> getHandler(BSkyBlock plugin, Class<?> type);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -52,7 +52,6 @@ public abstract class AbstractDatabaseHandler<T> {
|
||||
* like host/port/database/user/password
|
||||
*/
|
||||
protected AbstractDatabaseHandler(BSkyBlock plugin, Class<T> type, DatabaseConnecter databaseConnecter) {
|
||||
|
||||
this.plugin = plugin;
|
||||
this.databaseConnecter = databaseConnecter;
|
||||
this.type = type;
|
||||
|
@ -0,0 +1,14 @@
|
||||
package us.tastybento.bskyblock.database.mongodb;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.database.BSBDatabase;
|
||||
import us.tastybento.bskyblock.database.managers.AbstractDatabaseHandler;
|
||||
|
||||
public class MongoDBDatabase extends BSBDatabase{
|
||||
|
||||
@Override
|
||||
public AbstractDatabaseHandler<?> getHandler(BSkyBlock plugin, Class<?> type) {
|
||||
return null; //TODO
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user