Package be.gaudry.bibliobrol.dao
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
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 :
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 Summary
Modifier and TypeMethodDescriptionboolean
delete()
Deprecated.0.0.12-SNAPSHOTDeprecated.0.0.12-SNAPSHOTDeprecated.0.0.12-SNAPSHOTint
loadBrolTypeImage(BrolType brolType)
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 thesaveConfigValue(EConfig, String)
method.boolean
reset()
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.
-
Method Details
-
reset
boolean reset() -
delete
boolean delete()- Returns:
- Throws:
UnsupportedOperationException
-
insertData
int insertData() -
getPersonImageDirectory
String getPersonImageDirectory()Deprecated.0.0.12-SNAPSHOTIf theString
is null or empty, images are stored into the database. Else the return value is the name of the sub-directory of theapplication data directory
.
Implementation may use theDB_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-SNAPSHOTIf theString
is null or empty, images are stored into the database. Else the return value is the name of the sub-directory of theapplication data directory
.
Implementation may use theDB_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-SNAPSHOTVersion 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 theDB_VAL_PERSISTENCE_VERSION
key to sore or retrieve the value.- Returns:
- the version
-
loadConfigValue
Loads a configuration value from the persistent system.
If a cache is maintained with theses values, pay attention to update cache into thesaveConfigValue(EConfig, String)
method.- Parameters:
eConfig
- key to retrieve the value.- Returns:
- the corresponding value, or null if not found
-
saveConfigValue
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
-
loadBrolTypeImage
-