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


import java.util.List;

import jj.tech.paolu.repository.jooq.tables.SysRoleResource;
import jj.tech.paolu.repository.jooq.tables.records.SysRoleResourceRecord;

import org.jooq.Configuration;
import org.jooq.Record2;
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 SysRoleResourceDao extends DAOImpl<SysRoleResourceRecord, jj.tech.paolu.repository.jooq.tables.pojos.SysRoleResource, Record2<String, String>> {

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

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

    @Override
    public Record2<String, String> getId(jj.tech.paolu.repository.jooq.tables.pojos.SysRoleResource object) {
        return compositeKeyRecord(object.getRoleid(), object.getResid());
    }

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

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

    /**
     * Fetch records that have <code>roleid BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRoleResource> fetchRangeOfRoleid(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysRoleResource.SYS_ROLE_RESOURCE.ROLEID, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>roleid IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRoleResource> fetchByRoleid(String... values) {
        return fetch(SysRoleResource.SYS_ROLE_RESOURCE.ROLEID, values);
    }

    /**
     * Fetch records that have <code>resid BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRoleResource> fetchRangeOfResid(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysRoleResource.SYS_ROLE_RESOURCE.RESID, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>resid IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysRoleResource> fetchByResid(String... values) {
        return fetch(SysRoleResource.SYS_ROLE_RESOURCE.RESID, values);
    }
}
