/*
 * This file is generated by jOOQ.
 */
package ru.micord.webbpm.ervu.business_metrics.db_beans.actualization.tables;


import java.sql.Date;
import java.sql.Timestamp;
import java.util.Collection;

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.webbpm.ervu.business_metrics.db_beans.actualization.Actualization;
import ru.micord.webbpm.ervu.business_metrics.db_beans.actualization.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.actualization.tables.records.ChangeDataFromGirVuCitizenRecord;


/**
 * Актуализация. Изменения сведений из ГИР ВУ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ChangeDataFromGirVuCitizen extends TableImpl<ChangeDataFromGirVuCitizenRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>actualization.change_data_from_gir_vu_citizen</code>
     */
    public static final ChangeDataFromGirVuCitizen CHANGE_DATA_FROM_GIR_VU_CITIZEN = new ChangeDataFromGirVuCitizen();

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

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu_citizen.change_data_from_gir_vu_citizen_id</code>.
     */
    public final TableField<ChangeDataFromGirVuCitizenRecord, Long> CHANGE_DATA_FROM_GIR_VU_CITIZEN_ID = createField(DSL.name("change_data_from_gir_vu_citizen_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu_citizen.recruitment_id</code>.
     */
    public final TableField<ChangeDataFromGirVuCitizenRecord, String> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.VARCHAR(36).nullable(false), this, "");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu_citizen.update_date</code>.
     */
    public final TableField<ChangeDataFromGirVuCitizenRecord, Timestamp> UPDATE_DATE = createField(DSL.name("update_date"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.TIMESTAMP)), this, "");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu_citizen.info_date</code>.
     */
    public final TableField<ChangeDataFromGirVuCitizenRecord, Date> INFO_DATE = createField(DSL.name("info_date"), SQLDataType.DATE.nullable(false), this, "");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu_citizen.count_unique_records</code>.
     */
    public final TableField<ChangeDataFromGirVuCitizenRecord, Long> COUNT_UNIQUE_RECORDS = createField(DSL.name("count_unique_records"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

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

    private ChangeDataFromGirVuCitizen(Name alias, Table<ChangeDataFromGirVuCitizenRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Актуализация. Изменения сведений из ГИР ВУ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased
     * <code>actualization.change_data_from_gir_vu_citizen</code> table
     * reference
     */
    public ChangeDataFromGirVuCitizen(String alias) {
        this(DSL.name(alias), CHANGE_DATA_FROM_GIR_VU_CITIZEN);
    }

    /**
     * Create an aliased
     * <code>actualization.change_data_from_gir_vu_citizen</code> table
     * reference
     */
    public ChangeDataFromGirVuCitizen(Name alias) {
        this(alias, CHANGE_DATA_FROM_GIR_VU_CITIZEN);
    }

    /**
     * Create a <code>actualization.change_data_from_gir_vu_citizen</code> table
     * reference
     */
    public ChangeDataFromGirVuCitizen() {
        this(DSL.name("change_data_from_gir_vu_citizen"), null);
    }

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

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

    @Override
    public UniqueKey<ChangeDataFromGirVuCitizenRecord> getPrimaryKey() {
        return Keys.CHANGE_DATA_FROM_GIR_VU_CITIZEN_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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