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 voidcloseConnection()Closes all open connections to the databasevoidconnect(DatabaseConnector.ConnectionCallback callback)Executes a callback with a Connection passed and automatically closes it when finishedbooleanisInitialized()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:DatabaseConnectorChecks if the connection to the database has been created- Specified by:
isInitializedin interfaceDatabaseConnector- Returns:
- true if the connection is created, otherwise false
-
closeConnection
public void closeConnection()Description copied from interface:DatabaseConnectorCloses all open connections to the database- Specified by:
closeConnectionin interfaceDatabaseConnector
-
connect
Description copied from interface:DatabaseConnectorExecutes a callback with a Connection passed and automatically closes it when finished- Specified by:
connectin interfaceDatabaseConnector- Parameters:
callback- The callback to execute once the connection is retrieved
-