/*
 * 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.SysRole;
import jj.tech.paolu.repository.jooq.tables.records.SysRoleRecord;

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 SysRoleDao extends DAOImpl<SysRoleRecord, jj.tech.paolu.repository.jooq.tables.pojos.SysRole, String> {

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

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

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

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

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

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

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

    /**
     * Fetch records that have <code>rolename BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRole> fetchRangeOfRolename(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysRole.SYS_ROLE.ROLENAME, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>rolename IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRole> fetchByRolename(String... values) {
        return fetch(SysRole.SYS_ROLE.ROLENAME, values);
    }

    /**
     * Fetch records that have <code>department BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRole> fetchRangeOfDepartment(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysRole.SYS_ROLE.DEPARTMENT, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>department IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRole> fetchByDepartment(String... values) {
        return fetch(SysRole.SYS_ROLE.DEPARTMENT, values);
    }
}
