Package xyz.srnyx.annoyingapi.storage
Enum Class StorageMethod
- All Implemented Interfaces:
Serializable,Comparable<StorageMethod>,Constable
Available storage methods for the plugin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA function to create a newDialectstatic final recordNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @NotNull StorageMethod.DialectFunctionTheDialectconstructor for the methodfinal @Nullable StorageMethod.SQLInfo -
Method Summary
Modifier and TypeMethodDescriptionbooleanisSQL()Whether the method is SQL (just checks ifsqlInfois notnull)booleanWhether the method is SQL and remote (just checks ifStorageMethod.SQLInfo.defaultPort()is notnull)static StorageMethodReturns the enum constant of this class with the specified name.static StorageMethod[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
H2
-
SQLITE
-
MYSQL
-
MARIADB
-
POSTGRESQL
-
JSON
-
YAML
-
-
Field Details
-
dialect
TheDialectconstructor for the method -
sqlInfo
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isSQL
public boolean isSQL()Whether the method is SQL (just checks ifsqlInfois notnull)- Returns:
trueif the method is SQL,falseotherwise
-
isSQLRemote
public boolean isSQLRemote()Whether the method is SQL and remote (just checks ifStorageMethod.SQLInfo.defaultPort()is notnull)- Returns:
trueif the method is SQL and remote,falseotherwise
-