/*
 * This file is generated by jOOQ.
 */
package ru.micord.webbpm.ervu.business_metrics.db_beans.public_.tables;


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.public_.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.public_.Public;
import ru.micord.webbpm.ervu.business_metrics.db_beans.public_.tables.records.JobLogRecord;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class JobLog extends TableImpl<JobLogRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.job_log</code>
     */
    public static final JobLog JOB_LOG = new JobLog();

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

    /**
     * The column <code>public.job_log.jobname</code>.
     */
    public final TableField<JobLogRecord, String> JOBNAME = createField(DSL.name("jobname"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>public.job_log.status</code>.
     */
    public final TableField<JobLogRecord, String> STATUS = createField(DSL.name("status"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>public.job_log.enddate</code>.
     */
    public final TableField<JobLogRecord, Timestamp> ENDDATE = createField(DSL.name("enddate"), SQLDataType.TIMESTAMP(0), this, "");

    /**
     * The column <code>public.job_log.depdate</code>.
     */
    public final TableField<JobLogRecord, Timestamp> DEPDATE = createField(DSL.name("depdate"), SQLDataType.TIMESTAMP(0), this, "");

    /**
     * The column <code>public.job_log.startdate</code>.
     */
    public final TableField<JobLogRecord, Timestamp> STARTDATE = createField(DSL.name("startdate"), SQLDataType.TIMESTAMP(0), this, "");

    /**
     * The column <code>public.job_log.logdate</code>.
     */
    public final TableField<JobLogRecord, Timestamp> LOGDATE = createField(DSL.name("logdate"), SQLDataType.TIMESTAMP(0), this, "");

    /**
     * The column <code>public.job_log.channel_id</code>.
     */
    public final TableField<JobLogRecord, String> CHANNEL_ID = createField(DSL.name("channel_id"), SQLDataType.VARCHAR, this, "");

    /**
     * The column <code>public.job_log.id_job</code>.
     */
    public final TableField<JobLogRecord, Long> ID_JOB = createField(DSL.name("id_job"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>public.job_log.replaydate</code>.
     */
    public final TableField<JobLogRecord, Timestamp> REPLAYDATE = createField(DSL.name("replaydate"), SQLDataType.TIMESTAMP(0), this, "");

    /**
     * The column <code>public.job_log.log_field</code>.
     */
    public final TableField<JobLogRecord, String> LOG_FIELD = createField(DSL.name("log_field"), SQLDataType.VARCHAR, this, "");

    /**
     * The column <code>public.job_log.errors</code>.
     */
    public final TableField<JobLogRecord, Integer> ERRORS = createField(DSL.name("errors"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>public.job_log.lines_rejected</code>.
     */
    public final TableField<JobLogRecord, Integer> LINES_REJECTED = createField(DSL.name("lines_rejected"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>public.job_log.lines_updated</code>.
     */
    public final TableField<JobLogRecord, Integer> LINES_UPDATED = createField(DSL.name("lines_updated"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>public.job_log.lines_input</code>.
     */
    public final TableField<JobLogRecord, Integer> LINES_INPUT = createField(DSL.name("lines_input"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>public.job_log.lines_output</code>.
     */
    public final TableField<JobLogRecord, Integer> LINES_OUTPUT = createField(DSL.name("lines_output"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>public.job_log.lines_written</code>.
     */
    public final TableField<JobLogRecord, Integer> LINES_WRITTEN = createField(DSL.name("lines_written"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>public.job_log.lines_read</code>.
     */
    public final TableField<JobLogRecord, Integer> LINES_READ = createField(DSL.name("lines_read"), SQLDataType.INTEGER, this, "");

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

    private JobLog(Name alias, Table<JobLogRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>public.job_log</code> table reference
     */
    public JobLog(String alias) {
        this(DSL.name(alias), JOB_LOG);
    }

    /**
     * Create an aliased <code>public.job_log</code> table reference
     */
    public JobLog(Name alias) {
        this(alias, JOB_LOG);
    }

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

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

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

    @Override
    public UniqueKey<JobLogRecord> getPrimaryKey() {
        return Keys.JOB_LOG_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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