Class LocalizedFieldHelper
java.lang.Object
ch.tocco.nice2.dbrefactoring.spi.modulesupport.LocalizedFieldHelper
This class is meant to help with localized fields. It builds a bidirectional map of
fields
<->
locale that can be used to retrieve virtual fields for synthetic ones
or to find out the concrete locale of a synthetic localized field.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindFieldByTarget
(String name) Finds the field model by the given target.getAvailableLocales
(L10N l10n) getBaseField
(FieldModel syntheticAndLocalized) Returns the virtual field model corresponding to the given localized synthetic one.static Locale
getDefaultLocale
(L10N l10n) getFieldTarget
(String basename, Locale lang) Returns the target of the field with the given basename and locale.getLocale
(FieldModel syntheticAndLocalized) If the given field is localized and synthetic, it determines which locale it represents.
-
Field Details
-
string2Locale
-
-
Constructor Details
-
LocalizedFieldHelper
-
-
Method Details
-
getEntityModel
-
getLocale
If the given field is localized and synthetic, it determines which locale it represents. -
getBaseField
Returns the virtual field model corresponding to the given localized synthetic one. -
findFieldByTarget
Finds the field model by the given target. -
getFieldTarget
Returns the target of the field with the given basename and locale. If there is no field with this locale an exception is thrown. -
getDefaultLocale
-
getAvailableLocales
-