/*
 * 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.CitizenInformationSearchRecord;


/**
 * Сведения о розыске
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CitizenInformationSearch extends TableImpl<CitizenInformationSearchRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>ervu_dashboard.citizen_information_search</code>
     */
    public static final CitizenInformationSearch CITIZEN_INFORMATION_SEARCH = new CitizenInformationSearch();

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.citizen_information_search_id</code>.
     */
    public final TableField<CitizenInformationSearchRecord, Long> CITIZEN_INFORMATION_SEARCH_ID = createField(DSL.name("citizen_information_search_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.recruit_id</code>. ссылка
     * на гражданина (citizen)
     */
    public final TableField<CitizenInformationSearchRecord, UUID> RECRUIT_ID = createField(DSL.name("recruit_id"), SQLDataType.UUID.nullable(false), this, "ссылка на гражданина (citizen)");

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.name_organ_start_search</code>.
     * Наименование органа, принявшего решение о розыске
     */
    public final TableField<CitizenInformationSearchRecord, String> NAME_ORGAN_START_SEARCH = createField(DSL.name("name_organ_start_search"), SQLDataType.VARCHAR, this, "Наименование органа, принявшего решение о розыске");

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.wanted_start_date</code>.
     * Дата объявления в розыск
     */
    public final TableField<CitizenInformationSearchRecord, Timestamp> WANTED_START_DATE = createField(DSL.name("wanted_start_date"), SQLDataType.TIMESTAMP(0), this, "Дата объявления в розыск");

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.article_criminal_code</code>.
     * Пункт, часть, статья УК РФ
     */
    public final TableField<CitizenInformationSearchRecord, String> ARTICLE_CRIMINAL_CODE = createField(DSL.name("article_criminal_code"), SQLDataType.VARCHAR, this, "Пункт, часть, статья УК РФ");

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.wanted_end_date</code>.
     * Дата прекращения розыска
     */
    public final TableField<CitizenInformationSearchRecord, Timestamp> WANTED_END_DATE = createField(DSL.name("wanted_end_date"), SQLDataType.TIMESTAMP(0), this, "Дата прекращения розыска");

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.name_organ_end_search</code>.
     * Наименование органа, прекратившего розыск
     */
    public final TableField<CitizenInformationSearchRecord, String> NAME_ORGAN_END_SEARCH = createField(DSL.name("name_organ_end_search"), SQLDataType.VARCHAR, this, "Наименование органа, прекратившего розыск");

    /**
     * The column
     * <code>ervu_dashboard.citizen_information_search.grounds_stopping_search</code>.
     * Основание прекращения розыска
     */
    public final TableField<CitizenInformationSearchRecord, String> GROUNDS_STOPPING_SEARCH = createField(DSL.name("grounds_stopping_search"), SQLDataType.VARCHAR, this, "Основание прекращения розыска");

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

    private CitizenInformationSearch(Name alias, Table<CitizenInformationSearchRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Сведения о розыске"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.citizen_information_search</code>
     * table reference
     */
    public CitizenInformationSearch(Name alias) {
        this(alias, CITIZEN_INFORMATION_SEARCH);
    }

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

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

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

    @Override
    public UniqueKey<CitizenInformationSearchRecord> getPrimaryKey() {
        return Keys.PK_CITIZEN_INFORMATION_SEARCH;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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