Class MaintenanceModeTranslation

java.lang.Object
io.goobi.viewer.model.translations.Translation
io.goobi.viewer.model.administration.MaintenanceModeTranslation

@Entity public class MaintenanceModeTranslation extends Translation
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.
  • Constructor Details

    • MaintenanceModeTranslation

      public MaintenanceModeTranslation()
      Default constructor.
    • MaintenanceModeTranslation

      public MaintenanceModeTranslation(String language, String tag, String value, MaintenanceMode owner)
      Creates a new MaintenanceModeTranslation instance.
      Parameters:
      language - BCP 47 language code for this translation
      tag - key identifying the translated field
      value - translated text value
      owner - 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 update
      lang - BCP 47 language code to set or add
      value - translated text to assign
      tag - key identifying the translated field
      owner - maintenance mode entity to assign when creating a new translation
    • getOwner

      public MaintenanceMode getOwner()
    • setOwner

      public void setOwner(MaintenanceMode owner)
    • hashCode

      public int hashCode()
      Hash code is build from hashCode of language.
      Overrides:
      hashCode in class Translation
      Returns:
      the hash code value for this object
    • equals

      public boolean equals(Object obj)
      Two Translations are equal if they are of the same class and both tag and language match.
      Overrides:
      equals in class Translation
      Parameters:
      obj - the object to compare to this translation
      Returns:
      true if the given object is equal to this instance, false otherwise