java.lang.Object
is.codion.framework.domain.entity.StringFactory
Factory class for building functions for String representations of
Given a
Entity
instances.Given a
Entity
instance named entity containing the following mappings:
attribute1 -> value1 attribute2 -> value2 attribute3 -> value3 fkAttribute -> {Entity instance with a single mapping refAttribute -> refValue} StringFactory.Builder builder = StringFactory.builder(); builder.text("attribute1=") .value(attribute1) .text(", attribute3='") .value(attribute3) .text("' foreign key value=") .value(fkAttribute, refAttribute); System.out.println(builder.build().apply(entity));outputs the following String:
attribute1=value1, attribute3='value3' foreign key value=refValue
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A Builder for a string function, which provides toString() values for entities. -
Method Summary
-
Method Details
-
builder
- Returns:
- a
StringFactory.Builder
instance for configuring a string factoryFunction
for entities.
-