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


import java.time.OffsetDateTime

import jooq.main.tables.DmLikes
import jooq.main.tables.records.DmLikesRecord

import kotlin.collections.List

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


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class DmLikesDao(configuration: Configuration?) : DAOImpl<DmLikesRecord, jooq.main.tables.pojos.DmLikes, Long>(DmLikes.DM_LIKES, jooq.main.tables.pojos.DmLikes::class.java, configuration) {

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

    override fun getId(o: jooq.main.tables.pojos.DmLikes): Long? = o.entityId

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

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

    /**
     * Fetch a unique record that has <code>entity_id = value</code>
     */
    fun fetchOneByEntityId(value: Long): jooq.main.tables.pojos.DmLikes? = fetchOne(DmLikes.DM_LIKES.ENTITY_ID, value)

    /**
     * Fetch records that have <code>likes BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfLikes(lowerInclusive: Int?, upperInclusive: Int?): List<jooq.main.tables.pojos.DmLikes> = fetchRange(DmLikes.DM_LIKES.LIKES, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>likes IN (values)</code>
     */
    fun fetchByLikes(vararg values: Int): List<jooq.main.tables.pojos.DmLikes> = fetch(DmLikes.DM_LIKES.LIKES, *values.toTypedArray())

    /**
     * Fetch records that have <code>dislikes BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfDislikes(lowerInclusive: Int?, upperInclusive: Int?): List<jooq.main.tables.pojos.DmLikes> = fetchRange(DmLikes.DM_LIKES.DISLIKES, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>dislikes IN (values)</code>
     */
    fun fetchByDislikes(vararg values: Int): List<jooq.main.tables.pojos.DmLikes> = fetch(DmLikes.DM_LIKES.DISLIKES, *values.toTypedArray())

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

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