Package be.gaudry.bibliobrol.dao.mysql
Class MySQLConfig
java.lang.Object
be.gaudry.bibliobrol.dao.mysql.MySQLConfig
- All Implemented Interfaces:
IConfigDao
- Since:
- 1.0 23-sept-08
- Author:
- Steph GAUDRY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
delete()
If theString
is null or empty, images are stored into the database.If theString
is null or empty, images are stored into the database.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.int
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 theIConfigDao.saveConfigValue(EConfig, String)
method.boolean
reset()
saveConfigValue(EConfig config, String newValue)
Stores a configuration value into the persistent system.
If a cache is maintained with theses values, pay attention to update it.
-
Constructor Details
-
MySQLConfig
public MySQLConfig()
-
-
Method Details
-
loadBrolTypes
- Specified by:
loadBrolTypes
in interfaceIConfigDao
-
delete
public boolean delete()- Specified by:
delete
in interfaceIConfigDao
- Returns:
-
reset
public boolean reset()- Specified by:
reset
in interfaceIConfigDao
-
insertData
public int insertData()- Specified by:
insertData
in interfaceIConfigDao
-
getItemImageDirectory
Description copied from interface:IConfigDao
If 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.- Specified by:
getItemImageDirectory
in interfaceIConfigDao
- Returns:
- the directory name to store the item's covers
-
loadConfigValue
Description copied from interface:IConfigDao
Loads a configuration value from the persistent system.
If a cache is maintained with theses values, pay attention to update cache into theIConfigDao.saveConfigValue(EConfig, String)
method.- Specified by:
loadConfigValue
in interfaceIConfigDao
- Parameters:
eConfig
- key to retrieve the value.- Returns:
- the corresponding value, or null if not found
-
getPersonImageDirectory
Description copied from interface:IConfigDao
If 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.- Specified by:
getPersonImageDirectory
in interfaceIConfigDao
- Returns:
- the directory name to store the person's identity photos
-
getVersion
Description copied from interface:IConfigDao
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 theDB_VAL_PERSISTENCE_VERSION
key to sore or retrieve the value.- Specified by:
getVersion
in interfaceIConfigDao
- Returns:
- the version
-
saveConfigValue
Description copied from interface:IConfigDao
Stores a configuration value into the persistent system.
If a cache is maintained with theses values, pay attention to update it.- Specified by:
saveConfigValue
in interfaceIConfigDao
- Parameters:
config
- key to sore the value.- Returns:
- the old value, or null if not found
-
loadBrolTypeImage
- Specified by:
loadBrolTypeImage
in interfaceIConfigDao
-