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


import ervu_dashboard.ervu_dashboard.db_beans.public_.tables.PubRecruitment.PubRecruitmentPath;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.Ratings;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.tables.records.AppearSubppoenaRecord;
import ervu_dashboard.ervu_dashboard.db_beans.space.tables.Region.RegionPath;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.UUID;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
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 AppearSubppoena extends TableImpl<AppearSubppoenaRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ratings.appear_subppoena</code>
     */
    public static final AppearSubppoena APPEAR_SUBPPOENA = new AppearSubppoena();

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

    /**
     * The column <code>ratings.appear_subppoena.id_appear_subppoena</code>.
     */
    public final TableField<AppearSubppoenaRecord, Long> ID_APPEAR_SUBPPOENA = createField(DSL.name("id_appear_subppoena"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ratings.appear_subppoena.id_region</code>.
     */
    public final TableField<AppearSubppoenaRecord, Integer> ID_REGION = createField(DSL.name("id_region"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>ratings.appear_subppoena.appear_mil_com</code>. Явка в
     * военкомат
     */
    public final TableField<AppearSubppoenaRecord, BigDecimal> APPEAR_MIL_COM = createField(DSL.name("appear_mil_com"), SQLDataType.NUMERIC, this, "Явка в военкомат");

    /**
     * The column <code>ratings.appear_subppoena.recording_date</code>. Дата
     * записи
     */
    public final TableField<AppearSubppoenaRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE, this, "Дата записи");

    /**
     * The column <code>ratings.appear_subppoena.appear_mil_com_percent</code>.
     * Явка в военкомат в процентах
     */
    public final TableField<AppearSubppoenaRecord, BigDecimal> APPEAR_MIL_COM_PERCENT = createField(DSL.name("appear_mil_com_percent"), SQLDataType.NUMERIC, this, "Явка в военкомат в процентах");

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

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

    private AppearSubppoena(Name alias, Table<AppearSubppoenaRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Явка по повестке уровень РФ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>ratings.appear_subppoena</code> table reference
     */
    public AppearSubppoena(String alias) {
        this(DSL.name(alias), APPEAR_SUBPPOENA);
    }

    /**
     * Create an aliased <code>ratings.appear_subppoena</code> table reference
     */
    public AppearSubppoena(Name alias) {
        this(alias, APPEAR_SUBPPOENA);
    }

    /**
     * Create a <code>ratings.appear_subppoena</code> table reference
     */
    public AppearSubppoena() {
        this(DSL.name("appear_subppoena"), null);
    }

    public <O extends Record> AppearSubppoena(Table<O> path, ForeignKey<O, AppearSubppoenaRecord> childPath, InverseForeignKey<O, AppearSubppoenaRecord> parentPath) {
        super(path, childPath, parentPath, APPEAR_SUBPPOENA);
    }

    /**
     * A subtype implementing {@link Path} for simplified path-based joins.
     */
    public static class AppearSubppoenaPath extends AppearSubppoena implements Path<AppearSubppoenaRecord> {
        public <O extends Record> AppearSubppoenaPath(Table<O> path, ForeignKey<O, AppearSubppoenaRecord> childPath, InverseForeignKey<O, AppearSubppoenaRecord> parentPath) {
            super(path, childPath, parentPath);
        }
        private AppearSubppoenaPath(Name alias, Table<AppearSubppoenaRecord> aliased) {
            super(alias, aliased);
        }

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

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

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

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

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

    @Override
    public UniqueKey<AppearSubppoenaRecord> getPrimaryKey() {
        return Keys.PK_APPEAR_SUBPPOENA;
    }

    @Override
    public List<ForeignKey<AppearSubppoenaRecord, ?>> getReferences() {
        return Arrays.asList(Keys.APPEAR_SUBPPOENA__FK_REGION, Keys.APPEAR_SUBPPOENA__APPEAR_SUBPPOENA_FK1);
    }

    private transient RegionPath _region;

    /**
     * Get the implicit join path to the <code>space.region</code> table.
     */
    public RegionPath region() {
        if (_region == null)
            _region = new RegionPath(this, Keys.APPEAR_SUBPPOENA__FK_REGION, null);

        return _region;
    }

    private transient PubRecruitmentPath _pubRecruitment;

    /**
     * Get the implicit join path to the <code>public.pub_recruitment</code>
     * table.
     */
    public PubRecruitmentPath pubRecruitment() {
        if (_pubRecruitment == null)
            _pubRecruitment = new PubRecruitmentPath(this, Keys.APPEAR_SUBPPOENA__APPEAR_SUBPPOENA_FK1, null);

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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