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


import java.math.BigDecimal;
import java.sql.Date;
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.forecast.Forecast;
import ru.micord.ervu_dashboard.db_beans.forecast.Keys;
import ru.micord.ervu_dashboard.db_beans.forecast.tables.records.TemporaryMeasuresRecord;


/**
 * Решения о принятии и снятии временных мер
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TemporaryMeasures extends TableImpl<TemporaryMeasuresRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>forecast.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>forecast.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>forecast.temporary_measures.recruitment_id</code>.
     */
    public final TableField<TemporaryMeasuresRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column <code>forecast.temporary_measures.recording_date</code>.
     */
    public final TableField<TemporaryMeasuresRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "");

    /**
     * The column <code>forecast.temporary_measures.schema</code>.
     */
    public final TableField<TemporaryMeasuresRecord, String> SCHEMA = createField(DSL.name("schema"), SQLDataType.VARCHAR(64).nullable(false).defaultValue(DSL.field(DSL.raw("'empty'::character varying"), SQLDataType.VARCHAR)), this, "");

    /**
     * The column
     * <code>forecast.temporary_measures.introduction_provisional_measures</code>.
     * Введение временных мер
     */
    public final TableField<TemporaryMeasuresRecord, BigDecimal> INTRODUCTION_PROVISIONAL_MEASURES = createField(DSL.name("introduction_provisional_measures"), SQLDataType.NUMERIC, this, "Введение временных мер");

    /**
     * The column
     * <code>forecast.temporary_measures.lifting_provisional_measures</code>.
     * Снятие временных мер
     */
    public final TableField<TemporaryMeasuresRecord, BigDecimal> LIFTING_PROVISIONAL_MEASURES = createField(DSL.name("lifting_provisional_measures"), SQLDataType.NUMERIC, 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>forecast.temporary_measures</code> table
     * reference
     */
    public TemporaryMeasures(String alias) {
        this(DSL.name(alias), TEMPORARY_MEASURES);
    }

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

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

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

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

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

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