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

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 Files extends TableImpl<FilesRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.files</code>
     */
    public static final Files FILES = new Files();

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

    /**
     * The column <code>public.files.file_id</code>.
     */
    public final TableField<FilesRecord, Long> FILE_ID = createField(DSL.name("file_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>public.files.file</code>.
     */
    public final TableField<FilesRecord, byte[]> FILE = createField(DSL.name("file"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>public.files.file_name</code>.
     */
    public final TableField<FilesRecord, String> FILE_NAME = createField(DSL.name("file_name"), SQLDataType.VARCHAR(10000), this, "");

    /**
     * The column <code>public.files.interaction_log_id</code>.
     */
    public final TableField<FilesRecord, Long> INTERACTION_LOG_ID = createField(DSL.name("interaction_log_id"), SQLDataType.BIGINT, this, "");

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

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

    /**
     * Create an aliased <code>public.files</code> table reference
     */
    public Files(String alias) {
        this(DSL.name(alias), FILES);
    }

    /**
     * Create an aliased <code>public.files</code> table reference
     */
    public Files(Name alias) {
        this(alias, FILES);
    }

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

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

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

    @Override
    public UniqueKey<FilesRecord> getPrimaryKey() {
        return Keys.FILES_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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