/*
 * This file is generated by jOOQ.
 */
package com.example.webapp.jooq.tables.daos;

import com.example.webapp.jooq.tables.BusinessUnits;
import com.example.webapp.jooq.tables.records.BusinessUnitsRecord;
import java.util.List;
import java.util.Optional;
import org.jooq.Configuration;
import org.jooq.impl.DAOImpl;

/** This class is generated by jOOQ. */
@SuppressWarnings({"all", "unchecked", "rawtypes", "this-escape"})
public class BusinessUnitsDao
    extends DAOImpl<
        BusinessUnitsRecord, com.example.webapp.jooq.tables.pojos.BusinessUnits, Integer> {

  /** Create a new BusinessUnitsDao without any configuration */
  public BusinessUnitsDao() {
    super(
        BusinessUnits.BUSINESS_UNITS,
        com.example.webapp.jooq.tables.pojos.BusinessUnits.class);
  }

  /** Create a new BusinessUnitsDao with an attached configuration */
  public BusinessUnitsDao(Configuration configuration) {
    super(
        BusinessUnits.BUSINESS_UNITS,
        com.example.webapp.jooq.tables.pojos.BusinessUnits.class,
        configuration);
  }

  @Override
  public Integer getId(com.example.webapp.jooq.tables.pojos.BusinessUnits object) {
    return object.getId();
  }

  /**
   * Fetch records that have <code>id BETWEEN lowerInclusive AND
   * upperInclusive</code>
   */
  public List<com.example.webapp.jooq.tables.pojos.BusinessUnits> fetchRangeOfId(
      Integer lowerInclusive, Integer upperInclusive) {
    return fetchRange(BusinessUnits.BUSINESS_UNITS.ID, lowerInclusive, upperInclusive);
  }

  /** Fetch records that have <code>id IN (values)</code> */
  public List<com.example.webapp.jooq.tables.pojos.BusinessUnits> fetchById(
      Integer... values) {
    return fetch(BusinessUnits.BUSINESS_UNITS.ID, values);
  }

  /** Fetch a unique record that has <code>id = value</code> */
  public com.example.webapp.jooq.tables.pojos.BusinessUnits fetchOneById(Integer value) {
    return fetchOne(BusinessUnits.BUSINESS_UNITS.ID, value);
  }

  /** Fetch a unique record that has <code>id = value</code> */
  public Optional<com.example.webapp.jooq.tables.pojos.BusinessUnits> fetchOptionalById(
      Integer value) {
    return fetchOptional(BusinessUnits.BUSINESS_UNITS.ID, value);
  }

  /**
   * Fetch records that have <code>business_unit_id BETWEEN lowerInclusive AND
   * upperInclusive</code>
   */
  public List<com.example.webapp.jooq.tables.pojos.BusinessUnits>
      fetchRangeOfBusinessUnitId(String lowerInclusive, String upperInclusive) {
    return fetchRange(
        BusinessUnits.BUSINESS_UNITS.BUSINESS_UNIT_ID, lowerInclusive, upperInclusive);
  }

  /** Fetch records that have <code>business_unit_id IN (values)</code> */
  public List<com.example.webapp.jooq.tables.pojos.BusinessUnits> fetchByBusinessUnitId(
      String... values) {
    return fetch(BusinessUnits.BUSINESS_UNITS.BUSINESS_UNIT_ID, values);
  }

  /** Fetch a unique record that has <code>business_unit_id = value</code> */
  public com.example.webapp.jooq.tables.pojos.BusinessUnits fetchOneByBusinessUnitId(
      String value) {
    return fetchOne(BusinessUnits.BUSINESS_UNITS.BUSINESS_UNIT_ID, value);
  }

  /** Fetch a unique record that has <code>business_unit_id = value</code> */
  public Optional<com.example.webapp.jooq.tables.pojos.BusinessUnits>
      fetchOptionalByBusinessUnitId(String value) {
    return fetchOptional(BusinessUnits.BUSINESS_UNITS.BUSINESS_UNIT_ID, value);
  }

  /**
   * Fetch records that have <code>active BETWEEN lowerInclusive AND
   * upperInclusive</code>
   */
  public List<com.example.webapp.jooq.tables.pojos.BusinessUnits> fetchRangeOfActive(
      Boolean lowerInclusive, Boolean upperInclusive) {
    return fetchRange(BusinessUnits.BUSINESS_UNITS.ACTIVE, lowerInclusive, upperInclusive);
  }

  /** Fetch records that have <code>active IN (values)</code> */
  public List<com.example.webapp.jooq.tables.pojos.BusinessUnits> fetchByActive(
      Boolean... values) {
    return fetch(BusinessUnits.BUSINESS_UNITS.ACTIVE, values);
  }
}
