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

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 RemovedRegistry extends TableImpl<RemovedRegistryRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>total_registered.removed_registry</code>
     */
    public static final RemovedRegistry REMOVED_REGISTRY = new RemovedRegistry();

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

    /**
     * The column
     * <code>total_registered.removed_registry.removed_registry</code>. Снято с
     * учета
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> REMOVED_REGISTRY_ = createField(DSL.name("removed_registry"), SQLDataType.NUMERIC, this, "Снято с учета");

    /**
     * The column
     * <code>total_registered.removed_registry.deprivation_citizenship</code>.
     * Лишение гражданства
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> DEPRIVATION_CITIZENSHIP = createField(DSL.name("deprivation_citizenship"), SQLDataType.NUMERIC, this, "Лишение гражданства");

    /**
     * The column <code>total_registered.removed_registry.age_limit</code>.
     * Наступление предельного возраста
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> AGE_LIMIT = createField(DSL.name("age_limit"), SQLDataType.NUMERIC, this, "Наступление предельного возраста");

    /**
     * The column <code>total_registered.removed_registry.death</code>. Смерть
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> DEATH = createField(DSL.name("death"), SQLDataType.NUMERIC, this, "Смерть");

    /**
     * The column <code>total_registered.removed_registry.travel_abroad</code>.
     * Выезд за границу на срок более 6 месяцев
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> TRAVEL_ABROAD = createField(DSL.name("travel_abroad"), SQLDataType.NUMERIC, this, "Выезд за границу на срок более 6 месяцев");

    /**
     * The column <code>total_registered.removed_registry.living_abroad</code>.
     * Проживающие за границей
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> LIVING_ABROAD = createField(DSL.name("living_abroad"), SQLDataType.NUMERIC, this, "Проживающие за границей");

    /**
     * The column <code>total_registered.removed_registry.other</code>. Прочее
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> OTHER = createField(DSL.name("other"), SQLDataType.NUMERIC, this, "Прочее");

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

    /**
     * The column
     * <code>total_registered.removed_registry.deprivation_citizen_percents</code>.
     * Лишение гражданства в процентах
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> DEPRIVATION_CITIZEN_PERCENTS = createField(DSL.name("deprivation_citizen_percents"), SQLDataType.NUMERIC, this, "Лишение гражданства в процентах");

    /**
     * The column
     * <code>total_registered.removed_registry.age_limit_percent</code>.
     * Наступление предельного возраста в процентах
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> AGE_LIMIT_PERCENT = createField(DSL.name("age_limit_percent"), SQLDataType.NUMERIC, this, "Наступление предельного возраста в процентах");

    /**
     * The column <code>total_registered.removed_registry.death_percent</code>.
     * Смерть в процентах
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> DEATH_PERCENT = createField(DSL.name("death_percent"), SQLDataType.NUMERIC, this, "Смерть в процентах");

    /**
     * The column
     * <code>total_registered.removed_registry.travel_abroad_percent</code>.
     * Выезд за границу на срок более 6 месяцев в процентах
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> TRAVEL_ABROAD_PERCENT = createField(DSL.name("travel_abroad_percent"), SQLDataType.NUMERIC, this, "Выезд за границу на срок более 6 месяцев в процентах");

    /**
     * The column
     * <code>total_registered.removed_registry.living_abroad_percent</code>.
     * Проживающие за границей в процентах
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> LIVING_ABROAD_PERCENT = createField(DSL.name("living_abroad_percent"), SQLDataType.NUMERIC, this, "Проживающие за границей в процентах");

    /**
     * The column <code>total_registered.removed_registry.other_percent</code>.
     * Прочее в процентах
     */
    public final TableField<RemovedRegistryRecord, BigDecimal> OTHER_PERCENT = createField(DSL.name("other_percent"), SQLDataType.NUMERIC, this, "Прочее в процентах");

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

    /**
     * The column
     * <code>total_registered.removed_registry.id_removed_registry</code>.
     */
    public final TableField<RemovedRegistryRecord, Long> ID_REMOVED_REGISTRY = createField(DSL.name("id_removed_registry"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>total_registered.removed_registry.testrecruitment_id</code>.
     */
    public final TableField<RemovedRegistryRecord, String> TESTRECRUITMENT_ID = createField(DSL.name("testrecruitment_id"), SQLDataType.CHAR(36), this, "");

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

    private RemovedRegistry(Name alias, Table<RemovedRegistryRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Снято с учета уровень РФ"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>total_registered.removed_registry</code> table
     * reference
     */
    public RemovedRegistry(Name alias) {
        this(alias, REMOVED_REGISTRY);
    }

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

    public <O extends Record> RemovedRegistry(Table<O> path, ForeignKey<O, RemovedRegistryRecord> childPath, InverseForeignKey<O, RemovedRegistryRecord> parentPath) {
        super(path, childPath, parentPath, REMOVED_REGISTRY);
    }

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

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

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

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

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

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

    @Override
    public UniqueKey<RemovedRegistryRecord> getPrimaryKey() {
        return Keys.REMOVED_REGISTRY_PKEY;
    }

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

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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