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


/**
 * Журналирование. Ошибки обмена данными с реестром повесток
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class SummonsesListDataExchangeError extends TableImpl<SummonsesListDataExchangeErrorRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>journal_log.summonses_list_data_exchange_error</code>
     */
    public static final SummonsesListDataExchangeError SUMMONSES_LIST_DATA_EXCHANGE_ERROR = new SummonsesListDataExchangeError();

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

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.summonses_list_data_exchange_error_id</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, Long> SUMMONSES_LIST_DATA_EXCHANGE_ERROR_ID = createField(DSL.name("summonses_list_data_exchange_error_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.count_error_1</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, Long> COUNT_ERROR_1 = createField(DSL.name("count_error_1"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.count_error_2</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, Long> COUNT_ERROR_2 = createField(DSL.name("count_error_2"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.count_error_3</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, Long> COUNT_ERROR_3 = createField(DSL.name("count_error_3"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.count_error_4</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, Long> COUNT_ERROR_4 = createField(DSL.name("count_error_4"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.error_name_1</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, String> ERROR_NAME_1 = createField(DSL.name("error_name_1"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.error_name_2</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, String> ERROR_NAME_2 = createField(DSL.name("error_name_2"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.error_name_3</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, String> ERROR_NAME_3 = createField(DSL.name("error_name_3"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.error_name_4</code>.
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, String> ERROR_NAME_4 = createField(DSL.name("error_name_4"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column
     * <code>journal_log.summonses_list_data_exchange_error.info_source</code>.
     * Тип: ENTER_SYSTEM - вход в систему, STATEMENT_REQUEST -  запрос выписки
     */
    public final TableField<SummonsesListDataExchangeErrorRecord, String> INFO_SOURCE = createField(DSL.name("info_source"), SQLDataType.VARCHAR.nullable(false), this, "Тип: ENTER_SYSTEM - вход в систему, STATEMENT_REQUEST -  запрос выписки");

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

    private SummonsesListDataExchangeError(Name alias, Table<SummonsesListDataExchangeErrorRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Журналирование. Ошибки обмена данными с реестром повесток"), TableOptions.table(), where);
    }

    /**
     * Create an aliased
     * <code>journal_log.summonses_list_data_exchange_error</code> table
     * reference
     */
    public SummonsesListDataExchangeError(String alias) {
        this(DSL.name(alias), SUMMONSES_LIST_DATA_EXCHANGE_ERROR);
    }

    /**
     * Create an aliased
     * <code>journal_log.summonses_list_data_exchange_error</code> table
     * reference
     */
    public SummonsesListDataExchangeError(Name alias) {
        this(alias, SUMMONSES_LIST_DATA_EXCHANGE_ERROR);
    }

    /**
     * Create a <code>journal_log.summonses_list_data_exchange_error</code>
     * table reference
     */
    public SummonsesListDataExchangeError() {
        this(DSL.name("summonses_list_data_exchange_error"), null);
    }

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

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

    @Override
    public UniqueKey<SummonsesListDataExchangeErrorRecord> getPrimaryKey() {
        return Keys.SUMMONSES_LIST_DATA_EXCHANGE_ERROR_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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