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


/**
 * Постановка на воинский учет при смене адреса. Инциденты ЕПГУ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class IncidentsEpguInfo extends TableImpl<IncidentsEpguInfoRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>registration_change_address.incidents_epgu_info</code>
     */
    public static final IncidentsEpguInfo INCIDENTS_EPGU_INFO = new IncidentsEpguInfo();

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

    /**
     * The column
     * <code>registration_change_address.incidents_epgu_info.incidents_epgu_info_id</code>.
     */
    public final TableField<IncidentsEpguInfoRecord, Long> INCIDENTS_EPGU_INFO_ID = createField(DSL.name("incidents_epgu_info_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>registration_change_address.incidents_epgu_info.count_identify</code>.
     */
    public final TableField<IncidentsEpguInfoRecord, Long> COUNT_IDENTIFY = createField(DSL.name("count_identify"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>registration_change_address.incidents_epgu_info.count_registered</code>.
     */
    public final TableField<IncidentsEpguInfoRecord, Long> COUNT_REGISTERED = createField(DSL.name("count_registered"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

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

    private IncidentsEpguInfo(Name alias, Table<IncidentsEpguInfoRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Постановка на воинский учет при смене адреса. Инциденты ЕПГУ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased
     * <code>registration_change_address.incidents_epgu_info</code> table
     * reference
     */
    public IncidentsEpguInfo(String alias) {
        this(DSL.name(alias), INCIDENTS_EPGU_INFO);
    }

    /**
     * Create an aliased
     * <code>registration_change_address.incidents_epgu_info</code> table
     * reference
     */
    public IncidentsEpguInfo(Name alias) {
        this(alias, INCIDENTS_EPGU_INFO);
    }

    /**
     * Create a <code>registration_change_address.incidents_epgu_info</code>
     * table reference
     */
    public IncidentsEpguInfo() {
        this(DSL.name("incidents_epgu_info"), null);
    }

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

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

    @Override
    public UniqueKey<IncidentsEpguInfoRecord> getPrimaryKey() {
        return Keys.INCIDENTS_EPGU_INFO_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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