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


/**
 * Журналирование. Журнал загрузки файлов
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class LoadFilesJour extends TableImpl<LoadFilesJourRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>journal_log.load_files_jour</code>
     */
    public static final LoadFilesJour LOAD_FILES_JOUR = new LoadFilesJour();

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

    /**
     * The column <code>journal_log.load_files_jour.load_files_jour_id</code>.
     */
    public final TableField<LoadFilesJourRecord, Long> LOAD_FILES_JOUR_ID = createField(DSL.name("load_files_jour_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>journal_log.load_files_jour.count_load_without_error</code>.
     * загружено без ошибок
     */
    public final TableField<LoadFilesJourRecord, Long> COUNT_LOAD_WITHOUT_ERROR = createField(DSL.name("count_load_without_error"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "загружено без ошибок");

    /**
     * The column
     * <code>journal_log.load_files_jour.count_not_load_by_error</code>. не
     * загружено из-за ошибок
     */
    public final TableField<LoadFilesJourRecord, Long> COUNT_NOT_LOAD_BY_ERROR = createField(DSL.name("count_not_load_by_error"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "не загружено из-за ошибок");

    /**
     * The column
     * <code>journal_log.load_files_jour.count_load_with_error</code>. загружено
     * с ошибками
     */
    public final TableField<LoadFilesJourRecord, Long> COUNT_LOAD_WITH_ERROR = createField(DSL.name("count_load_with_error"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "загружено с ошибками");

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

    private LoadFilesJour(Name alias, Table<LoadFilesJourRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Журналирование. Журнал загрузки файлов"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>journal_log.load_files_jour</code> table
     * reference
     */
    public LoadFilesJour(Name alias) {
        this(alias, LOAD_FILES_JOUR);
    }

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

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

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

    @Override
    public UniqueKey<LoadFilesJourRecord> getPrimaryKey() {
        return Keys.LOAD_FILES_JOUR_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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