NumericFormat

sealed interface NumericFormat : QuerySemanticType

How a numeric field is meant to be read (design §6.6): its decimal scale, and for Money its currency. This is display and totalling semantics for query consumers, never inferred from the JVM type, and it does not change how the field is queried.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Decimal(val scale: Int) : NumericFormat

A fixed-point decimal with scale fraction digits.

Link copied to clipboard
data class Money(val currency: String? = null, val currencyField: String? = null, val scale: Int) : NumericFormat

An amount of money in exactly one of a fixed ISO 4217 currency or the currency named by the sibling string field currencyField. With a fixed currency, scale defaults to the currency's standard fraction digits (java.util.Currency.defaultFractionDigits: 2 for CNY, 0 for JPY); with currencyField it must be given.

Properties

Link copied to clipboard
abstract val scale: Int

The number of digits after the decimal point.