/*
 * 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.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
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$indexSegments extends TableImpl<Record> {

    private static final long serialVersionUID = 1L;

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

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

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

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

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

    /**
     * The column <code>RDB$INDEX_SEGMENTS.RDB$STATISTICS</code>.
     */
    public final TableField<Record, Double> RDB$STATISTICS = createField(DSL.name("RDB$STATISTICS"), SQLDataType.DOUBLE, this, "");

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

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

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

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

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

    public <O extends Record> Rdb$indexSegments(Table<O> path, ForeignKey<O, Record> childPath, InverseForeignKey<O, Record> parentPath) {
        super(path, childPath, parentPath, RDB$INDEX_SEGMENTS);
    }

    @Override
    public List<ForeignKey<Record, ?>> getReferences() {
        return Arrays.asList(Keys.SYNTHETIC_FK_RDB$INDEX_SEGMENTS__RDB$INDEX_5);
    }

    private transient Rdb$indices _rdb$indices;

    /**
     * Get the implicit join path to the <code>RDB$INDICES</code> table.
     */
    public Rdb$indices rdb$indices() {
        if (_rdb$indices == null)
            _rdb$indices = new Rdb$indices(this, Keys.SYNTHETIC_FK_RDB$INDEX_SEGMENTS__RDB$INDEX_5, null);

        return _rdb$indices;
    }

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

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

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