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


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.DecisionRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.decision</code>
     */
    public static final Decision DECISION = new Decision();

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

    /**
     * The column <code>ervu_dashboard.decision.decision_id</code>.
     */
    public final TableField<DecisionRecord, Long> DECISION_ID = createField(DSL.name("decision_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ervu_dashboard.decision.subpoena_id</code>.
     */
    public final TableField<DecisionRecord, UUID> SUBPOENA_ID = createField(DSL.name("subpoena_id"), SQLDataType.UUID, this, "");

    /**
     * The column <code>ervu_dashboard.decision.recruit_id</code>.
     */
    public final TableField<DecisionRecord, UUID> RECRUIT_ID = createField(DSL.name("recruit_id"), SQLDataType.UUID, this, "");

    /**
     * The column <code>ervu_dashboard.decision.recruitment_id</code>.
     */
    public final TableField<DecisionRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");

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

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

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

    /**
     * Create an aliased <code>ervu_dashboard.decision</code> table reference
     */
    public Decision(Name alias) {
        this(alias, DECISION);
    }

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

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

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

    @Override
    public UniqueKey<DecisionRecord> getPrimaryKey() {
        return Keys.DECISION_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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