/*
 * This file is generated by jOOQ.
 */
package ru.micord.ervu_dashboard.db_beans.public_.tables;


import java.util.Collection;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.SQL;
import org.jooq.Schema;
import org.jooq.Select;
import org.jooq.Stringly;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;

import ru.micord.ervu_dashboard.db_beans.public_.Public;
import ru.micord.ervu_dashboard.db_beans.public_.tables.records.CountCitizenRecord;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CountCitizen extends TableImpl<CountCitizenRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.count_citizen</code>
     */
    public static final CountCitizen COUNT_CITIZEN = new CountCitizen();

    /**
     * The class holding records for this type
     */
    @Override
    public Class<CountCitizenRecord> getRecordType() {
        return CountCitizenRecord.class;
    }

    /**
     * The column <code>public.count_citizen.count_citizen</code>.
     */
    public final TableField<CountCitizenRecord, Long> COUNT_CITIZEN_ = createField(DSL.name("count_citizen"), SQLDataType.BIGINT, this, "");

    private CountCitizen(Name alias, Table<CountCitizenRecord> aliased) {
        this(alias, aliased, (Field<?>[]) null, null);
    }

    private CountCitizen(Name alias, Table<CountCitizenRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>public.count_citizen</code> table reference
     */
    public CountCitizen(String alias) {
        this(DSL.name(alias), COUNT_CITIZEN);
    }

    /**
     * Create an aliased <code>public.count_citizen</code> table reference
     */
    public CountCitizen(Name alias) {
        this(alias, COUNT_CITIZEN);
    }

    /**
     * Create a <code>public.count_citizen</code> table reference
     */
    public CountCitizen() {
        this(DSL.name("count_citizen"), null);
    }

    @Override
    public Schema getSchema() {
        return aliased() ? null : Public.PUBLIC;
    }

    @Override
    public CountCitizen as(String alias) {
        return new CountCitizen(DSL.name(alias), this);
    }

    @Override
    public CountCitizen as(Name alias) {
        return new CountCitizen(alias, this);
    }

    @Override
    public CountCitizen as(Table<?> alias) {
        return new CountCitizen(alias.getQualifiedName(), this);
    }

    /**
     * Rename this table
     */
    @Override
    public CountCitizen rename(String name) {
        return new CountCitizen(DSL.name(name), null);
    }

    /**
     * Rename this table
     */
    @Override
    public CountCitizen rename(Name name) {
        return new CountCitizen(name, null);
    }

    /**
     * Rename this table
     */
    @Override
    public CountCitizen rename(Table<?> name) {
        return new CountCitizen(name.getQualifiedName(), null);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public CountCitizen where(Condition condition) {
        return new CountCitizen(getQualifiedName(), aliased() ? this : null, null, condition);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public CountCitizen where(Collection<? extends Condition> conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public CountCitizen where(Condition... conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public CountCitizen where(Field<Boolean> condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public CountCitizen where(SQL condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public CountCitizen where(@Stringly.SQL String condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public CountCitizen where(@Stringly.SQL String condition, Object... binds) {
        return where(DSL.condition(condition, binds));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public CountCitizen where(@Stringly.SQL String condition, QueryPart... parts) {
        return where(DSL.condition(condition, parts));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public CountCitizen whereExists(Select<?> select) {
        return where(DSL.exists(select));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public CountCitizen whereNotExists(Select<?> select) {
        return where(DSL.notExists(select));
    }
}
