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


import java.util.Collection;
import java.util.UUID;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Identity;
import org.jooq.Name;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
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;

import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.ErvuDashboard;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.Keys;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables.records.RecruitmentCorrespondencesRecord;


/**
 * Таблица субъектов с привязкой к справочнику ПОС
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class RecruitmentCorrespondences extends TableImpl<RecruitmentCorrespondencesRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>ervu_dashboard.recruitment_correspondences</code>
     */
    public static final RecruitmentCorrespondences RECRUITMENT_CORRESPONDENCES = new RecruitmentCorrespondences();

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

    /**
     * The column <code>ervu_dashboard.recruitment_correspondences.id</code>.
     */
    public final TableField<RecruitmentCorrespondencesRecord, Long> ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>ervu_dashboard.recruitment_correspondences.subject_recruitment</code>.
     * Субъектовый ВК
     */
    public final TableField<RecruitmentCorrespondencesRecord, String> SUBJECT_RECRUITMENT = createField(DSL.name("subject_recruitment"), SQLDataType.VARCHAR.nullable(false), this, "Субъектовый ВК");

    /**
     * The column
     * <code>ervu_dashboard.recruitment_correspondences.idm_id</code>.
     * Идентификатор из IDM системы
     */
    public final TableField<RecruitmentCorrespondencesRecord, UUID> IDM_ID = createField(DSL.name("idm_id"), SQLDataType.UUID.nullable(false), this, "Идентификатор из IDM системы");

    /**
     * The column
     * <code>ervu_dashboard.recruitment_correspondences.pos_code</code>. Код из
     * справочника ПОС
     */
    public final TableField<RecruitmentCorrespondencesRecord, String> POS_CODE = createField(DSL.name("pos_code"), SQLDataType.VARCHAR(50).nullable(false), this, "Код из справочника ПОС");

    /**
     * The column
     * <code>ervu_dashboard.recruitment_correspondences.region_name</code>.
     * Название региона
     */
    public final TableField<RecruitmentCorrespondencesRecord, String> REGION_NAME = createField(DSL.name("region_name"), SQLDataType.VARCHAR(500).nullable(false), this, "Название региона");

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

    private RecruitmentCorrespondences(Name alias, Table<RecruitmentCorrespondencesRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Таблица субъектов с привязкой к справочнику ПОС"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>ervu_dashboard.recruitment_correspondences</code>
     * table reference
     */
    public RecruitmentCorrespondences(String alias) {
        this(DSL.name(alias), RECRUITMENT_CORRESPONDENCES);
    }

    /**
     * Create an aliased <code>ervu_dashboard.recruitment_correspondences</code>
     * table reference
     */
    public RecruitmentCorrespondences(Name alias) {
        this(alias, RECRUITMENT_CORRESPONDENCES);
    }

    /**
     * Create a <code>ervu_dashboard.recruitment_correspondences</code> table
     * reference
     */
    public RecruitmentCorrespondences() {
        this(DSL.name("recruitment_correspondences"), null);
    }

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

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

    @Override
    public UniqueKey<RecruitmentCorrespondencesRecord> getPrimaryKey() {
        return Keys.RECRUITMENT_CORRESPONDENCES_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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