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


import ervu_dashboard.ervu_dashboard.db_beans.ervu_dashboard.ErvuDashboard;
import ervu_dashboard.ervu_dashboard.db_beans.ervu_dashboard.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.ervu_dashboard.tables.records.RecruitmentRecord;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.tables.AppearSubppoena.AppearSubppoenaPath;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.tables.ConscriptionInfo.ConscriptionInfoPath;
import ervu_dashboard.ervu_dashboard.db_beans.recruitment_campaign.tables.Appeals.AppealsPath;
import ervu_dashboard.ervu_dashboard.db_beans.recruitment_campaign.tables.PostponementInfo.PostponementInfoPath;

import java.util.Collection;

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;


/**
 * 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, String> ID = createField(DSL.name("id"), SQLDataType.CHAR(36).nullable(false), this, "");

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

    /**
     * The column <code>ervu_dashboard.recruitment.idm_id</code>.
     */
    public final TableField<RecruitmentRecord, String> IDM_ID = createField(DSL.name("idm_id"), SQLDataType.VARCHAR(36), 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, String> PARENT_ID = createField(DSL.name("parent_id"), SQLDataType.CHAR(300), 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, "");

    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);
    }

    public <O extends Record> Recruitment(Table<O> path, ForeignKey<O, RecruitmentRecord> childPath, InverseForeignKey<O, RecruitmentRecord> parentPath) {
        super(path, childPath, parentPath, RECRUITMENT);
    }

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

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

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

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

    @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;
    }

    private transient AppearSubppoenaPath _appearSubppoena;

    /**
     * Get the implicit to-many join path to the
     * <code>ratings.appear_subppoena</code> table
     */
    public AppearSubppoenaPath appearSubppoena() {
        if (_appearSubppoena == null)
            _appearSubppoena = new AppearSubppoenaPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.ratings.Keys.APPEAR_SUBPPOENA__APPEAR_SUBPPOENA_FK1.getInverseKey());

        return _appearSubppoena;
    }

    private transient ConscriptionInfoPath _conscriptionInfo;

    /**
     * Get the implicit to-many join path to the
     * <code>ratings.conscription_info</code> table
     */
    public ConscriptionInfoPath conscriptionInfo() {
        if (_conscriptionInfo == null)
            _conscriptionInfo = new ConscriptionInfoPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.ratings.Keys.CONSCRIPTION_INFO__CONSCRIPTION_INFO_FK1.getInverseKey());

        return _conscriptionInfo;
    }

    private transient AppealsPath _appeals;

    /**
     * Get the implicit to-many join path to the
     * <code>recruitment_campaign.appeals</code> table
     */
    public AppealsPath appeals() {
        if (_appeals == null)
            _appeals = new AppealsPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.recruitment_campaign.Keys.APPEALS__RC_APPEALS_FK1.getInverseKey());

        return _appeals;
    }

    private transient PostponementInfoPath _postponementInfo;

    /**
     * Get the implicit to-many join path to the
     * <code>recruitment_campaign.postponement_info</code> table
     */
    public PostponementInfoPath postponementInfo() {
        if (_postponementInfo == null)
            _postponementInfo = new PostponementInfoPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.recruitment_campaign.Keys.POSTPONEMENT_INFO__POSTPONEMENT_INFO_FK1.getInverseKey());

        return _postponementInfo;
    }

    @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));
    }
}
