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


import java.sql.Timestamp;
import java.util.Collection;
import java.util.UUID;

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;

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.TemporaryMeasuresRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.temporary_measures</code>
     */
    public static final TemporaryMeasures TEMPORARY_MEASURES = new TemporaryMeasures();

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

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.temporary_measures_id</code>.
     */
    public final TableField<TemporaryMeasuresRecord, Long> TEMPORARY_MEASURES_ID = createField(DSL.name("temporary_measures_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ervu_dashboard.temporary_measures.subpoena_id</code>.
     */
    public final TableField<TemporaryMeasuresRecord, UUID> SUBPOENA_ID = createField(DSL.name("subpoena_id"), SQLDataType.UUID, this, "");

    /**
     * The column <code>ervu_dashboard.temporary_measures.recruit_id</code>.
     */
    public final TableField<TemporaryMeasuresRecord, UUID> RECRUIT_ID = createField(DSL.name("recruit_id"), SQLDataType.UUID, this, "");

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

    /**
     * The column <code>ervu_dashboard.temporary_measures.status_measure</code>.
     * статус временной меры
     */
    public final TableField<TemporaryMeasuresRecord, String> STATUS_MEASURE = createField(DSL.name("status_measure"), SQLDataType.CLOB, this, "статус временной меры");

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.recruitment_name</code>.
     * наименование ВК
     */
    public final TableField<TemporaryMeasuresRecord, String> RECRUITMENT_NAME = createField(DSL.name("recruitment_name"), SQLDataType.CLOB, this, "наименование ВК");

    /**
     * The column <code>ervu_dashboard.temporary_measures.cancel_date</code>.
     * дата, с которой отменена временная мера
     */
    public final TableField<TemporaryMeasuresRecord, Timestamp> CANCEL_DATE = createField(DSL.name("cancel_date"), SQLDataType.TIMESTAMP(0), this, "дата, с которой отменена временная мера");

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.restriction_name</code>.
     * наименование временной меры
     */
    public final TableField<TemporaryMeasuresRecord, String> RESTRICTION_NAME = createField(DSL.name("restriction_name"), SQLDataType.CLOB, this, "наименование временной меры");

    /**
     * The column <code>ervu_dashboard.temporary_measures.type</code>. тип
     * документа ограничения
     */
    public final TableField<TemporaryMeasuresRecord, String> TYPE = createField(DSL.name("type"), SQLDataType.CLOB, this, "тип документа ограничения");

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.decision_number_create</code>.
     * номер решения о применении временной меры
     */
    public final TableField<TemporaryMeasuresRecord, String> DECISION_NUMBER_CREATE = createField(DSL.name("decision_number_create"), SQLDataType.CLOB, this, "номер решения о применении временной меры");

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.decision_number_cancel</code>.
     * номер решения об отмене временной меры
     */
    public final TableField<TemporaryMeasuresRecord, String> DECISION_NUMBER_CANCEL = createField(DSL.name("decision_number_cancel"), SQLDataType.CLOB, this, "номер решения об отмене временной меры");

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.decision_date_create</code>. дата
     * решения о применении временной меры
     */
    public final TableField<TemporaryMeasuresRecord, Timestamp> DECISION_DATE_CREATE = createField(DSL.name("decision_date_create"), SQLDataType.TIMESTAMP(0), this, "дата решения о применении временной меры");

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.decision_date_cancel</code>. дата
     * решения об отмене временной меры
     */
    public final TableField<TemporaryMeasuresRecord, Timestamp> DECISION_DATE_CANCEL = createField(DSL.name("decision_date_cancel"), SQLDataType.TIMESTAMP(0), this, "дата решения об отмене временной меры");

    /**
     * The column <code>ervu_dashboard.temporary_measures.applied_fact</code>.
     * факт применения временной меры
     */
    public final TableField<TemporaryMeasuresRecord, String> APPLIED_FACT = createField(DSL.name("applied_fact"), SQLDataType.CLOB, this, "факт применения временной меры");

    /**
     * The column
     * <code>ervu_dashboard.temporary_measures.date_application</code>. Дата
     * применения временной меры
     */
    public final TableField<TemporaryMeasuresRecord, Timestamp> DATE_APPLICATION = createField(DSL.name("date_application"), SQLDataType.TIMESTAMP(0), this, "Дата применения временной меры");

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

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

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

    /**
     * Create an aliased <code>ervu_dashboard.temporary_measures</code> table
     * reference
     */
    public TemporaryMeasures(Name alias) {
        this(alias, TEMPORARY_MEASURES);
    }

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

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

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

    @Override
    public UniqueKey<TemporaryMeasuresRecord> getPrimaryKey() {
        return Keys.TEMPORARY_MEASURES_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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