/*
 * This file is generated by jOOQ.
 */
package ervu_dashboard.ervu_dashboard.db_beans.total_registered.tables;


import ervu_dashboard.ervu_dashboard.db_beans.public_.tables.PubRecruitment.PubRecruitmentPath;
import ervu_dashboard.ervu_dashboard.db_beans.total_registered.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.total_registered.TotalRegistered;
import ervu_dashboard.ervu_dashboard.db_beans.total_registered.tables.records.DriverLicenseRecord;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.UUID;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
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.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;


/**
 * Наличие водительского удостоверения состоящих/не состоящих,
 * мужчин/женщин/всех на учете уровень РФ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DriverLicense extends TableImpl<DriverLicenseRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>total_registered.driver_license</code>
     */
    public static final DriverLicense DRIVER_LICENSE = new DriverLicense();

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

    /**
     * The column
     * <code>total_registered.driver_license.id_driver_license</code>.
     */
    public final TableField<DriverLicenseRecord, Long> ID_DRIVER_LICENSE = createField(DSL.name("id_driver_license"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>total_registered.driver_license.nope</code>. нет
     * водительского удостоверения
     */
    public final TableField<DriverLicenseRecord, BigDecimal> NOPE = createField(DSL.name("nope"), SQLDataType.NUMERIC, this, "нет водительского удостоверения");

    /**
     * The column <code>total_registered.driver_license.A</code>. категория A
     */
    public final TableField<DriverLicenseRecord, BigDecimal> A = createField(DSL.name("A"), SQLDataType.NUMERIC, this, "категория A");

    /**
     * The column <code>total_registered.driver_license.B</code>. категория B
     */
    public final TableField<DriverLicenseRecord, BigDecimal> B = createField(DSL.name("B"), SQLDataType.NUMERIC, this, "категория B");

    /**
     * The column <code>total_registered.driver_license.C</code>. категория C
     */
    public final TableField<DriverLicenseRecord, BigDecimal> C = createField(DSL.name("C"), SQLDataType.NUMERIC, this, "категория C");

    /**
     * The column <code>total_registered.driver_license.D</code>. категория D
     */
    public final TableField<DriverLicenseRecord, BigDecimal> D = createField(DSL.name("D"), SQLDataType.NUMERIC, this, "категория D");

    /**
     * The column <code>total_registered.driver_license.E</code>. категория E
     */
    public final TableField<DriverLicenseRecord, BigDecimal> E = createField(DSL.name("E"), SQLDataType.NUMERIC, this, "категория E");

    /**
     * The column <code>total_registered.driver_license.all_M_W</code>.
     * Все/Мужчины/Женщины
     */
    public final TableField<DriverLicenseRecord, String> ALL_M_W = createField(DSL.name("all_M_W"), SQLDataType.CLOB, this, "Все/Мужчины/Женщины");

    /**
     * The column <code>total_registered.driver_license.recording_date</code>.
     * Дата записи
     */
    public final TableField<DriverLicenseRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE, this, "Дата записи");

    /**
     * The column <code>total_registered.driver_license.nope_repcent</code>. нет
     * водительского удостоверения в процентах
     */
    public final TableField<DriverLicenseRecord, BigDecimal> NOPE_REPCENT = createField(DSL.name("nope_repcent"), SQLDataType.NUMERIC, this, "нет водительского удостоверения в процентах");

    /**
     * The column <code>total_registered.driver_license.A_repcent</code>.
     * категория A в процентах
     */
    public final TableField<DriverLicenseRecord, BigDecimal> A_REPCENT = createField(DSL.name("A_repcent"), SQLDataType.NUMERIC, this, "категория A в процентах");

    /**
     * The column <code>total_registered.driver_license.B_repcent</code>.
     * категория B в процентах
     */
    public final TableField<DriverLicenseRecord, BigDecimal> B_REPCENT = createField(DSL.name("B_repcent"), SQLDataType.NUMERIC, this, "категория B в процентах");

    /**
     * The column <code>total_registered.driver_license.C_repcent</code>.
     * категория C в процентах
     */
    public final TableField<DriverLicenseRecord, BigDecimal> C_REPCENT = createField(DSL.name("C_repcent"), SQLDataType.NUMERIC, this, "категория C в процентах");

    /**
     * The column <code>total_registered.driver_license.D_repcent</code>.
     * категория D в процентах
     */
    public final TableField<DriverLicenseRecord, BigDecimal> D_REPCENT = createField(DSL.name("D_repcent"), SQLDataType.NUMERIC, this, "категория D в процентах");

    /**
     * The column <code>total_registered.driver_license.E_repcent</code>.
     * категория E в процентах
     */
    public final TableField<DriverLicenseRecord, BigDecimal> E_REPCENT = createField(DSL.name("E_repcent"), SQLDataType.NUMERIC, this, "категория E в процентах");

    /**
     * The column <code>total_registered.driver_license.recruitment_id</code>.
     */
    public final TableField<DriverLicenseRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");

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

    private DriverLicense(Name alias, Table<DriverLicenseRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Наличие водительского удостоверения состоящих/не состоящих, мужчин/женщин/всех на учете уровень РФ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>total_registered.driver_license</code> table
     * reference
     */
    public DriverLicense(String alias) {
        this(DSL.name(alias), DRIVER_LICENSE);
    }

    /**
     * Create an aliased <code>total_registered.driver_license</code> table
     * reference
     */
    public DriverLicense(Name alias) {
        this(alias, DRIVER_LICENSE);
    }

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

    public <O extends Record> DriverLicense(Table<O> path, ForeignKey<O, DriverLicenseRecord> childPath, InverseForeignKey<O, DriverLicenseRecord> parentPath) {
        super(path, childPath, parentPath, DRIVER_LICENSE);
    }

    /**
     * A subtype implementing {@link Path} for simplified path-based joins.
     */
    public static class DriverLicensePath extends DriverLicense implements Path<DriverLicenseRecord> {
        public <O extends Record> DriverLicensePath(Table<O> path, ForeignKey<O, DriverLicenseRecord> childPath, InverseForeignKey<O, DriverLicenseRecord> parentPath) {
            super(path, childPath, parentPath);
        }
        private DriverLicensePath(Name alias, Table<DriverLicenseRecord> aliased) {
            super(alias, aliased);
        }

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

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

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

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

    @Override
    public Identity<DriverLicenseRecord, Long> getIdentity() {
        return (Identity<DriverLicenseRecord, Long>) super.getIdentity();
    }

    @Override
    public UniqueKey<DriverLicenseRecord> getPrimaryKey() {
        return Keys.PK_DRIVER_LICENSE;
    }

    @Override
    public List<ForeignKey<DriverLicenseRecord, ?>> getReferences() {
        return Arrays.asList(Keys.DRIVER_LICENSE__DRIVER_LICENSE_FK1);
    }

    private transient PubRecruitmentPath _pubRecruitment;

    /**
     * Get the implicit join path to the <code>public.pub_recruitment</code>
     * table.
     */
    public PubRecruitmentPath pubRecruitment() {
        if (_pubRecruitment == null)
            _pubRecruitment = new PubRecruitmentPath(this, Keys.DRIVER_LICENSE__DRIVER_LICENSE_FK1, null);

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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