/*
 * This file is generated by jOOQ.
 */
package com.nisemoe.generated.tables.records


import com.nisemoe.generated.enums.JudgementType
import com.nisemoe.generated.tables.ScoresJudgements

import org.jooq.Field
import org.jooq.Record1
import org.jooq.Record9
import org.jooq.Row9
import org.jooq.impl.UpdatableRecordImpl


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class ScoresJudgementsRecord private constructor() : UpdatableRecordImpl<ScoresJudgementsRecord>(ScoresJudgements.SCORES_JUDGEMENTS), Record9<Int?, Double?, Double?, Double?, JudgementType?, Double?, Double?, Double?, Int?> {

    open var id: Int?
        set(value): Unit = set(0, value)
        get(): Int? = get(0) as Int?

    open var time: Double?
        set(value): Unit = set(1, value)
        get(): Double? = get(1) as Double?

    open var x: Double?
        set(value): Unit = set(2, value)
        get(): Double? = get(2) as Double?

    open var y: Double?
        set(value): Unit = set(3, value)
        get(): Double? = get(3) as Double?

    open var type: JudgementType?
        set(value): Unit = set(4, value)
        get(): JudgementType? = get(4) as JudgementType?

    open var distanceCenter: Double?
        set(value): Unit = set(5, value)
        get(): Double? = get(5) as Double?

    open var distanceEdge: Double?
        set(value): Unit = set(6, value)
        get(): Double? = get(6) as Double?

    open var error: Double?
        set(value): Unit = set(7, value)
        get(): Double? = get(7) as Double?

    open var scoreId: Int?
        set(value): Unit = set(8, value)
        get(): Int? = get(8) as Int?

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    override fun key(): Record1<Int?> = super.key() as Record1<Int?>

    // -------------------------------------------------------------------------
    // Record9 type implementation
    // -------------------------------------------------------------------------

    override fun fieldsRow(): Row9<Int?, Double?, Double?, Double?, JudgementType?, Double?, Double?, Double?, Int?> = super.fieldsRow() as Row9<Int?, Double?, Double?, Double?, JudgementType?, Double?, Double?, Double?, Int?>
    override fun valuesRow(): Row9<Int?, Double?, Double?, Double?, JudgementType?, Double?, Double?, Double?, Int?> = super.valuesRow() as Row9<Int?, Double?, Double?, Double?, JudgementType?, Double?, Double?, Double?, Int?>
    override fun field1(): Field<Int?> = ScoresJudgements.SCORES_JUDGEMENTS.ID
    override fun field2(): Field<Double?> = ScoresJudgements.SCORES_JUDGEMENTS.TIME
    override fun field3(): Field<Double?> = ScoresJudgements.SCORES_JUDGEMENTS.X
    override fun field4(): Field<Double?> = ScoresJudgements.SCORES_JUDGEMENTS.Y
    override fun field5(): Field<JudgementType?> = ScoresJudgements.SCORES_JUDGEMENTS.TYPE
    override fun field6(): Field<Double?> = ScoresJudgements.SCORES_JUDGEMENTS.DISTANCE_CENTER
    override fun field7(): Field<Double?> = ScoresJudgements.SCORES_JUDGEMENTS.DISTANCE_EDGE
    override fun field8(): Field<Double?> = ScoresJudgements.SCORES_JUDGEMENTS.ERROR
    override fun field9(): Field<Int?> = ScoresJudgements.SCORES_JUDGEMENTS.SCORE_ID
    override fun component1(): Int? = id
    override fun component2(): Double? = time
    override fun component3(): Double? = x
    override fun component4(): Double? = y
    override fun component5(): JudgementType? = type
    override fun component6(): Double? = distanceCenter
    override fun component7(): Double? = distanceEdge
    override fun component8(): Double? = error
    override fun component9(): Int? = scoreId
    override fun value1(): Int? = id
    override fun value2(): Double? = time
    override fun value3(): Double? = x
    override fun value4(): Double? = y
    override fun value5(): JudgementType? = type
    override fun value6(): Double? = distanceCenter
    override fun value7(): Double? = distanceEdge
    override fun value8(): Double? = error
    override fun value9(): Int? = scoreId

    override fun value1(value: Int?): ScoresJudgementsRecord {
        set(0, value)
        return this
    }

    override fun value2(value: Double?): ScoresJudgementsRecord {
        set(1, value)
        return this
    }

    override fun value3(value: Double?): ScoresJudgementsRecord {
        set(2, value)
        return this
    }

    override fun value4(value: Double?): ScoresJudgementsRecord {
        set(3, value)
        return this
    }

    override fun value5(value: JudgementType?): ScoresJudgementsRecord {
        set(4, value)
        return this
    }

    override fun value6(value: Double?): ScoresJudgementsRecord {
        set(5, value)
        return this
    }

    override fun value7(value: Double?): ScoresJudgementsRecord {
        set(6, value)
        return this
    }

    override fun value8(value: Double?): ScoresJudgementsRecord {
        set(7, value)
        return this
    }

    override fun value9(value: Int?): ScoresJudgementsRecord {
        set(8, value)
        return this
    }

    override fun values(value1: Int?, value2: Double?, value3: Double?, value4: Double?, value5: JudgementType?, value6: Double?, value7: Double?, value8: Double?, value9: Int?): ScoresJudgementsRecord {
        this.value1(value1)
        this.value2(value2)
        this.value3(value3)
        this.value4(value4)
        this.value5(value5)
        this.value6(value6)
        this.value7(value7)
        this.value8(value8)
        this.value9(value9)
        return this
    }

    /**
     * Create a detached, initialised ScoresJudgementsRecord
     */
    constructor(id: Int? = null, time: Double? = null, x: Double? = null, y: Double? = null, type: JudgementType? = null, distanceCenter: Double? = null, distanceEdge: Double? = null, error: Double? = null, scoreId: Int? = null): this() {
        this.id = id
        this.time = time
        this.x = x
        this.y = y
        this.type = type
        this.distanceCenter = distanceCenter
        this.distanceEdge = distanceEdge
        this.error = error
        this.scoreId = scoreId
        resetChangedOnNotNull()
    }
}
