/*
 * This file is generated by jOOQ.
 */
package ru.micord.ervu.account_applications.db_beans.public_.tables;


import java.util.Collection;

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;

import ru.micord.ervu.account_applications.db_beans.public_.Keys;
import ru.micord.ervu.account_applications.db_beans.public_.Public;
import ru.micord.ervu.account_applications.db_beans.public_.tables.records.SolutionRoleRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.solution_role</code>
     */
    public static final SolutionRole SOLUTION_ROLE = new SolutionRole();

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

    /**
     * The column <code>public.solution_role.role_id</code>. Идентификатор роли
     */
    public final TableField<SolutionRoleRecord, String> ROLE_ID = createField(DSL.name("role_id"), SQLDataType.VARCHAR(36).nullable(false), this, "Идентификатор роли");

    /**
     * The column <code>public.solution_role.solution_id</code>. Идентификатор
     * группы ролей
     */
    public final TableField<SolutionRoleRecord, String> SOLUTION_ID = createField(DSL.name("solution_id"), SQLDataType.VARCHAR(36).nullable(false), this, "Идентификатор группы ролей");

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

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

    /**
     * Create an aliased <code>public.solution_role</code> table reference
     */
    public SolutionRole(String alias) {
        this(DSL.name(alias), SOLUTION_ROLE);
    }

    /**
     * Create an aliased <code>public.solution_role</code> table reference
     */
    public SolutionRole(Name alias) {
        this(alias, SOLUTION_ROLE);
    }

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

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

    @Override
    public UniqueKey<SolutionRoleRecord> getPrimaryKey() {
        return Keys.PK_SOLUTION_ROLE;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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