/*
 * This file is generated by jOOQ.
 */
package jj.tech.paolu.repository.jooq.tables.daos;


import java.util.List;
import java.util.Optional;

import jj.tech.paolu.repository.jooq.tables.SysAdminRole;
import jj.tech.paolu.repository.jooq.tables.records.SysAdminRoleRecord;

import org.jooq.Configuration;
import org.jooq.impl.DAOImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
@Repository
public class SysAdminRoleDao extends DAOImpl<SysAdminRoleRecord, jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole, String> {

    /**
     * Create a new SysAdminRoleDao without any configuration
     */
    public SysAdminRoleDao() {
        super(SysAdminRole.SYS_ADMIN_ROLE, jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole.class);
    }

    /**
     * Create a new SysAdminRoleDao with an attached configuration
     */
    @Autowired
    public SysAdminRoleDao(Configuration configuration) {
        super(SysAdminRole.SYS_ADMIN_ROLE, jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole.class, configuration);
    }

    @Override
    public String getId(jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole object) {
        return object.getId();
    }

    /**
     * Fetch records that have <code>id BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole> fetchRangeOfId(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysAdminRole.SYS_ADMIN_ROLE.ID, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>id IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole> fetchById(String... values) {
        return fetch(SysAdminRole.SYS_ADMIN_ROLE.ID, values);
    }

    /**
     * Fetch a unique record that has <code>id = value</code>
     */
    public jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole fetchOneById(String value) {
        return fetchOne(SysAdminRole.SYS_ADMIN_ROLE.ID, value);
    }

    /**
     * Fetch a unique record that has <code>id = value</code>
     */
    public Optional<jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole> fetchOptionalById(String value) {
        return fetchOptional(SysAdminRole.SYS_ADMIN_ROLE.ID, value);
    }

    /**
     * Fetch records that have <code>admin_id BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole> fetchRangeOfAdminId(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysAdminRole.SYS_ADMIN_ROLE.ADMIN_ID, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>admin_id IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole> fetchByAdminId(String... values) {
        return fetch(SysAdminRole.SYS_ADMIN_ROLE.ADMIN_ID, values);
    }

    /**
     * Fetch records that have <code>role_id BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole> fetchRangeOfRoleId(Integer lowerInclusive, Integer upperInclusive) {
        return fetchRange(SysAdminRole.SYS_ADMIN_ROLE.ROLE_ID, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>role_id IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysAdminRole> fetchByRoleId(Integer... values) {
        return fetch(SysAdminRole.SYS_ADMIN_ROLE.ROLE_ID, values);
    }
}
