Enum Class DatabaseConfig

java.lang.Object
java.lang.Enum<DatabaseConfig>
com.palmergames.bukkit.towny.db.DatabaseConfig
All Implemented Interfaces:
Serializable, Comparable<DatabaseConfig>, Constable

public enum DatabaseConfig extends Enum<DatabaseConfig>
  • Enum Constant Details

    • DATABASE

      public static final DatabaseConfig DATABASE
    • DATEBASE_VERSION

      public static final DatabaseConfig DATEBASE_VERSION
    • DATABASE_LOAD

      public static final DatabaseConfig DATABASE_LOAD
    • DATABASE_SAVE

      public static final DatabaseConfig DATABASE_SAVE
    • DATABASE_SQL_HEADER

      public static final DatabaseConfig DATABASE_SQL_HEADER
    • DATABASE_HOSTNAME

      public static final DatabaseConfig DATABASE_HOSTNAME
    • DATABASE_PORT

      public static final DatabaseConfig DATABASE_PORT
    • DATABASE_DBNAME

      public static final DatabaseConfig DATABASE_DBNAME
    • DATABASE_TABLEPREFIX

      public static final DatabaseConfig DATABASE_TABLEPREFIX
    • DATABASE_USERNAME

      public static final DatabaseConfig DATABASE_USERNAME
    • DATABASE_PASSWORD

      public static final DatabaseConfig DATABASE_PASSWORD
    • DATABASE_FLAGS

      public static final DatabaseConfig DATABASE_FLAGS
    • DATABASE_SQL_DISABLE_BACKUP_WARNING

      public static final DatabaseConfig DATABASE_SQL_DISABLE_BACKUP_WARNING
    • DATABASE_POOLING_HEADER

      public static final DatabaseConfig DATABASE_POOLING_HEADER
    • DATABASE_POOLING_MAX_POOL_SIZE

      public static final DatabaseConfig DATABASE_POOLING_MAX_POOL_SIZE
    • DATABASE_POOLING_MAX_LIFETIME

      public static final DatabaseConfig DATABASE_POOLING_MAX_LIFETIME
    • DATABASE_POOLING_CONNECTION_TIMEOUT

      public static final DatabaseConfig DATABASE_POOLING_CONNECTION_TIMEOUT
  • Method Details

    • values

      public static DatabaseConfig[] 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

      public static DatabaseConfig valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getRoot

      public String getRoot()
      Retrieves the root for a config option
      Returns:
      The root for a config option
    • getDefault

      public String getDefault()
      Retrieves the default value for a config path
      Returns:
      The default value for a config path
    • getComments

      public String[] getComments()
      Retrieves the comment for a config path
      Returns:
      The comments for a config path
    • loadDatabaseConfig

      public static void loadDatabaseConfig(Path databaseConfigPath)
      Loads the database.yml file into memory.
      Parameters:
      databaseConfigPath - Path to database.yml.
    • setDatabaseDefaults

      public static void setDatabaseDefaults(Path databaseConfigPath)
      Builds a new database.yml reading old database.yml data.
    • setDatabaseVersion

      public static void setDatabaseVersion(String version)
    • getString

      public static String getString(DatabaseConfig node)
    • getInt

      public static int getInt(DatabaseConfig node)
    • getBoolean

      public static boolean getBoolean(DatabaseConfig node)