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


import java.sql.Timestamp;
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.SolutionRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.solution</code>
     */
    public static final Solution SOLUTION = new Solution();

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

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

    /**
     * The column <code>public.solution.name</code>. Имя группы ролей
     */
    public final TableField<SolutionRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(255).nullable(false), this, "Имя группы ролей");

    /**
     * The column <code>public.solution.description</code>. Описание группы
     * ролей
     */
    public final TableField<SolutionRecord, String> DESCRIPTION = createField(DSL.name("description"), SQLDataType.VARCHAR(1024), this, "Описание группы ролей");

    /**
     * The column <code>public.solution.display_name</code>. Отображаемое имя
     * группы ролей
     */
    public final TableField<SolutionRecord, String> DISPLAY_NAME = createField(DSL.name("display_name"), SQLDataType.VARCHAR(255), this, "Отображаемое имя группы ролей");

    /**
     * The column <code>public.solution.active</code>. Флаг активности
     */
    public final TableField<SolutionRecord, Boolean> ACTIVE = createField(DSL.name("active"), SQLDataType.BOOLEAN.nullable(false).defaultValue(DSL.field(DSL.raw("true"), SQLDataType.BOOLEAN)), this, "Флаг активности");

    /**
     * The column <code>public.solution.created</code>. Дата создания
     */
    public final TableField<SolutionRecord, Timestamp> CREATED = createField(DSL.name("created"), SQLDataType.TIMESTAMP(0).nullable(false), this, "Дата создания");

    /**
     * The column <code>public.solution.modified</code>. Дата последнего
     * изменения
     */
    public final TableField<SolutionRecord, Timestamp> MODIFIED = createField(DSL.name("modified"), SQLDataType.TIMESTAMP(0), this, "Дата последнего изменения");

    /**
     * The column <code>public.solution.deleted</code>. Дата удаления
     */
    public final TableField<SolutionRecord, Timestamp> DELETED = createField(DSL.name("deleted"), SQLDataType.TIMESTAMP(0), this, "Дата удаления");

    /**
     * The column <code>public.solution.version</code>. Версия записи
     */
    public final TableField<SolutionRecord, Integer> VERSION = createField(DSL.name("version"), SQLDataType.INTEGER.nullable(false), this, "Версия записи");

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

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

    /**
     * Create an aliased <code>public.solution</code> table reference
     */
    public Solution(String alias) {
        this(DSL.name(alias), SOLUTION);
    }

    /**
     * Create an aliased <code>public.solution</code> table reference
     */
    public Solution(Name alias) {
        this(alias, SOLUTION);
    }

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

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

    @Override
    public UniqueKey<SolutionRecord> getPrimaryKey() {
        return Keys.SOLUTION_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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