/*
 * This file is generated by jOOQ.
 */
package ru.micord.webbpm.ervu.business_metrics.db_beans.deregistration.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.deregistration.Deregistration;
import ru.micord.webbpm.ervu.business_metrics.db_beans.deregistration.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.deregistration.tables.records.DataFromGisErvuRecord;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DataFromGisErvu extends TableImpl<DataFromGisErvuRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>deregistration.data_from_gis_ervu</code>
     */
    public static final DataFromGisErvu DATA_FROM_GIS_ERVU = new DataFromGisErvu();

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

    /**
     * The column
     * <code>deregistration.data_from_gis_ervu.data_from_gis_ervu_id</code>.
     */
    public final TableField<DataFromGisErvuRecord, Long> DATA_FROM_GIS_ERVU_ID = createField(DSL.name("data_from_gis_ervu_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>deregistration.data_from_gis_ervu.count_collated_data</code>.
     * данных гражданина сверено с данными ГИС ЕРВУ
     */
    public final TableField<DataFromGisErvuRecord, Long> COUNT_COLLATED_DATA = createField(DSL.name("count_collated_data"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "данных гражданина сверено с данными ГИС ЕРВУ");

    /**
     * The column <code>deregistration.data_from_gis_ervu.count_collated</code>.
     * записей сопоставлено с ГИС ЕРВУ
     */
    public final TableField<DataFromGisErvuRecord, Long> COUNT_COLLATED = createField(DSL.name("count_collated"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "записей сопоставлено с ГИС ЕРВУ");

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

    private DataFromGisErvu(Name alias, Table<DataFromGisErvuRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>deregistration.data_from_gis_ervu</code> table
     * reference
     */
    public DataFromGisErvu(String alias) {
        this(DSL.name(alias), DATA_FROM_GIS_ERVU);
    }

    /**
     * Create an aliased <code>deregistration.data_from_gis_ervu</code> table
     * reference
     */
    public DataFromGisErvu(Name alias) {
        this(alias, DATA_FROM_GIS_ERVU);
    }

    /**
     * Create a <code>deregistration.data_from_gis_ervu</code> table reference
     */
    public DataFromGisErvu() {
        this(DSL.name("data_from_gis_ervu"), null);
    }

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

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

    @Override
    public UniqueKey<DataFromGisErvuRecord> getPrimaryKey() {
        return Keys.DATA_FROM_GIS_ERVU_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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