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


import ervu_dashboard.ervu_dashboard.db_beans.space.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.space.Space;
import ervu_dashboard.ervu_dashboard.db_beans.space.tables.records.MilitaryCommissariatRecord;

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;


/**
 * Военные комиссариаты
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class MilitaryCommissariat extends TableImpl<MilitaryCommissariatRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>space.military_commissariat</code>
     */
    public static final MilitaryCommissariat MILITARY_COMMISSARIAT = new MilitaryCommissariat();

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

    /**
     * The column
     * <code>space.military_commissariat.id_military_commissariat</code>.
     */
    public final TableField<MilitaryCommissariatRecord, Long> ID_MILITARY_COMMISSARIAT = createField(DSL.name("id_military_commissariat"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>space.military_commissariat.military_commissariat_name</code>.
     * Наименование военного комиссариата
     */
    public final TableField<MilitaryCommissariatRecord, String> MILITARY_COMMISSARIAT_NAME = createField(DSL.name("military_commissariat_name"), SQLDataType.CLOB, this, "Наименование военного комиссариата");

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

    private MilitaryCommissariat(Name alias, Table<MilitaryCommissariatRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Военные комиссариаты"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>space.military_commissariat</code> table
     * reference
     */
    public MilitaryCommissariat(String alias) {
        this(DSL.name(alias), MILITARY_COMMISSARIAT);
    }

    /**
     * Create an aliased <code>space.military_commissariat</code> table
     * reference
     */
    public MilitaryCommissariat(Name alias) {
        this(alias, MILITARY_COMMISSARIAT);
    }

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

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

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

    @Override
    public UniqueKey<MilitaryCommissariatRecord> getPrimaryKey() {
        return Keys.PK_MILITARY_COMMISSARIAT;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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