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


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>actualization.change_data_from_gir_vu</code>
     */
    public static final ChangeDataFromGirVu CHANGE_DATA_FROM_GIR_VU = new ChangeDataFromGirVu();

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

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.change_data_from_gir_vu_id</code>.
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> CHANGE_DATA_FROM_GIR_VU_ID = createField(DSL.name("change_data_from_gir_vu_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.update_date</code>.
     */
    public final TableField<ChangeDataFromGirVuRecord, 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.info_date</code>.
     */
    public final TableField<ChangeDataFromGirVuRecord, Date> INFO_DATE = createField(DSL.name("info_date"), SQLDataType.DATE.nullable(false), this, "");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_reg_address</code>.
     * новое место жит-ва
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_REG_ADDRESS = createField(DSL.name("count_reg_address"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "новое место жит-ва");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_place_of_stay</code>.
     * новое место пребывания
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_PLACE_OF_STAY = createField(DSL.name("count_place_of_stay"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "новое место пребывания");

    /**
     * The column <code>actualization.change_data_from_gir_vu.count_work</code>.
     * новое место работы
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_WORK = createField(DSL.name("count_work"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "новое место работы");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_place_of_study</code>.
     * новое место учебы
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_PLACE_OF_STUDY = createField(DSL.name("count_place_of_study"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "новое место учебы");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_family_status</code>.
     * новое семейное положение
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_FAMILY_STATUS = createField(DSL.name("count_family_status"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "новое семейное положение");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_education</code>. новое
     * образование
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_EDUCATION = createField(DSL.name("count_education"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "новое образование");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_renaming</code>.
     * перемена ФИО
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_RENAMING = createField(DSL.name("count_renaming"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "перемена ФИО");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_med_info</code>. новые
     * мед данные
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_MED_INFO = createField(DSL.name("count_med_info"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "новые мед данные");

    /**
     * The column
     * <code>actualization.change_data_from_gir_vu.count_other</code>. другие
     * причины
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_OTHER = createField(DSL.name("count_other"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "другие причины");

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

    private ChangeDataFromGirVu(Name alias, Table<ChangeDataFromGirVuRecord> 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</code>
     * table reference
     */
    public ChangeDataFromGirVu(String alias) {
        this(DSL.name(alias), CHANGE_DATA_FROM_GIR_VU);
    }

    /**
     * Create an aliased <code>actualization.change_data_from_gir_vu</code>
     * table reference
     */
    public ChangeDataFromGirVu(Name alias) {
        this(alias, CHANGE_DATA_FROM_GIR_VU);
    }

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

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

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

    @Override
    public UniqueKey<ChangeDataFromGirVuRecord> getPrimaryKey() {
        return Keys.CHANGE_DATA_FROM_GIR_VU_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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