/*
 * This file is generated by jOOQ.
 */
package ru.micord.webbpm.ervu.business_metrics.db_beans.idm_reconcile.tables;


import java.util.Collection;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Identity;
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.webbpm.ervu.business_metrics.db_beans.idm_reconcile.IdmReconcile;
import ru.micord.webbpm.ervu.business_metrics.db_beans.idm_reconcile.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.idm_reconcile.tables.records.AccountBlockedRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>idm_reconcile.account_blocked</code>
     */
    public static final AccountBlocked ACCOUNT_BLOCKED = new AccountBlocked();

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

    /**
     * The column <code>idm_reconcile.account_blocked.account_id</code>.
     */
    public final TableField<AccountBlockedRecord, String> ACCOUNT_ID = createField(DSL.name("account_id"), SQLDataType.VARCHAR(36).nullable(false), this, "");

    /**
     * The column <code>idm_reconcile.account_blocked.blocked</code>.
     */
    public final TableField<AccountBlockedRecord, Boolean> BLOCKED = createField(DSL.name("blocked"), SQLDataType.BOOLEAN.defaultValue(DSL.field(DSL.raw("false"), SQLDataType.BOOLEAN)), this, "");

    /**
     * The column <code>idm_reconcile.account_blocked.id</code>.
     */
    public final TableField<AccountBlockedRecord, Long> ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * Create an aliased <code>idm_reconcile.account_blocked</code> table
     * reference
     */
    public AccountBlocked(String alias) {
        this(DSL.name(alias), ACCOUNT_BLOCKED);
    }

    /**
     * Create an aliased <code>idm_reconcile.account_blocked</code> table
     * reference
     */
    public AccountBlocked(Name alias) {
        this(alias, ACCOUNT_BLOCKED);
    }

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

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

    @Override
    public Identity<AccountBlockedRecord, Long> getIdentity() {
        return (Identity<AccountBlockedRecord, Long>) super.getIdentity();
    }

    @Override
    public UniqueKey<AccountBlockedRecord> getPrimaryKey() {
        return Keys.ACCOUNT_BLOCKED_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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