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


import java.time.OffsetDateTime

import jooq.main.tables.Comment
import jooq.main.tables.records.CommentRecord

import kotlin.collections.List

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


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class CommentDao(configuration: Configuration?) : DAOImpl<CommentRecord, jooq.main.tables.pojos.Comment, Long>(Comment.COMMENT, jooq.main.tables.pojos.Comment::class.java, configuration) {

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

    override fun getId(o: jooq.main.tables.pojos.Comment): Long? = o.id

    /**
     * Fetch records that have <code>id BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfId(lowerInclusive: Long?, upperInclusive: Long?): List<jooq.main.tables.pojos.Comment> = fetchRange(Comment.COMMENT.ID, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>id IN (values)</code>
     */
    fun fetchById(vararg values: Long): List<jooq.main.tables.pojos.Comment> = fetch(Comment.COMMENT.ID, *values.toTypedArray())

    /**
     * Fetch a unique record that has <code>id = value</code>
     */
    fun fetchOneById(value: Long): jooq.main.tables.pojos.Comment? = fetchOne(Comment.COMMENT.ID, value)

    /**
     * Fetch records that have <code>parent_id BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfParentId(lowerInclusive: Long?, upperInclusive: Long?): List<jooq.main.tables.pojos.Comment> = fetchRange(Comment.COMMENT.PARENT_ID, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>parent_id IN (values)</code>
     */
    fun fetchByParentId(vararg values: Long): List<jooq.main.tables.pojos.Comment> = fetch(Comment.COMMENT.PARENT_ID, *values.toTypedArray())

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

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

    /**
     * Fetch records that have <code>content BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfContent(lowerInclusive: String?, upperInclusive: String?): List<jooq.main.tables.pojos.Comment> = fetchRange(Comment.COMMENT.CONTENT, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>content IN (values)</code>
     */
    fun fetchByContent(vararg values: String): List<jooq.main.tables.pojos.Comment> = fetch(Comment.COMMENT.CONTENT, *values)

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

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

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

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

    /**
     * Fetch records that have <code>version BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfVersion(lowerInclusive: Long?, upperInclusive: Long?): List<jooq.main.tables.pojos.Comment> = fetchRange(Comment.COMMENT.VERSION, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>version IN (values)</code>
     */
    fun fetchByVersion(vararg values: Long): List<jooq.main.tables.pojos.Comment> = fetch(Comment.COMMENT.VERSION, *values.toTypedArray())
}
