@ForUseOnly public static interface TableTemplate.Mapping extends Serializable, Cloneable
Modifier and Type | Method and Description |
---|---|
TableTemplate.Mapping |
clone()
Clones this mapping.
|
List<Class<?>> |
getAlternativeTypes()
Provides alternative value types the mapping can work with.
|
String[] |
getAttributeReference(String lang)
Provides the chain of attributes names to the attribute which should be displayed.
|
int |
getColumnWidth()
Width of displayed columns.
|
Class<?> |
getContentType()
Provides the content type for values stored with this mapping.
|
Attribute<?> |
getDBAttribute(String langAbbreviation)
Provides the database attribute bound to this mapping for the given language.
|
Attribute<?> |
getDBAttribute(String langAbbreviation,
EntityType entityType)
Provides the database attribute bound to this mapping for the given language wrt. the named entity type.
|
String |
getDBReferenceName()
Provides the attribute name of where the reference to another persistent object is stored.
|
String |
getDisplayName(String languageAbbreviation)
Get the display name for the given language abbreviation.
|
EntityType |
getEntityType()
Provides the entity type (db table) this mapping operates on.
|
String |
getName()
Provides the given name for this mapping.
|
String |
getType()
Provides the type of this mapping.
|
Object |
getValueFromEntity(Object persistentObject,
String language)
Get the value for the given object and language.
|
Class<?> |
getValueType()
Provides the entry value type for iterable content values.
|
boolean |
ignoreContentType()
Ignore content type indicator.
|
boolean |
isLanguageDependent()
Check if the content is language dependent.
|
boolean |
isVisible()
Indicates the mapping to be visible.
|
void |
setAttributeReference(String[] ref,
String lang)
Defines the attribute reference for this mapping.
|
void |
setAttributeReference(String[] ref,
String lang,
boolean langDependent)
Defines the attribute reference for this mapping allowing for language dependency.
|
void |
setColumnWidth(int value)
Set the column's width to the given value.
|
void |
setName(String name)
Set the name of this table template to the given name.
|
void |
setVisible(boolean value)
Enable or disable the visibility.
|
boolean |
takesMany()
Indicates the mapping to take multiple values.
|
boolean |
takesRelations()
Indicates the mapping to allow for relations as values.
|
String getDisplayName(String languageAbbreviation)
languageAbbreviation
- The language abbreviation for which the display name should be determined.void setAttributeReference(String[] ref, String lang)
ref
- The reference chain.lang
- The targeted language.void setAttributeReference(String[] ref, String lang, boolean langDependent)
ref
- The reference chain.lang
- The targeted language.langDependent
- true
, if language dependent.String[] getAttributeReference(String lang)
lang
- language abbreviationboolean isLanguageDependent()
true
if the content is language dependent, else false
boolean isVisible()
true
, if visible.void setVisible(boolean value)
value
- boolean: true
to enable the visibility, else false
int getColumnWidth()
void setColumnWidth(int value)
value
- The value for the column's width.String getName()
void setName(String name)
name
- The name that should be set.String getType()
Class<?> getContentType()
Class<?> getValueType()
EntityType getEntityType()
@Nullable Attribute<?> getDBAttribute(String langAbbreviation)
langAbbreviation
- The language.null
.@Nullable Attribute<?> getDBAttribute(String langAbbreviation, EntityType entityType)
langAbbreviation
- The language.entityType
- The entity type.null
.String getDBReferenceName()
boolean takesRelations()
true
, if relations are allowed.boolean takesMany()
true
, if it takes many.boolean ignoreContentType()
@Nullable Object getValueFromEntity(Object persistentObject, String language)
persistentObject
- The object for which the value should be returned.language
- The given language.List<Class<?>> getAlternativeTypes()
TableTemplate.Mapping clone()
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210