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

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 SysOrgDao extends DAOImpl<SysOrgRecord, jj.tech.paolu.repository.jooq.tables.pojos.SysOrg, String> {

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

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

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

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

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

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

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

    /**
     * Fetch records that have <code>pid BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysOrg> fetchRangeOfPid(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysOrg.SYS_ORG.PID, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>pid IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysOrg> fetchByPid(String... values) {
        return fetch(SysOrg.SYS_ORG.PID, values);
    }

    /**
     * Fetch records that have <code>status BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysOrg> fetchRangeOfStatus(Integer lowerInclusive, Integer upperInclusive) {
        return fetchRange(SysOrg.SYS_ORG.STATUS, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>status IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysOrg> fetchByStatus(Integer... values) {
        return fetch(SysOrg.SYS_ORG.STATUS, values);
    }

    /**
     * Fetch records that have <code>org_type BETWEEN lowerInclusive AND
     * upperInclusive</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysOrg> fetchRangeOfOrgType(String lowerInclusive, String upperInclusive) {
        return fetchRange(SysOrg.SYS_ORG.ORG_TYPE, lowerInclusive, upperInclusive);
    }

    /**
     * Fetch records that have <code>org_type IN (values)</code>
     */
    public List<jj.tech.paolu.repository.jooq.tables.pojos.SysOrg> fetchByOrgType(String... values) {
        return fetch(SysOrg.SYS_ORG.ORG_TYPE, values);
    }
}
