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


import java.time.OffsetDateTime

import jooq.main.tables.Book
import jooq.main.tables.records.BookRecord

import kotlin.collections.List

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


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class BookDao(configuration: Configuration?) : DAOImpl<BookRecord, jooq.main.tables.pojos.Book, Long>(Book.BOOK, jooq.main.tables.pojos.Book::class.java, configuration) {

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

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

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

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

    /**
     * Fetch records that have <code>title BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfTitle(lowerInclusive: String?, upperInclusive: String?): List<jooq.main.tables.pojos.Book> = fetchRange(Book.BOOK.TITLE, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>title IN (values)</code>
     */
    fun fetchByTitle(vararg values: String): List<jooq.main.tables.pojos.Book> = fetch(Book.BOOK.TITLE, *values)

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

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

    /**
     * Fetch records that have <code>language BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfLanguage(lowerInclusive: String?, upperInclusive: String?): List<jooq.main.tables.pojos.Book> = fetchRange(Book.BOOK.LANGUAGE, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>language IN (values)</code>
     */
    fun fetchByLanguage(vararg values: String): List<jooq.main.tables.pojos.Book> = fetch(Book.BOOK.LANGUAGE, *values)

    /**
     * Fetch records that have <code>price BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfPrice(lowerInclusive: Int?, upperInclusive: Int?): List<jooq.main.tables.pojos.Book> = fetchRange(Book.BOOK.PRICE, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>price IN (values)</code>
     */
    fun fetchByPrice(vararg values: Int): List<jooq.main.tables.pojos.Book> = fetch(Book.BOOK.PRICE, *values.toTypedArray())

    /**
     * Fetch records that have <code>url BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfUrl(lowerInclusive: String?, upperInclusive: String?): List<jooq.main.tables.pojos.Book> = fetchRange(Book.BOOK.URL, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>url IN (values)</code>
     */
    fun fetchByUrl(vararg values: String): List<jooq.main.tables.pojos.Book> = fetch(Book.BOOK.URL, *values)

    /**
     * Fetch records that have <code>thumbnail BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    fun fetchRangeOfThumbnail(lowerInclusive: String?, upperInclusive: String?): List<jooq.main.tables.pojos.Book> = fetchRange(Book.BOOK.THUMBNAIL, lowerInclusive, upperInclusive)

    /**
     * Fetch records that have <code>thumbnail IN (values)</code>
     */
    fun fetchByThumbnail(vararg values: String): List<jooq.main.tables.pojos.Book> = fetch(Book.BOOK.THUMBNAIL, *values)

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

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

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

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