Module is.codion.framework.domain
Interface EntityFormatter.Builder
- Enclosing class:
EntityFormatter
public static sealed interface EntityFormatter.Builder
A Builder for a formatter function, which provides toString() values for entities.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Adds the given static text to thisEntityFormatter.Builder
Adds the value mapped to the given key to thisEntityFormatter.Builder
Adds the value mapped to the given key to this StringProvidervalue
(ForeignKey foreignKey, Attribute<?> attribute) Adds the value mapped to the given attribute in theEntity
instance mapped to the given foreign key to thisEntityFormatter.Builder
-
Method Details
-
value
Adds the value mapped to the given key to thisEntityFormatter.Builder
- Parameters:
attribute
- the attribute which value should be added to the string representation- Returns:
- this
EntityFormatter.Builder
instance
-
value
Adds the value mapped to the given key to this StringProvider- Parameters:
attribute
- the attribute which value should be added to the string representationformat
- the Format to use when appending the value- Returns:
- this
EntityFormatter.Builder
instance
-
value
Adds the value mapped to the given attribute in theEntity
instance mapped to the given foreign key to thisEntityFormatter.Builder
- Parameters:
foreignKey
- the foreign keyattribute
- the attribute in the referenced entity to use- Returns:
- this
EntityFormatter.Builder
instance
-
text
Adds the given static text to thisEntityFormatter.Builder
- Parameters:
text
- the text to add- Returns:
- this
EntityFormatter.Builder
instance
-
build
- Returns:
- a new string formatter based on this builder
-