Interface IConfigDao

All Known Implementing Classes:
DerbyConfig, MsAccessConfig, MySQLConfig

public interface IConfigDao
Allows some operations on the persistent system. Not all operations are supported by all persistent systems (some operations may throws UnsupportedOperationException).
The responsibility of storing some configuration informations are also given to the persistent system, because user can switch between systems, also switch between different instances of the same persistent system.

Example :
  • If a user store informations into an embed Derby database, and switch to another embed Derby database, if the person's images are stored into the database, there is no problem.
  • But if the images are on a directory (for performances improving), switching between the two databases must involve using another directory because the identifiers are not the same between the two databases, and the identifier of an item take a huge place into the file naming convention.
Since:
1.0 27-nov.-07
Author:
Steph GAUDRY
  • Method Details

    • reset

      boolean reset()
    • delete

      boolean delete()
      Returns:
      Throws:
      UnsupportedOperationException
    • insertData

      int insertData()
    • getPersonImageDirectory

      String getPersonImageDirectory()
      Deprecated.
      0.0.12-SNAPSHOT
      If the String is null or empty, images are stored into the database. Else the return value is the name of the sub-directory of the application data directory.
      Implementation may use the DB_VAL_PERSON_IMG_DIR_NAME key to sore or retrieve the value.
      Returns:
      the directory name to store the person's identity photos
    • getItemImageDirectory

      String getItemImageDirectory()
      Deprecated.
      0.0.12-SNAPSHOT
      If the String is null or empty, images are stored into the database. Else the return value is the name of the sub-directory of the application data directory.
      Implementation may use the DB_VAL_ITEM_IMG_DIR_NAME key to sore or retrieve the value.
      Returns:
      the directory name to store the item's covers
    • getVersion

      String getVersion()
      Deprecated.
      0.0.12-SNAPSHOT
      Version of the persistent system schema.
      If a new application version needs some modification on the schema, an update of the persistent system (add a table or a node, ...) may be done depending on the persistence version.
      Implementation may use the DB_VAL_PERSISTENCE_VERSION key to sore or retrieve the value.
      Returns:
      the version
    • loadConfigValue

      String loadConfigValue(EConfig eConfig)
      Loads a configuration value from the persistent system.
      If a cache is maintained with theses values, pay attention to update cache into the saveConfigValue(EConfig, String) method.
      Parameters:
      eConfig - key to retrieve the value.
      Returns:
      the corresponding value, or null if not found
    • saveConfigValue

      String saveConfigValue(EConfig eConfig, String newValue)
      Stores a configuration value into the persistent system.
      If a cache is maintained with theses values, pay attention to update it.
      Parameters:
      eConfig - key to sore the value.
      Returns:
      the old value, or null if not found
    • loadBrolTypes

      List<BrolType> loadBrolTypes()
    • loadBrolTypeImage

      Icon loadBrolTypeImage(BrolType brolType)