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

import java.util.Arrays;
import java.util.Collection;
import java.util.List;

import org.jooq.Condition;
import org.jooq.Field;
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 OkopfRecords extends TableImpl<OkopfRecordsRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.okopf_records</code>
     */
    public static final OkopfRecords OKOPF_RECORDS = new OkopfRecords();

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

    /**
     * The column <code>public.okopf_records.okopf_records_id</code>.
     */
    public final TableField<OkopfRecordsRecord, String> OKOPF_RECORDS_ID = createField(DSL.name("okopf_records_id"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>public.okopf_records.name</code>.
     */
    public final TableField<OkopfRecordsRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>public.okopf_records.version</code>.
     */
    public final TableField<OkopfRecordsRecord, Integer> VERSION = createField(DSL.name("version"), SQLDataType.INTEGER.nullable(false), this, "");

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

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

    /**
     * Create an aliased <code>public.okopf_records</code> table reference
     */
    public OkopfRecords(String alias) {
        this(DSL.name(alias), OKOPF_RECORDS);
    }

    /**
     * Create an aliased <code>public.okopf_records</code> table reference
     */
    public OkopfRecords(Name alias) {
        this(alias, OKOPF_RECORDS);
    }

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

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

    @Override
    public UniqueKey<OkopfRecordsRecord> getPrimaryKey() {
        return Keys.OKOPF_RECORDS_PKEY;
    }

    @Override
    public List<UniqueKey<OkopfRecordsRecord>> getUniqueKeys() {
        return Arrays.asList(Keys.OKOPF_RECORDS_NAME_KEY);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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