/*
 * This file is generated by jOOQ.
 */
package jj.tech.paolu.repository.jooq.tables;


import java.util.Collection;

import jj.tech.paolu.repository.jooq.Keys;
import jj.tech.paolu.repository.jooq.Yx;
import jj.tech.paolu.repository.jooq.tables.records.SysRoleUrlRecord;

import org.jooq.Condition;
import org.jooq.Field;
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 SysRoleUrl extends TableImpl<SysRoleUrlRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>yx.sys_role_url</code>
     */
    public static final SysRoleUrl SYS_ROLE_URL = new SysRoleUrl();

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

    /**
     * The column <code>yx.sys_role_url.id</code>.
     */
    public final TableField<SysRoleUrlRecord, String> ID = createField(DSL.name("id"), SQLDataType.VARCHAR(20).nullable(false), this, "");

    /**
     * The column <code>yx.sys_role_url.roleid</code>.
     */
    public final TableField<SysRoleUrlRecord, String> ROLEID = createField(DSL.name("roleid"), SQLDataType.VARCHAR(20).nullable(false), this, "");

    /**
     * The column <code>yx.sys_role_url.url</code>. 对应sys_urls的url
     */
    public final TableField<SysRoleUrlRecord, String> URL = createField(DSL.name("url"), SQLDataType.VARCHAR(300).nullable(false), this, "对应sys_urls的url");

    /**
     * The column <code>yx.sys_role_url.urltypes</code>. 1:url,2:菜单
     */
    public final TableField<SysRoleUrlRecord, Integer> URLTYPES = createField(DSL.name("urltypes"), SQLDataType.INTEGER.nullable(false), this, "1:url,2:菜单");

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

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

    /**
     * Create an aliased <code>yx.sys_role_url</code> table reference
     */
    public SysRoleUrl(String alias) {
        this(DSL.name(alias), SYS_ROLE_URL);
    }

    /**
     * Create an aliased <code>yx.sys_role_url</code> table reference
     */
    public SysRoleUrl(Name alias) {
        this(alias, SYS_ROLE_URL);
    }

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

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

    @Override
    public UniqueKey<SysRoleUrlRecord> getPrimaryKey() {
        return Keys.KEY_SYS_ROLE_URL_PRIMARY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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