Class SQLiteConnector
java.lang.Object
dev.esophose.playerparticles.database.SQLiteConnector
- All Implemented Interfaces:
DatabaseConnector
public class SQLiteConnector extends java.lang.Object implements DatabaseConnector
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.esophose.playerparticles.database.DatabaseConnector
DatabaseConnector.ConnectionCallback
-
Constructor Summary
Constructors Constructor Description SQLiteConnector(org.bukkit.plugin.Plugin plugin)
-
Method Summary
Modifier and Type Method Description void
closeConnection()
Closes all open connections to the databasevoid
connect(DatabaseConnector.ConnectionCallback callback)
Executes a callback with a Connection passed and automatically closes it when finishedboolean
isInitialized()
Checks if the connection to the database has been created
-
Constructor Details
-
SQLiteConnector
public SQLiteConnector(org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
isInitialized
public boolean isInitialized()Description copied from interface:DatabaseConnector
Checks if the connection to the database has been created- Specified by:
isInitialized
in interfaceDatabaseConnector
- Returns:
- true if the connection is created, otherwise false
-
closeConnection
public void closeConnection()Description copied from interface:DatabaseConnector
Closes all open connections to the database- Specified by:
closeConnection
in interfaceDatabaseConnector
-
connect
Description copied from interface:DatabaseConnector
Executes a callback with a Connection passed and automatically closes it when finished- Specified by:
connect
in interfaceDatabaseConnector
- Parameters:
callback
- The callback to execute once the connection is retrieved
-