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


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.ervu_dashboard.ErvuDashboard;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.Keys;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables.records.BorderCrossingRecord;


/**
 * сведения о фактах пересечения границы РФ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class BorderCrossing extends TableImpl<BorderCrossingRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.border_crossing</code>
     */
    public static final BorderCrossing BORDER_CROSSING = new BorderCrossing();

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

    /**
     * The column <code>ervu_dashboard.border_crossing.id</code>.
     */
    public final TableField<BorderCrossingRecord, Long> ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column <code>ervu_dashboard.border_crossing.date_crossing</code>.
     * дата пересечения границы
     */
    public final TableField<BorderCrossingRecord, Date> DATE_CROSSING = createField(DSL.name("date_crossing"), SQLDataType.DATE, this, "дата пересечения границы");

    /**
     * The column <code>ervu_dashboard.border_crossing.return_date</code>. дата
     * возвращения
     */
    public final TableField<BorderCrossingRecord, Date> RETURN_DATE = createField(DSL.name("return_date"), SQLDataType.DATE, this, "дата возвращения");

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

    private BorderCrossing(Name alias, Table<BorderCrossingRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("сведения о фактах пересечения границы РФ"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.border_crossing</code> table
     * reference
     */
    public BorderCrossing(Name alias) {
        this(alias, BORDER_CROSSING);
    }

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

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

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

    @Override
    public UniqueKey<BorderCrossingRecord> getPrimaryKey() {
        return Keys.BORDER_CROSSING_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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