Package org.cxbox.model.core.service
Class DictionaryCacheImpl
java.lang.Object
org.cxbox.model.core.service.DictionaryCacheImpl
- All Implemented Interfaces:
DictionaryCache
@DependsOn("deploymentTransactionSupport")
@Service
public class DictionaryCacheImpl
extends Object
implements DictionaryCache
Initiator of the cache of simple dictionaries.
The idea is simple, when you start the application and raise the context of the spring, we have a cache of simple directories,
access to this cache and not to the base throughout the entire operation of the application.
Key - the name of the dictionary (DICTIONARY_TYPE), value - the dictionary of a simple structure String - String
General structure of a simple dictionary: KEY (LIC) - independent language key VALUE- value
-
Field Summary
Fields inherited from interface org.cxbox.api.data.dictionary.DictionaryCache
instance -
Constructor Summary
ConstructorsConstructorDescriptionDictionaryCacheImpl(LocaleService localeService, Optional<List<DictionaryCacheLoader>> loaders) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key, IDictionaryType type) booleancontainsKey(LOV key, IDictionaryType type) booleancontainsValue(String value, IDictionaryType type) get(IDictionaryType type, String key) getAll(IDictionaryType dictionaryType) getDescription(String key, IDictionaryType type) lookupName(String val, String type) lookupName(String val, IDictionaryType type) Finding a key in the dictionary by valuelookupValue(LOV key, String type) lookupValue(LOV key, IDictionaryType type) Finding dictionary values by keylookupValueNullable(LOV key, IDictionaryType type) voidreload()types()
-
Constructor Details
-
DictionaryCacheImpl
public DictionaryCacheImpl(LocaleService localeService, Optional<List<DictionaryCacheLoader>> loaders)
-
-
Method Details
-
reload
public void reload()- Specified by:
reloadin interfaceDictionaryCache
-
get
- Specified by:
getin interfaceDictionaryCache- Parameters:
type- dictionary typekey- dictionary key- Returns:
- SimpleDictionary
-
get
- Specified by:
getin interfaceDictionaryCache
-
getAll
- Specified by:
getAllin interfaceDictionaryCache- Parameters:
dictionaryType- dictionary type- Returns:
- SimpleDictionary
-
getAll
- Specified by:
getAllin interfaceDictionaryCache
-
lookupValue
Finding dictionary values by key- Specified by:
lookupValuein interfaceDictionaryCache- Parameters:
key- keytype- dictionary type- Returns:
- Russian-language value of the dictionary
-
lookupValue
- Specified by:
lookupValuein interfaceDictionaryCache
-
lookupValueNullable
- Specified by:
lookupValueNullablein interfaceDictionaryCache
-
lookupName
Finding a key in the dictionary by value- Specified by:
lookupNamein interfaceDictionaryCache- Parameters:
val- valuetype- dictionary type- Returns:
- dictionary key
-
lookupName
- Specified by:
lookupNamein interfaceDictionaryCache
-
containsKey
- Specified by:
containsKeyin interfaceDictionaryCache
-
containsKey
- Specified by:
containsKeyin interfaceDictionaryCache
-
containsValue
- Specified by:
containsValuein interfaceDictionaryCache
-
getDescription
- Specified by:
getDescriptionin interfaceDictionaryCache
-
types
- Specified by:
typesin interfaceDictionaryCache
-