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


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.summonses_list.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.summonses_list.SummonsesList;
import ru.micord.webbpm.ervu.business_metrics.db_beans.summonses_list.tables.records.SupportLkRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>summonses_list.support_lk</code>
     */
    public static final SupportLk SUPPORT_LK = new SupportLk();

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

    /**
     * The column <code>summonses_list.support_lk.support_lk_id</code>.
     */
    public final TableField<SupportLkRecord, Long> SUPPORT_LK_ID = createField(DSL.name("support_lk_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column <code>summonses_list.support_lk.summonses_reason_id</code>.
     */
    public final TableField<SupportLkRecord, Long> SUMMONSES_REASON_ID = createField(DSL.name("summonses_reason_id"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column <code>summonses_list.support_lk.system_pgs_status</code>.
     */
    public final TableField<SupportLkRecord, String> SYSTEM_PGS_STATUS = createField(DSL.name("system_pgs_status"), SQLDataType.VARCHAR(10), this, "");

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

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

    /**
     * Create an aliased <code>summonses_list.support_lk</code> table reference
     */
    public SupportLk(String alias) {
        this(DSL.name(alias), SUPPORT_LK);
    }

    /**
     * Create an aliased <code>summonses_list.support_lk</code> table reference
     */
    public SupportLk(Name alias) {
        this(alias, SUPPORT_LK);
    }

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

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

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

    @Override
    public UniqueKey<SupportLkRecord> getPrimaryKey() {
        return Keys.SUPPORT_LK_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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