Package ch.tocco.nice2.model.entity.api
Interface LocalizedFieldNamingStrategy
- All Known Subinterfaces:
LocalizedFieldMapper
- All Known Implementing Classes:
DefaultLocalizedFieldMapper
Deprecated.
A strategy for naming a localized field. The information coming from the model is a field name
and a flag indicating that this field should be localized. This means the field exists for each
available language. Since each field must have some unique name, this strategy returns the final
field name depending on the base field name and a language.
-
Method Summary
Modifier and TypeMethodDescriptiongetFieldName
(String name, @Nullable String language) Deprecated.Makes a field name for the given base field name plus the locale.getFieldName
(String name, @Nullable Locale locale) Deprecated.@Nullable String[]
getFieldnameParts
(String localizedFieldname) Deprecated.The inverse function ofgetFieldName(String, String)
, that returns the parts of the specified localized field name, that is the original field name and the language.
-
Method Details
-
getFieldName
Deprecated.Makes a field name for the given base field name plus the locale.Possible example:
getFieldName("some_field","fr")
→ "some_field_fr"- Parameters:
name
- The base field name.language
- 2-letter iso code in lower case eg 'fr'.
-
getFieldName
Deprecated. -
getFieldnameParts
Deprecated.The inverse function ofgetFieldName(String, String)
, that returns the parts of the specified localized field name, that is the original field name and the language.- Parameters:
localizedFieldname
- the localized fieldname- Returns:
- [0] = orginal field name, [1] = language; or
null
if the specified field name could not be recognized as localized
-
EntityModel