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

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;


/**
 * Дети то 18 лет состоящих/не состоящих, мужчин/женщин/всех на учете уровень РФ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ChildMinor extends TableImpl<ChildMinorRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>total_registered.child_minor</code>
     */
    public static final ChildMinor CHILD_MINOR = new ChildMinor();

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

    /**
     * The column <code>total_registered.child_minor.id_child_minor</code>.
     */
    public final TableField<ChildMinorRecord, Long> ID_CHILD_MINOR = createField(DSL.name("id_child_minor"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>total_registered.child_minor.no_child</code>. Нет детей
     */
    public final TableField<ChildMinorRecord, BigDecimal> NO_CHILD = createField(DSL.name("no_child"), SQLDataType.NUMERIC, this, "Нет детей");

    /**
     * The column <code>total_registered.child_minor.1_child</code>. 1 ребенок
     */
    public final TableField<ChildMinorRecord, BigDecimal> _1_CHILD = createField(DSL.name("1_child"), SQLDataType.NUMERIC, this, "1 ребенок");

    /**
     * The column <code>total_registered.child_minor.2_child</code>. 2 ребенка
     */
    public final TableField<ChildMinorRecord, BigDecimal> _2_CHILD = createField(DSL.name("2_child"), SQLDataType.NUMERIC, this, "2 ребенка");

    /**
     * The column <code>total_registered.child_minor.3_child</code>. 3 ребенка
     */
    public final TableField<ChildMinorRecord, BigDecimal> _3_CHILD = createField(DSL.name("3_child"), SQLDataType.NUMERIC, this, "3 ребенка");

    /**
     * The column <code>total_registered.child_minor.4_more_child</code>. 4 и
     * более
     */
    public final TableField<ChildMinorRecord, BigDecimal> _4_MORE_CHILD = createField(DSL.name("4_more_child"), SQLDataType.NUMERIC, this, "4 и более");

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

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

    /**
     * The column <code>total_registered.child_minor.no_child_percent</code>.
     * Нет детей в процентах
     */
    public final TableField<ChildMinorRecord, BigDecimal> NO_CHILD_PERCENT = createField(DSL.name("no_child_percent"), SQLDataType.NUMERIC, this, "Нет детей в процентах");

    /**
     * The column <code>total_registered.child_minor.1_child_percent</code>. 1
     * ребенок в процентах
     */
    public final TableField<ChildMinorRecord, BigDecimal> _1_CHILD_PERCENT = createField(DSL.name("1_child_percent"), SQLDataType.NUMERIC, this, "1 ребенок в процентах");

    /**
     * The column <code>total_registered.child_minor.2_child_percent</code>. 2
     * ребенка в процентах
     */
    public final TableField<ChildMinorRecord, BigDecimal> _2_CHILD_PERCENT = createField(DSL.name("2_child_percent"), SQLDataType.NUMERIC, this, "2 ребенка в процентах");

    /**
     * The column <code>total_registered.child_minor.3_child_percent</code>. 3
     * ребенка в процентах
     */
    public final TableField<ChildMinorRecord, BigDecimal> _3_CHILD_PERCENT = createField(DSL.name("3_child_percent"), SQLDataType.NUMERIC, this, "3 ребенка в процентах");

    /**
     * The column
     * <code>total_registered.child_minor.4_more_child_percent</code>. 4 и более
     * ребенка в процентах
     */
    public final TableField<ChildMinorRecord, BigDecimal> _4_MORE_CHILD_PERCENT = createField(DSL.name("4_more_child_percent"), SQLDataType.NUMERIC, this, "4 и более ребенка в процентах");

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

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

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

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

    /**
     * Create an aliased <code>total_registered.child_minor</code> table
     * reference
     */
    public ChildMinor(Name alias) {
        this(alias, CHILD_MINOR);
    }

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

    public <O extends Record> ChildMinor(Table<O> path, ForeignKey<O, ChildMinorRecord> childPath, InverseForeignKey<O, ChildMinorRecord> parentPath) {
        super(path, childPath, parentPath, CHILD_MINOR);
    }

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

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

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

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

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

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

    @Override
    public UniqueKey<ChildMinorRecord> getPrimaryKey() {
        return Keys.PK_CHILD_MINOR;
    }

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

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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