Package dev.crafty.core.storage
Class StorageProviderFactory.StorageConfig
java.lang.Object
dev.crafty.core.storage.StorageProviderFactory.StorageConfig
- Enclosing class:
StorageProviderFactory
Configuration for storage providers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforMongoDb(String connectionUrl, String databaseName) Creates a new StorageConfig for MySQL storage.forPostgres(String tableName, String connectionUrl, String username, String password) Creates a new StorageConfig for PostgreSQL storage.Creates a new StorageConfig for YAML storage.
-
Constructor Details
-
StorageConfig
public StorageConfig()
-
-
Method Details
-
forYaml
Creates a new StorageConfig for YAML storage.- Parameters:
directory- The directory to store files in- Returns:
- The storage config
-
forMongoDb
public static StorageProviderFactory.StorageConfig forMongoDb(String connectionUrl, String databaseName) -
forPostgres
public static StorageProviderFactory.StorageConfig forPostgres(String tableName, String connectionUrl, String username, String password) Creates a new StorageConfig for PostgreSQL storage.- Parameters:
tableName- The name of the table to store objects inconnectionUrl- The JDBC connection URLusername- The database usernamepassword- The database password- Returns:
- The storage config
-
forMySql
public static StorageProviderFactory.StorageConfig forMySql(String tableName, String connectionUrl, String username, String password) Creates a new StorageConfig for MySQL storage.- Parameters:
tableName- The name of the table to store objects inconnectionUrl- The JDBC connection URLusername- The database usernamepassword- The database password- Returns:
- The storage config
-