Interface TableTemplate.Mapping

All Superinterfaces:
Cloneable, Serializable
Enclosing interface:
TableTemplate

@NonExtendable public static interface TableTemplate.Mapping extends Serializable, Cloneable
Type providing information on a mapping of a field to a column.
Since:
3.0
  • Method Details

    • getDisplayName

      String getDisplayName(String languageAbbreviation)
      Get the display name for the given language abbreviation.
      Parameters:
      languageAbbreviation - The language abbreviation for which the display name should be determined.
      Returns:
      The display name for the given language abbreviation.
      Since:
      3.0
    • setAttributeReference

      void setAttributeReference(String[] ref, String lang)
      Defines the attribute reference for this mapping.
      Parameters:
      ref - The reference chain.
      lang - The targeted language.
      Since:
      3.0
    • setAttributeReference

      void setAttributeReference(String[] ref, String lang, boolean langDependent)
      Defines the attribute reference for this mapping allowing for language dependency.
      Parameters:
      ref - The reference chain.
      lang - The targeted language.
      langDependent - true, if language dependent.
      Since:
      4.0.120
    • getAttributeReference

      String[] getAttributeReference(String lang)
      Provides the chain of attributes names to the attribute which should be displayed.
      Parameters:
      lang - language abbreviation
      Returns:
      The chain of attributes names to the attribute which should be displayed.
      Since:
      3.0
    • isLanguageDependent

      boolean isLanguageDependent()
      Check if the content is language dependent.
      Returns:
      boolean: true if the content is language dependent, else false
      Since:
      3.0
    • isVisible

      boolean isVisible()
      Indicates the mapping to be visible.
      Returns:
      true, if visible.
      Since:
      4.2
    • setVisible

      void setVisible(boolean value)
      Enable or disable the visibility.
      Parameters:
      value - boolean: true to enable the visibility, else false
      Since:
      4.2
    • getColumnWidth

      int getColumnWidth()
      Width of displayed columns.
      Returns:
      column width
      Since:
      3.0
    • setColumnWidth

      void setColumnWidth(int value)
      Set the column's width to the given value.
      Parameters:
      value - The value for the column's width.
      Since:
      3.0
    • getName

      String getName()
      Provides the given name for this mapping.
      Returns:
      The given name.
      Since:
      3.0
    • setName

      void setName(String name)
      Set the name of this table template to the given name.
      Parameters:
      name - The name that should be set.
      Since:
      4.0
    • getType

      String getType()
      Provides the type of this mapping.
      Returns:
      The mapping's type.
      Since:
      3.0
    • getContentType

      Class<?> getContentType()
      Provides the content type for values stored with this mapping.
      Returns:
      The content type.
      Since:
      4.0
    • getValueType

      Class<?> getValueType()
      Provides the entry value type for iterable content values.
      Returns:
      The value type.
      Since:
      4.0
    • getEntityType

      EntityType getEntityType()
      Provides the entity type (db table) this mapping operates on.
      Returns:
      The entity type.
      Since:
      4.0.24
    • getDBAttribute

      @Nullable @Nullable Attribute<?> getDBAttribute(String langAbbreviation)
      Provides the database attribute bound to this mapping for the given language.
      Parameters:
      langAbbreviation - The language.
      Returns:
      The according attribute or null.
      Since:
      3.0
    • getDBAttribute

      @Nullable @Nullable Attribute<?> getDBAttribute(String langAbbreviation, EntityType entityType)
      Provides the database attribute bound to this mapping for the given language wrt. the named entity type.
      Parameters:
      langAbbreviation - The language.
      entityType - The entity type.
      Returns:
      The according attribute or null.
      Since:
      4.0.38
    • getDBReferenceName

      String getDBReferenceName()
      Provides the attribute name of where the reference to another persistent object is stored.
      Returns:
      the attribute name
      Since:
      3.0
    • takesRelations

      boolean takesRelations()
      Indicates the mapping to allow for relations as values.
      Returns:
      true, if relations are allowed.
      Since:
      4.0
    • takesMany

      boolean takesMany()
      Indicates the mapping to take multiple values.
      Returns:
      true, if it takes many.
      Since:
      4.0
    • ignoreContentType

      boolean ignoreContentType()
      Ignore content type indicator.
      Returns:
      Indicator.
      Since:
      4.2.205
    • getValueFromEntity

      @Nullable @Nullable Object getValueFromEntity(Object persistentObject, String language)
      Get the value for the given object and language.
      Parameters:
      persistentObject - The object for which the value should be returned.
      language - The given language.
      Returns:
      The value for the given object and language.
      Since:
      4.0
    • getAlternativeTypes

      List<Class<?>> getAlternativeTypes()
      Provides alternative value types the mapping can work with.
      Returns:
      A list of alternative types.
      Since:
      4.0
    • clone

      Clones this mapping.
      Returns:
      A clone.
      Since:
      3.0