/*
 * 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.Arrays;
import java.util.Collection;
import java.util.List;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
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.LoadFilesSpeedJourRecord;
import ru.micord.webbpm.ervu.business_metrics.db_beans.metrics.tables.Recruitment.RecruitmentPath;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>journal_log.load_files_speed_jour</code>
     */
    public static final LoadFilesSpeedJour LOAD_FILES_SPEED_JOUR = new LoadFilesSpeedJour();

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

    /**
     * The column
     * <code>journal_log.load_files_speed_jour.load_files_speed_jour_id</code>.
     */
    public final TableField<LoadFilesSpeedJourRecord, Long> LOAD_FILES_SPEED_JOUR_ID = createField(DSL.name("load_files_speed_jour_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>journal_log.load_files_speed_jour.count_files_in_record</code>.
     * количество записей в файле
     */
    public final TableField<LoadFilesSpeedJourRecord, Long> COUNT_FILES_IN_RECORD = createField(DSL.name("count_files_in_record"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "количество записей в файле");

    /**
     * The column <code>journal_log.load_files_speed_jour.file_time_sec</code>.
     * время загрузки файла
     */
    public final TableField<LoadFilesSpeedJourRecord, Long> FILE_TIME_SEC = createField(DSL.name("file_time_sec"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "время загрузки файла");

    /**
     * The column <code>journal_log.load_files_speed_jour.file_name</code>. имя
     * файла
     */
    public final TableField<LoadFilesSpeedJourRecord, String> FILE_NAME = createField(DSL.name("file_name"), SQLDataType.VARCHAR.nullable(false), this, "имя файла");

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

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

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

    /**
     * Create an aliased <code>journal_log.load_files_speed_jour</code> table
     * reference
     */
    public LoadFilesSpeedJour(Name alias) {
        this(alias, LOAD_FILES_SPEED_JOUR);
    }

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

    public <O extends Record> LoadFilesSpeedJour(Table<O> path, ForeignKey<O, LoadFilesSpeedJourRecord> childPath, InverseForeignKey<O, LoadFilesSpeedJourRecord> parentPath) {
        super(path, childPath, parentPath, LOAD_FILES_SPEED_JOUR);
    }

    /**
     * A subtype implementing {@link Path} for simplified path-based joins.
     */
    public static class LoadFilesSpeedJourPath extends LoadFilesSpeedJour implements Path<LoadFilesSpeedJourRecord> {
        public <O extends Record> LoadFilesSpeedJourPath(Table<O> path, ForeignKey<O, LoadFilesSpeedJourRecord> childPath, InverseForeignKey<O, LoadFilesSpeedJourRecord> parentPath) {
            super(path, childPath, parentPath);
        }
        private LoadFilesSpeedJourPath(Name alias, Table<LoadFilesSpeedJourRecord> aliased) {
            super(alias, aliased);
        }

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

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

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

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

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

    @Override
    public UniqueKey<LoadFilesSpeedJourRecord> getPrimaryKey() {
        return Keys.LOAD_FILES_SPEED_JOUR_PKEY;
    }

    @Override
    public List<ForeignKey<LoadFilesSpeedJourRecord, ?>> getReferences() {
        return Arrays.asList(Keys.LOAD_FILES_SPEED_JOUR__FK_CONV_INFO_RECORDS_FROM_EASU_RECRUITMENT_ID);
    }

    private transient RecruitmentPath _recruitment;

    /**
     * Get the implicit join path to the <code>metrics.recruitment</code> table.
     */
    public RecruitmentPath recruitment() {
        if (_recruitment == null)
            _recruitment = new RecruitmentPath(this, Keys.LOAD_FILES_SPEED_JOUR__FK_CONV_INFO_RECORDS_FROM_EASU_RECRUITMENT_ID, null);

        return _recruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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