Package com.palmergames.bukkit.towny.db
Enum Class DatabaseConfig
- All Implemented Interfaces:
Serializable
,Comparable<DatabaseConfig>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getBoolean
(DatabaseConfig node) String[]
Retrieves the comment for a config pathRetrieves the default value for a config pathstatic int
getInt
(DatabaseConfig node) getRoot()
Retrieves the root for a config optionstatic String
getString
(DatabaseConfig node) static void
loadDatabaseConfig
(Path databaseConfigPath) Loads the database.yml file into memory.static void
setDatabaseDefaults
(Path databaseConfigPath) Builds a new database.yml reading old database.yml data.static void
setDatabaseVersion
(String version) static DatabaseConfig
Returns the enum constant of this class with the specified name.static DatabaseConfig[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DATABASE
-
DATEBASE_VERSION
-
DATABASE_LOAD
-
DATABASE_SAVE
-
DATABASE_SQL_HEADER
-
DATABASE_HOSTNAME
-
DATABASE_PORT
-
DATABASE_DBNAME
-
DATABASE_TABLEPREFIX
-
DATABASE_USERNAME
-
DATABASE_PASSWORD
-
DATABASE_FLAGS
-
DATABASE_SQL_DISABLE_BACKUP_WARNING
-
DATABASE_POOLING_HEADER
-
DATABASE_POOLING_MAX_POOL_SIZE
-
DATABASE_POOLING_MAX_LIFETIME
-
DATABASE_POOLING_CONNECTION_TIMEOUT
-
-
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
-
getRoot
Retrieves the root for a config option- Returns:
- The root for a config option
-
getDefault
Retrieves the default value for a config path- Returns:
- The default value for a config path
-
getComments
Retrieves the comment for a config path- Returns:
- The comments for a config path
-
loadDatabaseConfig
Loads the database.yml file into memory.- Parameters:
databaseConfigPath
- Path to database.yml.
-
setDatabaseDefaults
Builds a new database.yml reading old database.yml data. -
setDatabaseVersion
-
getString
-
getInt
-
getBoolean
-