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

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 Age extends TableImpl<AgeRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>total_registered.age</code>
     */
    public static final Age AGE = new Age();

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

    /**
     * The column <code>total_registered.age.id_age</code>.
     */
    public final TableField<AgeRecord, Long> ID_AGE = createField(DSL.name("id_age"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>total_registered.age.17_yaers</code>. Возраст 17
     */
    public final TableField<AgeRecord, BigDecimal> _17_YAERS = createField(DSL.name("17_yaers"), SQLDataType.NUMERIC, this, "Возраст 17");

    /**
     * The column <code>total_registered.age.18-26_years</code>. Возраст 18-26
     */
    public final TableField<AgeRecord, BigDecimal> _18_26_YEARS = createField(DSL.name("18-26_years"), SQLDataType.NUMERIC, this, "Возраст 18-26");

    /**
     * The column <code>total_registered.age.27-30_years</code>. Возраст 27-30
     */
    public final TableField<AgeRecord, BigDecimal> _27_30_YEARS = createField(DSL.name("27-30_years"), SQLDataType.NUMERIC, this, "Возраст 27-30");

    /**
     * The column <code>total_registered.age.31-35_years</code>. Возраст 31-35
     */
    public final TableField<AgeRecord, BigDecimal> _31_35_YEARS = createField(DSL.name("31-35_years"), SQLDataType.NUMERIC, this, "Возраст 31-35");

    /**
     * The column <code>total_registered.age.36-40_years</code>. Возраст 36-40
     */
    public final TableField<AgeRecord, BigDecimal> _36_40_YEARS = createField(DSL.name("36-40_years"), SQLDataType.NUMERIC, this, "Возраст 36-40");

    /**
     * The column <code>total_registered.age.41-45_years</code>. Возраст 41-45
     */
    public final TableField<AgeRecord, BigDecimal> _41_45_YEARS = createField(DSL.name("41-45_years"), SQLDataType.NUMERIC, this, "Возраст 41-45");

    /**
     * The column <code>total_registered.age.51+_years</code>. Возраст 51+
     */
    public final TableField<AgeRecord, BigDecimal> _51_2b_YEARS = createField(DSL.name("51+_years"), SQLDataType.NUMERIC, this, "Возраст 51+");

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

    /**
     * The column <code>total_registered.age.registered</code>. Состоит на учете
     * или нет
     */
    public final TableField<AgeRecord, Boolean> REGISTERED = createField(DSL.name("registered"), SQLDataType.BOOLEAN, this, "Состоит на учете или нет");

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

    /**
     * The column <code>total_registered.age.46-50_years</code>. Возраст 46-50
     */
    public final TableField<AgeRecord, BigDecimal> _46_50_YEARS = createField(DSL.name("46-50_years"), SQLDataType.NUMERIC, this, "Возраст 46-50");

    /**
     * The column <code>total_registered.age.17_yaers_percent</code>. Возраст 17
     * в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _17_YAERS_PERCENT = createField(DSL.name("17_yaers_percent"), SQLDataType.NUMERIC, this, "Возраст 17 в процентах");

    /**
     * The column <code>total_registered.age.18-26_years_percent</code>. Возраст
     * 18-26 в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _18_26_YEARS_PERCENT = createField(DSL.name("18-26_years_percent"), SQLDataType.NUMERIC, this, "Возраст 18-26 в процентах");

    /**
     * The column <code>total_registered.age.27-30_years_percent</code>. Возраст
     * 27-30 в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _27_30_YEARS_PERCENT = createField(DSL.name("27-30_years_percent"), SQLDataType.NUMERIC, this, "Возраст 27-30 в процентах");

    /**
     * The column <code>total_registered.age.31-35_years_percent</code>. Возраст
     * 31-35 в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _31_35_YEARS_PERCENT = createField(DSL.name("31-35_years_percent"), SQLDataType.NUMERIC, this, "Возраст 31-35 в процентах");

    /**
     * The column <code>total_registered.age.36-40_years_percent</code>. Возраст
     * 36-40 в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _36_40_YEARS_PERCENT = createField(DSL.name("36-40_years_percent"), SQLDataType.NUMERIC, this, "Возраст 36-40 в процентах");

    /**
     * The column <code>total_registered.age.41-45_years_percent</code>. Возраст
     * 41-45 в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _41_45_YEARS_PERCENT = createField(DSL.name("41-45_years_percent"), SQLDataType.NUMERIC, this, "Возраст 41-45 в процентах");

    /**
     * The column <code>total_registered.age.46-50_years_percent</code>. Возраст
     * 46-50 в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _46_50_YEARS_PERCENT = createField(DSL.name("46-50_years_percent"), SQLDataType.NUMERIC, this, "Возраст 46-50 в процентах");

    /**
     * The column <code>total_registered.age.51+_years_percent</code>. Возраст
     * 51+ в процентах
     */
    public final TableField<AgeRecord, BigDecimal> _51_2b_YEARS_PERCENT = createField(DSL.name("51+_years_percent"), SQLDataType.NUMERIC, this, "Возраст 51+ в процентах");

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

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

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

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

    /**
     * Create an aliased <code>total_registered.age</code> table reference
     */
    public Age(Name alias) {
        this(alias, AGE);
    }

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

    public <O extends Record> Age(Table<O> path, ForeignKey<O, AgeRecord> childPath, InverseForeignKey<O, AgeRecord> parentPath) {
        super(path, childPath, parentPath, AGE);
    }

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

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

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

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

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

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

    @Override
    public UniqueKey<AgeRecord> getPrimaryKey() {
        return Keys.PK_AGE;
    }

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

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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