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


import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Keys;
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public;
import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OrgOkvedRecord;

import java.util.Collection;

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;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.org_okved</code>
     */
    public static final OrgOkved ORG_OKVED = new OrgOkved();

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

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

    /**
     * The column <code>public.org_okved.code</code>.
     */
    public final TableField<OrgOkvedRecord, String> CODE = createField(DSL.name("code"), SQLDataType.VARCHAR(7), this, "");

    /**
     * The column <code>public.org_okved.okved</code>.
     */
    public final TableField<OrgOkvedRecord, String> OKVED = createField(DSL.name("okved"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>public.org_okved.organization</code>.
     */
    public final TableField<OrgOkvedRecord, String> ORGANIZATION = createField(DSL.name("organization"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>public.org_okved.main_okved</code>.
     */
    public final TableField<OrgOkvedRecord, Boolean> MAIN_OKVED = createField(DSL.name("main_okved"), SQLDataType.BOOLEAN, this, "");

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

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

    /**
     * Create an aliased <code>public.org_okved</code> table reference
     */
    public OrgOkved(String alias) {
        this(DSL.name(alias), ORG_OKVED);
    }

    /**
     * Create an aliased <code>public.org_okved</code> table reference
     */
    public OrgOkved(Name alias) {
        this(alias, ORG_OKVED);
    }

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

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

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

    @Override
    public UniqueKey<OrgOkvedRecord> getPrimaryKey() {
        return Keys.ORG_OKVED_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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