/*
 * This file is generated by jOOQ.
 */
package ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables;


import java.sql.Timestamp;
import java.util.Collection;
import java.util.UUID;

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.ervu_dashboard.db_beans.ervu_dashboard.ErvuDashboard;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.Keys;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables.records.RecruitmentRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.recruitment</code>
     */
    public static final Recruitment RECRUITMENT = new Recruitment();

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

    /**
     * The column <code>ervu_dashboard.recruitment.id</code>.
     */
    public final TableField<RecruitmentRecord, UUID> ID = createField(DSL.name("id"), SQLDataType.UUID, this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.shortname</code>.
     */
    public final TableField<RecruitmentRecord, String> SHORTNAME = createField(DSL.name("shortname"), SQLDataType.VARCHAR, this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.idm_id</code>.
     */
    public final TableField<RecruitmentRecord, UUID> IDM_ID = createField(DSL.name("idm_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.code</code>.
     */
    public final TableField<RecruitmentRecord, String> CODE = createField(DSL.name("code"), SQLDataType.CHAR(300), this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.parent_id</code>.
     */
    public final TableField<RecruitmentRecord, UUID> PARENT_ID = createField(DSL.name("parent_id"), SQLDataType.UUID, this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.sort</code>.
     */
    public final TableField<RecruitmentRecord, Long> SORT = createField(DSL.name("sort"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.schema</code>.
     */
    public final TableField<RecruitmentRecord, String> SCHEMA = createField(DSL.name("schema"), SQLDataType.VARCHAR(64), this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.updated_at</code>.
     */
    public final TableField<RecruitmentRecord, Timestamp> UPDATED_AT = createField(DSL.name("updated_at"), SQLDataType.TIMESTAMP(0), this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.created_at</code>.
     */
    public final TableField<RecruitmentRecord, Timestamp> CREATED_AT = createField(DSL.name("created_at"), SQLDataType.TIMESTAMP(0), this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.hidden</code>.
     */
    public final TableField<RecruitmentRecord, Boolean> HIDDEN = createField(DSL.name("hidden"), SQLDataType.BOOLEAN, this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.enabled</code>.
     */
    public final TableField<RecruitmentRecord, Boolean> ENABLED = createField(DSL.name("enabled"), SQLDataType.BOOLEAN, this, "");

    /**
     * The column <code>ervu_dashboard.recruitment.reports_enabled</code>.
     */
    public final TableField<RecruitmentRecord, Boolean> REPORTS_ENABLED = createField(DSL.name("reports_enabled"), SQLDataType.BOOLEAN, this, "");

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

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

    /**
     * Create an aliased <code>ervu_dashboard.recruitment</code> table reference
     */
    public Recruitment(String alias) {
        this(DSL.name(alias), RECRUITMENT);
    }

    /**
     * Create an aliased <code>ervu_dashboard.recruitment</code> table reference
     */
    public Recruitment(Name alias) {
        this(alias, RECRUITMENT);
    }

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

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

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

    @Override
    public UniqueKey<RecruitmentRecord> getPrimaryKey() {
        return Keys.RECRUITMENT_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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