/*
 * This file is generated by jOOQ.
 */
package stroom.config.impl.db.jooq.tables;


import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Row2;
import org.jooq.Schema;
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;

import stroom.config.impl.db.jooq.Keys;
import stroom.config.impl.db.jooq.Stroom;
import stroom.config.impl.db.jooq.tables.records.ConfigUpdateTrackerRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>stroom.config_update_tracker</code>
     */
    public static final ConfigUpdateTracker CONFIG_UPDATE_TRACKER = new ConfigUpdateTracker();

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

    /**
     * The column <code>stroom.config_update_tracker.id</code>.
     */
    public final TableField<ConfigUpdateTrackerRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>stroom.config_update_tracker.update_time_ms</code>.
     */
    public final TableField<ConfigUpdateTrackerRecord, Long> UPDATE_TIME_MS = createField(DSL.name("update_time_ms"), SQLDataType.BIGINT.nullable(false), this, "");

    private ConfigUpdateTracker(Name alias, Table<ConfigUpdateTrackerRecord> aliased) {
        this(alias, aliased, null);
    }

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

    /**
     * Create an aliased <code>stroom.config_update_tracker</code> table
     * reference
     */
    public ConfigUpdateTracker(String alias) {
        this(DSL.name(alias), CONFIG_UPDATE_TRACKER);
    }

    /**
     * Create an aliased <code>stroom.config_update_tracker</code> table
     * reference
     */
    public ConfigUpdateTracker(Name alias) {
        this(alias, CONFIG_UPDATE_TRACKER);
    }

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

    public <O extends Record> ConfigUpdateTracker(Table<O> child, ForeignKey<O, ConfigUpdateTrackerRecord> key) {
        super(child, key, CONFIG_UPDATE_TRACKER);
    }

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

    @Override
    public UniqueKey<ConfigUpdateTrackerRecord> getPrimaryKey() {
        return Keys.KEY_CONFIG_UPDATE_TRACKER_PRIMARY;
    }

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

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

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

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

    // -------------------------------------------------------------------------
    // Row2 type methods
    // -------------------------------------------------------------------------

    @Override
    public Row2<Integer, Long> fieldsRow() {
        return (Row2) super.fieldsRow();
    }
}
