/*
 * 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.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.ArrayRegRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.array_reg</code>
     */
    public static final ArrayReg ARRAY_REG = new ArrayReg();

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

    /**
     * The column <code>ervu_dashboard.array_reg.recruitment_reg_id</code>.
     */
    public final TableField<ArrayRegRecord, UUID> RECRUITMENT_REG_ID = createField(DSL.name("recruitment_reg_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column <code>ervu_dashboard.array_reg.vk_array_id</code>.
     */
    public final TableField<ArrayRegRecord, String> VK_ARRAY_ID = createField(DSL.name("vk_array_id"), SQLDataType.VARCHAR, this, "");

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

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

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

    /**
     * Create an aliased <code>ervu_dashboard.array_reg</code> table reference
     */
    public ArrayReg(Name alias) {
        this(alias, ARRAY_REG);
    }

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

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

    @Override
    public UniqueKey<ArrayRegRecord> getPrimaryKey() {
        return Keys.ARRAY_REG_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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