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


import java.sql.Date;
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.CitizenshipRecord;


/**
 * сведения о гражданстве РФ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Citizenship extends TableImpl<CitizenshipRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.citizenship</code>
     */
    public static final Citizenship CITIZENSHIP = new Citizenship();

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

    /**
     * The column <code>ervu_dashboard.citizenship.citizenship_id</code>.
     */
    public final TableField<CitizenshipRecord, Long> CITIZENSHIP_ID = createField(DSL.name("citizenship_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ervu_dashboard.citizenship.recruit_id</code>. ссылка на
     * гражданина (citizen)
     */
    public final TableField<CitizenshipRecord, UUID> RECRUIT_ID = createField(DSL.name("recruit_id"), SQLDataType.UUID.nullable(false), this, "ссылка на гражданина (citizen)");

    /**
     * The column <code>ervu_dashboard.citizenship.acquiring_basis</code>.
     * основание приобретения гражданства РФ
     */
    public final TableField<CitizenshipRecord, String> ACQUIRING_BASIS = createField(DSL.name("acquiring_basis"), SQLDataType.CLOB, this, "основание приобретения гражданства РФ");

    /**
     * The column <code>ervu_dashboard.citizenship.acquiring_number</code>.
     * номер решения о приобретении гражданства РФ
     */
    public final TableField<CitizenshipRecord, String> ACQUIRING_NUMBER = createField(DSL.name("acquiring_number"), SQLDataType.VARCHAR(20), this, "номер решения о приобретении гражданства РФ");

    /**
     * The column <code>ervu_dashboard.citizenship.acquiring_date</code>. дата
     * решения о приобретении гражданства РФ
     */
    public final TableField<CitizenshipRecord, Date> ACQUIRING_DATE = createField(DSL.name("acquiring_date"), SQLDataType.DATE, this, "дата решения о приобретении гражданства РФ");

    /**
     * The column <code>ervu_dashboard.citizenship.acquiring_authority</code>.
     * наименование органа, принявшего решение о приобретении гражданства РФ
     */
    public final TableField<CitizenshipRecord, String> ACQUIRING_AUTHORITY = createField(DSL.name("acquiring_authority"), SQLDataType.CLOB, this, "наименование органа, принявшего решение о приобретении гражданства РФ");

    /**
     * The column <code>ervu_dashboard.citizenship.renunciation_basis</code>.
     * основание выхода гражданства РФ
     */
    public final TableField<CitizenshipRecord, String> RENUNCIATION_BASIS = createField(DSL.name("renunciation_basis"), SQLDataType.CLOB, this, "основание выхода гражданства РФ");

    /**
     * The column <code>ervu_dashboard.citizenship.renunciation_number</code>.
     * номер решения о выходе из гражданства РФ
     */
    public final TableField<CitizenshipRecord, String> RENUNCIATION_NUMBER = createField(DSL.name("renunciation_number"), SQLDataType.VARCHAR(20), this, "номер решения о выходе из гражданства РФ");

    /**
     * The column <code>ervu_dashboard.citizenship.renunciation_date</code>.
     * дата решения о выходе из гражданства РФ
     */
    public final TableField<CitizenshipRecord, Date> RENUNCIATION_DATE = createField(DSL.name("renunciation_date"), SQLDataType.DATE, this, "дата решения о выходе из гражданства РФ");

    /**
     * The column
     * <code>ervu_dashboard.citizenship.renunciation_authority</code>.
     * наименование органа, принявшего решение о выходе из гражданства РФ
     */
    public final TableField<CitizenshipRecord, String> RENUNCIATION_AUTHORITY = createField(DSL.name("renunciation_authority"), SQLDataType.CLOB, this, "наименование органа, принявшего решение о выходе из гражданства РФ");

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

    private Citizenship(Name alias, Table<CitizenshipRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("сведения о гражданстве РФ"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.citizenship</code> table reference
     */
    public Citizenship(Name alias) {
        this(alias, CITIZENSHIP);
    }

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

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

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

    @Override
    public UniqueKey<CitizenshipRecord> getPrimaryKey() {
        return Keys.PK_CITIZENSHIP;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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