# CompositeMoneyColumn

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.

#### Author

Vladislav Kisel

## Constructors

CompositeMoneyColumn
Link copied to clipboard
constructor(amount: Column<T1>, currency: Column<T2>, nullable: Boolean = false)

## Properties

amount
Link copied to clipboard
val amount: Column<T1>
currency
Link copied to clipboard
val currency: Column<T2>
transformFromValue
Link copied to clipboard
val transformFromValue: (R) -> Pair<T1?, T2?>
transformToValue
Link copied to clipboard
val transformToValue: (Any?, Any?) -> R

## Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getRealColumns
Link copied to clipboard
open override fun getRealColumns(): List<Column<*>>
getRealColumnsWithValues
Link copied to clipboard
open override fun getRealColumnsWithValues(compositeValue: R): Map<Column<*>, Any?>
hashCode
Link copied to clipboard
open override fun hashCode(): Int
nullable
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.

restoreValueFromParts
Link copied to clipboard
open override fun restoreValueFromParts(parts: Map<Column<*>, Any?>): R
toQueryBuilder
Link copied to clipboard
open override fun toQueryBuilder(queryBuilder: QueryBuilder)
toString
Link copied to clipboard
open override fun toString(): String