- All Known Implementing Classes:
SQLiteDatabaseConfig
public interface DatabaseConfig
Interface for database configuration and operations.
Defines the contract for accessing, initializing, and managing database connections.
Implementations provide database-specific functionality while sharing a common interface.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic voidbackup()Creates a backup of the current database.static voidCloses the data source, releasing any resources if necessary.static DataSourceGets the configured data source for database connections.static voidInitializes the data source with appropriate configuration settings.static voidinitializeSchema(Connection conn) Initializes the database schema for a new or existing database.
-
Method Details
-
getDataSource
Gets the configured data source for database connections.- Returns:
- The data source to use for obtaining database connections
-
initializeSchema
Initializes the database schema for a new or existing database.- Parameters:
conn- An open database connection
-
initializeDataSource
static void initializeDataSource()Initializes the data source with appropriate configuration settings. -
backup
static void backup()Creates a backup of the current database. Implementation-specific method for database backup. -
closeDataSource
static void closeDataSource()Closes the data source, releasing any resources if necessary. Should be called when the application is shutting down.
-