/*
 * 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.EducationLevelRecord;

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 EducationLevel extends TableImpl<EducationLevelRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>total_registered.education_level</code>
     */
    public static final EducationLevel EDUCATION_LEVEL = new EducationLevel();

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

    /**
     * The column
     * <code>total_registered.education_level.id_education_level</code>.
     */
    public final TableField<EducationLevelRecord, Long> ID_EDUCATION_LEVEL = createField(DSL.name("id_education_level"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>total_registered.education_level.higher</code>. Высшее
     * образование
     */
    public final TableField<EducationLevelRecord, BigDecimal> HIGHER = createField(DSL.name("higher"), SQLDataType.NUMERIC, this, "Высшее образование");

    /**
     * The column <code>total_registered.education_level.average</code>. Среднее
     * профессиональное
     */
    public final TableField<EducationLevelRecord, BigDecimal> AVERAGE = createField(DSL.name("average"), SQLDataType.NUMERIC, this, "Среднее профессиональное");

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

    /**
     * The column <code>total_registered.education_level.only_general</code>.
     * Только общее
     */
    public final TableField<EducationLevelRecord, BigDecimal> ONLY_GENERAL = createField(DSL.name("only_general"), SQLDataType.NUMERIC, this, "Только общее");

    /**
     * The column <code>total_registered.education_level.no_data</code>. Нет
     * данных
     */
    public final TableField<EducationLevelRecord, BigDecimal> NO_DATA = createField(DSL.name("no_data"), SQLDataType.NUMERIC, this, "Нет данных");

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

    /**
     * The column <code>total_registered.education_level.higher_percent</code>.
     * Высшее образование в процентах
     */
    public final TableField<EducationLevelRecord, BigDecimal> HIGHER_PERCENT = createField(DSL.name("higher_percent"), SQLDataType.NUMERIC, this, "Высшее образование в процентах");

    /**
     * The column <code>total_registered.education_level.average_percent</code>.
     * Среднее профессиональное в процентах
     */
    public final TableField<EducationLevelRecord, BigDecimal> AVERAGE_PERCENT = createField(DSL.name("average_percent"), SQLDataType.NUMERIC, this, "Среднее профессиональное в процентах");

    /**
     * The column
     * <code>total_registered.education_level.only_general_percent</code>.
     * Только общее в процентах
     */
    public final TableField<EducationLevelRecord, BigDecimal> ONLY_GENERAL_PERCENT = createField(DSL.name("only_general_percent"), SQLDataType.NUMERIC, this, "Только общее в процентах");

    /**
     * The column <code>total_registered.education_level.no_data_percent</code>.
     * Нет данных об образованиии в процентах
     */
    public final TableField<EducationLevelRecord, BigDecimal> NO_DATA_PERCENT = createField(DSL.name("no_data_percent"), SQLDataType.NUMERIC, this, "Нет данных об образованиии в процентах");

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

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

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

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

    /**
     * Create an aliased <code>total_registered.education_level</code> table
     * reference
     */
    public EducationLevel(Name alias) {
        this(alias, EDUCATION_LEVEL);
    }

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

    public <O extends Record> EducationLevel(Table<O> path, ForeignKey<O, EducationLevelRecord> childPath, InverseForeignKey<O, EducationLevelRecord> parentPath) {
        super(path, childPath, parentPath, EDUCATION_LEVEL);
    }

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

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

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

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

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

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

    @Override
    public UniqueKey<EducationLevelRecord> getPrimaryKey() {
        return Keys.PK_EDUCATION_LEVEL;
    }

    @Override
    public List<ForeignKey<EducationLevelRecord, ?>> getReferences() {
        return Arrays.asList(Keys.EDUCATION_LEVEL__EDUCATION_LEVEL_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.EDUCATION_LEVEL__EDUCATION_LEVEL_FK1, null);

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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