Class AbstractDBConfig

java.lang.Object
com.mckoi.database.control.AbstractDBConfig
All Implemented Interfaces:
DBConfig
Direct Known Subclasses:
DefaultDBConfig

public class AbstractDBConfig extends Object implements DBConfig
An abstract implementation of DBConfig.
Author:
Tobias Downer
  • Constructor Details

    • AbstractDBConfig

      public AbstractDBConfig(File current_path)
      Constructs the DBConfig.
  • Method Details

    • getDefaultValue

      protected String getDefaultValue(String property_key)
      Returns the default value for the configuration property with the given key.
    • setValue

      protected void setValue(String property_key, String val)
      Sets the configuration value for the key property key.
    • currentPath

      public File currentPath()
      Description copied from interface: DBConfig
      Returns the current path set for this configuration. This is useful if the configuration is based on a configuration file that has path references relative to the configuration file. In this case, the path returned here would be the path to the configuration file.
      Specified by:
      currentPath in interface DBConfig
    • getValue

      public String getValue(String property_key)
      Description copied from interface: DBConfig
      Returns the value that was set for the configuration property with the given name.

      This method must always returns a value that the database engine can use provided the 'property_key' is a supported key. If the property key is not supported and the key was not set, null is returned.

      Specified by:
      getValue in interface DBConfig
    • immutableCopy

      public DBConfig immutableCopy()
      Description copied from interface: DBConfig
      Makes an immutable copy of this configuration.
      Specified by:
      immutableCopy in interface DBConfig