Module is.codion.framework.domain
Interface DerivedAttributeDefinition<T>
- Type Parameters:
T
- the underlying type
- All Superinterfaces:
AttributeDefinition<T>
A definition for attributes which value is derived from the values of one or more attribute.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Builds a derived AttributeDefinition instanceNested classes/interfaces inherited from interface is.codion.framework.domain.entity.attribute.AttributeDefinition
AttributeDefinition.ValueSupplier<T>
-
Field Summary
Fields inherited from interface is.codion.framework.domain.entity.attribute.AttributeDefinition
DATE_FORMAT, DATE_TIME_FORMAT, DECIMAL_ROUNDING_MODE, DECIMAL_SEPARATOR, DEFAULT_MAXIMUM_FRACTION_DIGITS, GROUPING_SEPARATOR, MAXIMUM_FRACTION_DIGITS, NUMBER_FORMAT_GROUPING, TIME_FORMAT, USE_LEXICAL_STRING_COMPARATOR
-
Method Summary
Modifier and TypeMethodDescriptionboolean
cached()
Note that cached attributes are included when an entity is serialized.Methods inherited from interface is.codion.framework.domain.entity.attribute.AttributeDefinition
attribute, caption, comparator, dateTimeFormatter, dateTimePattern, decimalRoundingMode, defaultValue, derived, description, entityType, format, hasDefaultValue, hidden, items, maximumFractionDigits, maximumLength, maximumValue, minimumValue, mnemonic, nullable, string, validItem
-
Method Details
-
sourceAttributes
- Returns:
- the attributes this attribute derives from.
-
valueProvider
DerivedAttribute.Provider<T> valueProvider()- Returns:
- the value provider, providing the derived value
-
cached
boolean cached()Note that cached attributes are included when an entity is serialized.- Returns:
- true if the value of this derived attribute is cached, false if computed on each access
-