Package-level declarations

Types

Link copied to clipboard
class CompositeMoneyColumn<T1 : BigDecimal?, T2 : CurrencyUnit?, R : MonetaryAmount?>(val amount: Column<T1>, val currency: Column<T2>, nullable: Boolean = false) : BiCompositeColumn<T1, T2, R>

Represents amount of money and currency using Java Money API. Data is stored using two composite columns.

Link copied to clipboard
class CurrencyColumnType : ColumnType<CurrencyUnit>

Varchar column for storing currency (JSR354 CurrencyUnit)

Functions

Link copied to clipboard
@JvmName(name = "compositeMoneyNullable")
fun Table.compositeMoney(amountColumn: Column<BigDecimal?>, currencyColumn: Column<CurrencyUnit?>): CompositeMoneyColumn<BigDecimal?, CurrencyUnit?, MonetaryAmount?>

Creates a composite column made up of a nullable decimal column and a nullable currency column.

fun Table.compositeMoney(amountColumn: Column<BigDecimal>, currencyColumn: Column<CurrencyUnit>): CompositeMoneyColumn<BigDecimal, CurrencyUnit, MonetaryAmount>

Creates a composite column made up of a decimal column and a currency column.

fun Table.compositeMoney(precision: Int, scale: Int, amountName: String, currencyName: String = amountName + "_C"): CompositeMoneyColumn<BigDecimal, CurrencyUnit, MonetaryAmount>

Creates a composite column made up of:

Link copied to clipboard
fun CompositeMoneyColumn(table: Table, precision: Int, scale: Int, amountName: String, currencyName: String): CompositeMoneyColumn<BigDecimal, CurrencyUnit, MonetaryAmount>

Creates a composite column made up of a numeric column, with the specified amountName, for storing numbers with the specified precision and scale, as wel as a character column, with the specified currencyName, for storing currency (as javax.money.CurrencyUnit).

Link copied to clipboard
fun Table.currency(name: String): Column<CurrencyUnit>

Creates a character column, with the specified name, for storing currency (as javax.money.CurrencyUnit).

Link copied to clipboard
fun <T1 : BigDecimal, T2 : CurrencyUnit, R : MonetaryAmount> CompositeMoneyColumn<T1, T2, R>.nullable(): CompositeMoneyColumn<T1?, T2?, R?>

Marks this CompositeMoneyColumn as nullable.