/*
 * This file is generated by jOOQ.
 */
package org.jooq.meta.firebird.rdb.tables;


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

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Name;
import org.jooq.Record;
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.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.firebird.rdb.Keys;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>RDB$RELATIONS</code>
     */
    public static final Rdb$relations RDB$RELATIONS = new Rdb$relations();

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

    /**
     * The column <code>RDB$RELATIONS.RDB$VIEW_BLR</code>.
     */
    public final TableField<Record, byte[]> RDB$VIEW_BLR = createField(DSL.name("RDB$VIEW_BLR"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$VIEW_SOURCE</code>.
     */
    public final TableField<Record, String> RDB$VIEW_SOURCE = createField(DSL.name("RDB$VIEW_SOURCE"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$DESCRIPTION</code>.
     */
    public final TableField<Record, String> RDB$DESCRIPTION = createField(DSL.name("RDB$DESCRIPTION"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$RELATION_ID</code>.
     */
    public final TableField<Record, Short> RDB$RELATION_ID = createField(DSL.name("RDB$RELATION_ID"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$SYSTEM_FLAG</code>.
     */
    public final TableField<Record, Short> RDB$SYSTEM_FLAG = createField(DSL.name("RDB$SYSTEM_FLAG"), SQLDataType.SMALLINT.nullable(false), this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$DBKEY_LENGTH</code>.
     */
    public final TableField<Record, Short> RDB$DBKEY_LENGTH = createField(DSL.name("RDB$DBKEY_LENGTH"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$FORMAT</code>.
     */
    public final TableField<Record, Short> RDB$FORMAT = createField(DSL.name("RDB$FORMAT"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$FIELD_ID</code>.
     */
    public final TableField<Record, Short> RDB$FIELD_ID = createField(DSL.name("RDB$FIELD_ID"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$RELATION_NAME</code>.
     */
    public final TableField<Record, String> RDB$RELATION_NAME = createField(DSL.name("RDB$RELATION_NAME"), SQLDataType.CHAR(63), this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$SECURITY_CLASS</code>.
     */
    public final TableField<Record, String> RDB$SECURITY_CLASS = createField(DSL.name("RDB$SECURITY_CLASS"), SQLDataType.CHAR(63), this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$EXTERNAL_FILE</code>.
     */
    public final TableField<Record, String> RDB$EXTERNAL_FILE = createField(DSL.name("RDB$EXTERNAL_FILE"), SQLDataType.VARCHAR, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$RUNTIME</code>.
     */
    public final TableField<Record, byte[]> RDB$RUNTIME = createField(DSL.name("RDB$RUNTIME"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$EXTERNAL_DESCRIPTION</code>.
     */
    public final TableField<Record, byte[]> RDB$EXTERNAL_DESCRIPTION = createField(DSL.name("RDB$EXTERNAL_DESCRIPTION"), SQLDataType.BLOB, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$OWNER_NAME</code>.
     */
    public final TableField<Record, String> RDB$OWNER_NAME = createField(DSL.name("RDB$OWNER_NAME"), SQLDataType.CHAR(63), this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$DEFAULT_CLASS</code>.
     */
    public final TableField<Record, String> RDB$DEFAULT_CLASS = createField(DSL.name("RDB$DEFAULT_CLASS"), SQLDataType.CHAR(63), this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$FLAGS</code>.
     */
    public final TableField<Record, Short> RDB$FLAGS = createField(DSL.name("RDB$FLAGS"), SQLDataType.SMALLINT, this, "");

    /**
     * The column <code>RDB$RELATIONS.RDB$RELATION_TYPE</code>.
     */
    public final TableField<Record, Short> RDB$RELATION_TYPE = createField(DSL.name("RDB$RELATION_TYPE"), SQLDataType.SMALLINT, this, "");

    /**
     * @deprecated Unknown data type. If this is a qualified, user-defined type,
     * it may have been excluded from code generation. If this is a built-in
     * type, you can define an explicit {@link org.jooq.Binding} to specify how
     * this type should be handled. Deprecation can be turned off using
     * {@literal <deprecationOnUnknownTypes/>} in your code generator
     * configuration.
     */
    @Deprecated
    public final TableField<Record, Object> RDB$SQL_SECURITY = createField(DSL.name("RDB$SQL_SECURITY"), DefaultDataType.getDefaultDataType("\"RDB$SQL_SECURITY\""), this, "");

    private Rdb$relations(Name alias, Table<Record> aliased) {
        this(alias, aliased, (Field<?>[]) null, null);
    }

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

    /**
     * Create an aliased <code>RDB$RELATIONS</code> table reference
     */
    public Rdb$relations(String alias) {
        this(DSL.name(alias), RDB$RELATIONS);
    }

    /**
     * Create an aliased <code>RDB$RELATIONS</code> table reference
     */
    public Rdb$relations(Name alias) {
        this(alias, RDB$RELATIONS);
    }

    /**
     * Create a <code>RDB$RELATIONS</code> table reference
     */
    public Rdb$relations() {
        this(DSL.name("RDB$RELATIONS"), null);
    }

    @Override
    public List<UniqueKey<Record>> getUniqueKeys() {
        return Arrays.asList(Keys.RDB$INDEX_0);
    }

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

    @Override
    public Rdb$relations as(Name alias) {
        return new Rdb$relations(alias, this);
    }

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