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


/**
 * Журналирование. Ошибки направлений уведомлений на ЕПГУ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class EpguNoticeSentError extends TableImpl<EpguNoticeSentErrorRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>journal_log.epgu_notice_sent_error</code>
     */
    public static final EpguNoticeSentError EPGU_NOTICE_SENT_ERROR = new EpguNoticeSentError();

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

    /**
     * The column
     * <code>journal_log.epgu_notice_sent_error.epgu_notice_sent_error_id</code>.
     */
    public final TableField<EpguNoticeSentErrorRecord, Long> EPGU_NOTICE_SENT_ERROR_ID = createField(DSL.name("epgu_notice_sent_error_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>journal_log.epgu_notice_sent_error.count_sending_timeout</code>.
     * превышено время ожидания отправки
     */
    public final TableField<EpguNoticeSentErrorRecord, Long> COUNT_SENDING_TIMEOUT = createField(DSL.name("count_sending_timeout"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "превышено время ожидания отправки");

    /**
     * The column
     * <code>journal_log.epgu_notice_sent_error.count_delivery_timeout</code>.
     * превышено время ожидания доставки
     */
    public final TableField<EpguNoticeSentErrorRecord, Long> COUNT_DELIVERY_TIMEOUT = createField(DSL.name("count_delivery_timeout"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "превышено время ожидания доставки");

    /**
     * The column <code>journal_log.epgu_notice_sent_error.count_error</code>.
     * ошибка. адресат не найден
     */
    public final TableField<EpguNoticeSentErrorRecord, Long> COUNT_ERROR = createField(DSL.name("count_error"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "ошибка. адресат не найден");

    /**
     * The column
     * <code>journal_log.epgu_notice_sent_error.count_not_formed</code>. не
     * сформировано
     */
    public final TableField<EpguNoticeSentErrorRecord, Long> COUNT_NOT_FORMED = createField(DSL.name("count_not_formed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "не сформировано");

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

    private EpguNoticeSentError(Name alias, Table<EpguNoticeSentErrorRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Журналирование. Ошибки направлений уведомлений на ЕПГУ"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>journal_log.epgu_notice_sent_error</code> table
     * reference
     */
    public EpguNoticeSentError(Name alias) {
        this(alias, EPGU_NOTICE_SENT_ERROR);
    }

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

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

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

    @Override
    public UniqueKey<EpguNoticeSentErrorRecord> getPrimaryKey() {
        return Keys.EPGU_NOTICE_SENT_ERROR_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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