Class Repository
java.lang.Object
com.zetaplugins.essentialz.storage.repositories.Repository
- Direct Known Subclasses:
SQLIgnoresRepository,SQLPlayerRepository,SQLWarpsRepository
Abstract class for repositories handling database operations.
-
Constructor Summary
ConstructorsConstructorDescriptionRepository(EssentialZ plugin, ConnectionPool connectionPool) Constructor to initialize the Repository with the plugin instance and connection pool. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionGets a connection from the connection pool.protected EssentialZabstract voidInitializes the database table(s) for the repository.
-
Constructor Details
-
Repository
Constructor to initialize the Repository with the plugin instance and connection pool.- Parameters:
plugin- The EssentialZ plugin instance.connectionPool- The connection pool for database connections.
-
-
Method Details
-
getConnection
Gets a connection from the connection pool.- Returns:
- A database connection.
- Throws:
SQLException- If a database access error occurs.
-
getPlugin
-
initializeTable
public abstract void initializeTable()Initializes the database table(s) for the repository.
-