/*
 * 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.IpDirectoryRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.ip_directory</code>
     */
    public static final IpDirectory IP_DIRECTORY = new IpDirectory();

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

    /**
     * The column <code>public.ip_directory.ip_address</code>. Уникальный
     * IP-адрес
     */
    public final TableField<IpDirectoryRecord, String> IP_ADDRESS = createField(DSL.name("ip_address"), SQLDataType.VARCHAR.nullable(false), this, "Уникальный IP-адрес");

    /**
     * The column <code>public.ip_directory.created</code>. Дата добавления
     * IP-адреса в справочник
     */
    public final TableField<IpDirectoryRecord, Timestamp> CREATED = createField(DSL.name("created"), SQLDataType.TIMESTAMP(0).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.TIMESTAMP)), this, "Дата добавления IP-адреса в справочник");

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

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

    /**
     * Create an aliased <code>public.ip_directory</code> table reference
     */
    public IpDirectory(String alias) {
        this(DSL.name(alias), IP_DIRECTORY);
    }

    /**
     * Create an aliased <code>public.ip_directory</code> table reference
     */
    public IpDirectory(Name alias) {
        this(alias, IP_DIRECTORY);
    }

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

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

    @Override
    public UniqueKey<IpDirectoryRecord> getPrimaryKey() {
        return Keys.IP_DIRECTORY_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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