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


import ervu_dashboard.ervu_dashboard.db_beans.appeals.tables.MainProfile.MainProfilePath;
import ervu_dashboard.ervu_dashboard.db_beans.appeals.tables.ReasonsAppeal.ReasonsAppealPath;
import ervu_dashboard.ervu_dashboard.db_beans.appeals.tables.ReviewRating.ReviewRatingPath;
import ervu_dashboard.ervu_dashboard.db_beans.appeals.tables.TopicAppeal.TopicAppealPath;
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.PubRecruitmentRecord;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.tables.ConsiderationComplaint.ConsiderationComplaintPath;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
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 PubRecruitment extends TableImpl<PubRecruitmentRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.pub_recruitment</code>
     */
    public static final PubRecruitment PUB_RECRUITMENT = new PubRecruitment();

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

    /**
     * The column <code>ervu_dashboard.pub_recruitment.idm_id</code>.
     */
    public final TableField<PubRecruitmentRecord, String> IDM_ID = createField(DSL.name("idm_id"), SQLDataType.VARCHAR(256), this, "");

    /**
     * The column <code>ervu_dashboard.pub_recruitment.parent_id</code>.
     */
    public final TableField<PubRecruitmentRecord, String> PARENT_ID = createField(DSL.name("parent_id"), SQLDataType.VARCHAR, this, "");

    /**
     * The column <code>ervu_dashboard.pub_recruitment.military_code</code>.
     */
    public final TableField<PubRecruitmentRecord, String> MILITARY_CODE = createField(DSL.name("military_code"), SQLDataType.VARCHAR, this, "");

    /**
     * The column <code>ervu_dashboard.pub_recruitment.shortname</code>.
     */
    public final TableField<PubRecruitmentRecord, String> SHORTNAME = createField(DSL.name("shortname"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>ervu_dashboard.pub_recruitment.fullname</code>.
     */
    public final TableField<PubRecruitmentRecord, String> FULLNAME = createField(DSL.name("fullname"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>ervu_dashboard.pub_recruitment.code</code>.
     */
    public final TableField<PubRecruitmentRecord, String> CODE = createField(DSL.name("code"), SQLDataType.VARCHAR(64), this, "");

    /**
     * The column <code>ervu_dashboard.pub_recruitment.id</code>.
     */
    public final TableField<PubRecruitmentRecord, String> ID = createField(DSL.name("id"), SQLDataType.CHAR(36).nullable(false), this, "");

    /**
     * The column <code>ervu_dashboard.pub_recruitment.sort</code>.
     */
    public final TableField<PubRecruitmentRecord, String> SORT = createField(DSL.name("sort"), SQLDataType.VARCHAR.nullable(false), this, "");

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

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

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

    /**
     * Create an aliased <code>ervu_dashboard.pub_recruitment</code> table
     * reference
     */
    public PubRecruitment(Name alias) {
        this(alias, PUB_RECRUITMENT);
    }

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

    public <O extends Record> PubRecruitment(Table<O> path, ForeignKey<O, PubRecruitmentRecord> childPath, InverseForeignKey<O, PubRecruitmentRecord> parentPath) {
        super(path, childPath, parentPath, PUB_RECRUITMENT);
    }

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

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

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

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

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

    @Override
    public UniqueKey<PubRecruitmentRecord> getPrimaryKey() {
        return Keys.PUB_RECRUITMENT_PKEY;
    }

    @Override
    public List<UniqueKey<PubRecruitmentRecord>> getUniqueKeys() {
        return Arrays.asList(Keys.RECRUITMENT_IDM_ID_KEY);
    }

    private transient MainProfilePath _mainProfile;

    /**
     * Get the implicit to-many join path to the
     * <code>appeals.main_profile</code> table
     */
    public MainProfilePath mainProfile() {
        if (_mainProfile == null)
            _mainProfile = new MainProfilePath(this, null, ervu_dashboard.ervu_dashboard.db_beans.appeals.Keys.MAIN_PROFILE__MAIN_PROFILE_FK1.getInverseKey());

        return _mainProfile;
    }

    private transient ReasonsAppealPath _reasonsAppeal;

    /**
     * Get the implicit to-many join path to the
     * <code>appeals.reasons_appeal</code> table
     */
    public ReasonsAppealPath reasonsAppeal() {
        if (_reasonsAppeal == null)
            _reasonsAppeal = new ReasonsAppealPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.appeals.Keys.REASONS_APPEAL__REASONS_APPEAL_FK1.getInverseKey());

        return _reasonsAppeal;
    }

    private transient ReviewRatingPath _reviewRating;

    /**
     * Get the implicit to-many join path to the
     * <code>appeals.review_rating</code> table
     */
    public ReviewRatingPath reviewRating() {
        if (_reviewRating == null)
            _reviewRating = new ReviewRatingPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.appeals.Keys.REVIEW_RATING__REVIEW_RATING_FK1.getInverseKey());

        return _reviewRating;
    }

    private transient TopicAppealPath _topicAppeal;

    /**
     * Get the implicit to-many join path to the
     * <code>appeals.topic_appeal</code> table
     */
    public TopicAppealPath topicAppeal() {
        if (_topicAppeal == null)
            _topicAppeal = new TopicAppealPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.appeals.Keys.TOPIC_APPEAL__TOPIC_APPEAL_FK1.getInverseKey());

        return _topicAppeal;
    }

    private transient ConsiderationComplaintPath _considerationComplaint;

    /**
     * Get the implicit to-many join path to the
     * <code>ratings.consideration_complaint</code> table
     */
    public ConsiderationComplaintPath considerationComplaint() {
        if (_considerationComplaint == null)
            _considerationComplaint = new ConsiderationComplaintPath(this, null, ervu_dashboard.ervu_dashboard.db_beans.ratings.Keys.CONSIDERATION_COMPLAINT__CONSIDERATION_COMPLAINT_FK1.getInverseKey());

        return _considerationComplaint;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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