Package mc.core.domain.i18n.dobj
Class DictionaryDO
java.lang.Object
mc.core.system.base.BaseBean
- All Implemented Interfaces:
IBaseDO<Dictionary>
-
Nested Class Summary
Nested classes/interfaces inherited from class mc.core.domain.base.dobj.AbstractBaseDO
AbstractBaseDO.Initializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddItem(Dictionary dictionary, DictionaryItem dictionaryItem) voiddeleteItem(Dictionary dictionary, DictionaryItem dictionaryItem) getItemFromKey(Object dictionaryKey, Object itemKey) helper for getting item of dictionary from dictionary key and item keygetItemFromKey(Dictionary dictionary, Object itemKey) get item of dictionary from keygetItemText(DictionaryItem dictionaryItem, Locale locale) helper for safe retrieval of text from dictionary itemsaveItem(DictionaryItem dictionaryItem, DataMap map) Methods inherited from class mc.core.domain.base.dobj.AbstractSimpleEntityDO
changeOrder, getAllActive, getUserRole, toggleActivationMethods inherited from class mc.core.domain.base.dobj.AbstractEntityBaseDO
addDefaultSearchCriteria, copy, copyToCollection, getFromInternalDescription, prepareSearchFilter, save, sendEvent, sendEventMethods inherited from class mc.core.domain.base.dobj.AbstractBaseDO
delete, delete, getAll, getEntityDisplay, getFromId, getFromKey, getOne, map, map, save, validator
-
Constructor Details
-
DictionaryDO
public DictionaryDO()
-
-
Method Details
-
addItem
public void addItem(Dictionary dictionary, DictionaryItem dictionaryItem) throws ApplicationException - Throws:
ApplicationException
-
deleteItem
public void deleteItem(Dictionary dictionary, DictionaryItem dictionaryItem) throws ApplicationException - Throws:
ApplicationException
-
saveItem
public DictionaryItem saveItem(DictionaryItem dictionaryItem, DataMap map) throws ApplicationException - Throws:
ApplicationException
-
getItemFromKey
public DictionaryItem getItemFromKey(Dictionary dictionary, Object itemKey) throws ApplicationException get item of dictionary from key- Parameters:
dictionary- mandatoryitemKey- mandatory- Returns:
- dictionary item
- Throws:
ApplicationException- if not found or not unique
-
getItemFromKey
public DictionaryItem getItemFromKey(Object dictionaryKey, Object itemKey) throws ApplicationException helper for getting item of dictionary from dictionary key and item key- Parameters:
dictionaryKey- mandatoryitemKey- mandatory- Returns:
- dictionary item
- Throws:
ApplicationException- if not found or not unique
-
getItemText
helper for safe retrieval of text from dictionary item- Parameters:
dictionaryItem- mandatorylocale- optional. if null content locale is used. substituted by master locale- Returns:
- text or null of no text
-