/*
 * This file is generated by jOOQ.
 */
package jooq.main.tables.daos


import java.time.OffsetDateTime

import jooq.main.enums.ReadStateEnum
import jooq.main.tables.KotlinerReadEntityState
import jooq.main.tables.records.KotlinerReadEntityStateRecord

import kotlin.collections.List

import org.jooq.Configuration
import org.jooq.Record2
import org.jooq.impl.DAOImpl


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class KotlinerReadEntityStateDao(configuration: Configuration?) : DAOImpl<KotlinerReadEntityStateRecord, jooq.main.tables.pojos.KotlinerReadEntityState, Record2<Long?, Long?>>(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE, jooq.main.tables.pojos.KotlinerReadEntityState::class.java, configuration) {

    /**
     * Create a new KotlinerReadEntityStateDao without any configuration
     */
    constructor(): this(null)

    override fun getId(o: jooq.main.tables.pojos.KotlinerReadEntityState): Record2<Long?, Long?> = compositeKeyRecord(o.kotlinerId, o.entityId)

    /**
     * Fetch records that have <code>kotliner_id BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfKotlinerId(lowerInclusive: Long?, upperInclusive: Long?): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetchRange(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.KOTLINER_ID, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>kotliner_id IN (values)</code>
     */
    fun fetchByKotlinerId(vararg values: Long): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetch(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.KOTLINER_ID, *values.toTypedArray())

    /**
     * Fetch records that have <code>entity_id BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfEntityId(lowerInclusive: Long?, upperInclusive: Long?): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetchRange(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.ENTITY_ID, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>entity_id IN (values)</code>
     */
    fun fetchByEntityId(vararg values: Long): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetch(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.ENTITY_ID, *values.toTypedArray())

    /**
     * Fetch records that have <code>read_state BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfReadState(lowerInclusive: ReadStateEnum?, upperInclusive: ReadStateEnum?): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetchRange(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.READ_STATE, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>read_state IN (values)</code>
     */
    fun fetchByReadState(vararg values: ReadStateEnum): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetch(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.READ_STATE, *values)

    /**
     * Fetch records that have <code>created BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfCreated(lowerInclusive: OffsetDateTime?, upperInclusive: OffsetDateTime?): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetchRange(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.CREATED, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>created IN (values)</code>
     */
    fun fetchByCreated(vararg values: OffsetDateTime): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetch(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.CREATED, *values)

    /**
     * Fetch records that have <code>updated BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfUpdated(lowerInclusive: OffsetDateTime?, upperInclusive: OffsetDateTime?): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetchRange(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.UPDATED, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>updated IN (values)</code>
     */
    fun fetchByUpdated(vararg values: OffsetDateTime): List<jooq.main.tables.pojos.KotlinerReadEntityState> = fetch(KotlinerReadEntityState.KOTLINER_READ_ENTITY_STATE.UPDATED, *values)
}
