public enum StorageMethod extends java.lang.Enum<StorageMethod>
| Modifier and Type | Class and Description |
|---|---|
static interface |
StorageMethod.DialectFunction
A function to create a new
Dialect |
| Enum Constant and Description |
|---|
H2
H2 storage method
|
JSON
JSON storage method
|
MARIADB
MariaDB storage method
|
MYSQL
MySQL storage method
|
POSTGRESQL
PostgreSQL storage method
|
SQLITE
SQLite storage method
|
YAML
YAML storage method
|
| Modifier and Type | Field and Description |
|---|---|
@Nullable java.lang.Integer |
defaultPort
The default port for the method (only for remote connections)
|
@NotNull StorageMethod.DialectFunction |
dialect
The
Dialect constructor for the method |
@Nullable RuntimeLibrary |
library
The library to be downloaded for the method (if any)
|
@Nullable java.util.function.Function<java.io.File,java.lang.String> |
url
Local SQL: The full URL for the method
Remote SQL: The beginning of the URL for the method Local Readable: null |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull StorageMethod |
get(@Nullable java.lang.String name)
Get the
StorageMethod with the given name |
@NotNull java.util.Optional<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) |
boolean |
isSQL()
Whether the method is SQL (just checks if
driver is not null) |
static StorageMethod |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StorageMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StorageMethod H2
public static final StorageMethod SQLITE
public static final StorageMethod MYSQL
public static final StorageMethod MARIADB
public static final StorageMethod POSTGRESQL
public static final StorageMethod JSON
public static final StorageMethod YAML
@NotNull public final @NotNull StorageMethod.DialectFunction dialect
Dialect constructor for the method@Nullable public final @Nullable java.util.function.Function<java.io.File,java.lang.String> url
null@Nullable public final @Nullable java.lang.Integer defaultPort
@Nullable public final @Nullable RuntimeLibrary library
public static StorageMethod[] values()
for (StorageMethod c : StorageMethod.values()) System.out.println(c);
public static StorageMethod 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.util.Optional<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 otherwisepublic boolean isSQL()
driver is not null)true if the method is SQL, false otherwise@NotNull public static @NotNull StorageMethod get(@Nullable @Nullable java.lang.String name)
StorageMethod with the given namename - the name of the methodStorageMethod with the given name, or H2 if the name is null or invalid