Class MaintenanceModeTranslation
java.lang.Object
io.goobi.viewer.model.translations.Translation
io.goobi.viewer.model.administration.MaintenanceModeTranslation
JPA entity that stores a single language-specific translation of a
MaintenanceMode text field.
Each instance is linked to an owning MaintenanceMode and inherits the generic translation
infrastructure from Translation.-
Field Summary
Fields inherited from class io.goobi.viewer.model.translations.Translation
id, language, tag, translationValue -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.MaintenanceModeTranslation(String language, String tag, String value, MaintenanceMode owner) Creates a new MaintenanceModeTranslation instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo Translations are equal if they are of the same class and both tag and language match.getOwner()inthashCode()Hash code is build from hashCode of language.voidsetOwner(MaintenanceMode owner) static voidsetTranslation(List<MaintenanceModeTranslation> translations, String lang, String value, String tag, MaintenanceMode owner) setTranslation.Methods inherited from class io.goobi.viewer.model.translations.Translation
getId, getLanguage, getTag, getTranslation, getTranslation, getTranslationValue, isEmpty, setId, setLanguage, setTag, setTranslation, setTranslationValue, toString
-
Constructor Details
-
MaintenanceModeTranslation
public MaintenanceModeTranslation()Default constructor. -
MaintenanceModeTranslation
Creates a new MaintenanceModeTranslation instance.- Parameters:
language- BCP 47 language code for this translationtag- key identifying the translated fieldvalue- translated text valueowner- owning MaintenanceMode entity
-
-
Method Details
-
setTranslation
public static void setTranslation(List<MaintenanceModeTranslation> translations, String lang, String value, String tag, MaintenanceMode owner) setTranslation.- Parameters:
translations- mutable list of existing translations to updatelang- BCP 47 language code to set or addvalue- translated text to assigntag- key identifying the translated fieldowner- maintenance mode entity to assign when creating a new translation
-
getOwner
-
setOwner
-
hashCode
public int hashCode()Hash code is build from hashCode of language.- Overrides:
hashCodein classTranslation- Returns:
- the hash code value for this object
-
equals
Two Translations are equal if they are of the same class and both tag and language match.- Overrides:
equalsin classTranslation- Parameters:
obj- the object to compare to this translation- Returns:
- true if the given object is equal to this instance, false otherwise
-