public static enum StorageConfig.Method extends java.lang.Enum<StorageConfig.Method>
| Enum Constant and Description |
|---|
H2
H2's storage method
|
MARIADB
MariaDB's storage method
|
MYSQL
MySQL's storage method
|
POSTGRESQL
PostgreSQL's storage method
|
SQLITE
SQLite's storage method
|
| Modifier and Type | Field and Description |
|---|---|
@Nullable java.lang.Integer |
defaultPort
The default port for the method (only for remote connections)
|
@NotNull java.util.function.Function<DataManager,SQLDialect> |
dialect
The
SQL dialect constructor for the method |
@Nullable RuntimeLibrary |
library
The library to be downloaded for the method (if any)
|
@NotNull java.util.function.Function<java.io.File,java.lang.String> |
url
Local: The full URL for the method
Remote: The beginning of the URL for the method |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull StorageConfig.Method |
get(@Nullable java.lang.String name)
Get the
StorageConfig.Method with the given name |
@NotNull java.lang.String |
getDriver(@NotNull AnnoyingPlugin plugin)
Get the driver class name for the method
|
boolean |
isRemote()
Whether the method is remote (just checks if
defaultPort is not null) |
static StorageConfig.Method |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StorageConfig.Method[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StorageConfig.Method H2
public static final StorageConfig.Method SQLITE
public static final StorageConfig.Method MYSQL
public static final StorageConfig.Method MARIADB
public static final StorageConfig.Method POSTGRESQL
@NotNull public final @NotNull java.util.function.Function<DataManager,SQLDialect> dialect
SQL dialect constructor for the method@NotNull public final @NotNull java.util.function.Function<java.io.File,java.lang.String> url
@Nullable public final @Nullable java.lang.Integer defaultPort
@Nullable public final @Nullable RuntimeLibrary library
public static StorageConfig.Method[] values()
for (StorageConfig.Method c : StorageConfig.Method.values()) System.out.println(c);
public static StorageConfig.Method valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null@NotNull
public @NotNull java.lang.String getDriver(@NotNull
@NotNull AnnoyingPlugin plugin)
plugin - the plugin to get the driver forpublic boolean isRemote()
defaultPort is not null)true if the method is remote, false otherwise@NotNull public static @NotNull StorageConfig.Method get(@Nullable @Nullable java.lang.String name)
StorageConfig.Method with the given namename - the name of the methodStorageConfig.Method with the given name, or H2 if the name is null or invalid