/*
 * This file is generated by jOOQ.
*/
package models.tables;


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

import javax.annotation.Generated;

import models.HelloWorld;
import models.Indexes;
import models.Keys;
import models.tables.records.WorldRecord;

import org.jooq.Field;
import org.jooq.Identity;
import org.jooq.Index;
import org.jooq.Name;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.TableImpl;
import org.jooq.types.UInteger;


/**
 * This class is generated by jOOQ.
 */
@Generated(
    value = {
        "http://www.jooq.org",
        "jOOQ version:3.10.3"
    },
    comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class World extends TableImpl<WorldRecord> {

    private static final long serialVersionUID = -1857953030;

    /**
     * The reference instance of <code>hello_world.world</code>
     */
    public static final World WORLD = new World();

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

    /**
     * The column <code>hello_world.world.id</code>.
     */
    public final TableField<WorldRecord, UInteger> ID = createField("id", org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, "");

    /**
     * The column <code>hello_world.world.randomNumber</code>.
     */
    public final TableField<WorldRecord, Integer> RANDOMNUMBER = createField("randomNumber", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.INTEGER)), this, "");

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

    /**
     * Create an aliased <code>hello_world.world</code> table reference
     */
    public World(String alias) {
        this(DSL.name(alias), WORLD);
    }

    /**
     * Create an aliased <code>hello_world.world</code> table reference
     */
    public World(Name alias) {
        this(alias, WORLD);
    }

    private World(Name alias, Table<WorldRecord> aliased) {
        this(alias, aliased, null);
    }

    private World(Name alias, Table<WorldRecord> aliased, Field<?>[] parameters) {
        super(alias, null, aliased, parameters, "");
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Schema getSchema() {
        return HelloWorld.HELLO_WORLD;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<Index> getIndexes() {
        return Arrays.<Index>asList(Indexes.WORLD_PRIMARY);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Identity<WorldRecord, UInteger> getIdentity() {
        return Keys.IDENTITY_WORLD;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public UniqueKey<WorldRecord> getPrimaryKey() {
        return Keys.KEY_WORLD_PRIMARY;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<UniqueKey<WorldRecord>> getKeys() {
        return Arrays.<UniqueKey<WorldRecord>>asList(Keys.KEY_WORLD_PRIMARY);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public World as(String alias) {
        return new World(DSL.name(alias), this);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public World as(Name alias) {
        return new World(alias, this);
    }

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

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