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


import java.time.OffsetDateTime

import jooq.main.tables.Topic
import jooq.main.tables.records.TopicRecord

import kotlin.collections.List

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


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class TopicDao(configuration: Configuration?) : DAOImpl<TopicRecord, jooq.main.tables.pojos.Topic, Long>(Topic.TOPIC, jooq.main.tables.pojos.Topic::class.java, configuration) {

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

    override fun getId(o: jooq.main.tables.pojos.Topic): 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.Topic> = fetchRange(Topic.TOPIC.ID, lowerInclusive, upperInclusive)

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

    /**
     * Fetch a unique record that has <code>id = value</code>
     */
    fun fetchOneById(value: Long): jooq.main.tables.pojos.Topic? = fetchOne(Topic.TOPIC.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.Topic> = fetchRange(Topic.TOPIC.PARENT_ID, lowerInclusive, upperInclusive)

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

    /**
     * Fetch records that have <code>name BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfName(lowerInclusive: String?, upperInclusive: String?): List<jooq.main.tables.pojos.Topic> = fetchRange(Topic.TOPIC.NAME, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>name IN (values)</code>
     */
    fun fetchByName(vararg values: String): List<jooq.main.tables.pojos.Topic> = fetch(Topic.TOPIC.NAME, *values)

    /**
     * Fetch records that have <code>description BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfDescription(lowerInclusive: String?, upperInclusive: String?): List<jooq.main.tables.pojos.Topic> = fetchRange(Topic.TOPIC.DESCRIPTION, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>description IN (values)</code>
     */
    fun fetchByDescription(vararg values: String): List<jooq.main.tables.pojos.Topic> = fetch(Topic.TOPIC.DESCRIPTION, *values)

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

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

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

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

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

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