/*
 * This file is generated by jOOQ.
 */
package ervu_dashboard.ervu_dashboard.db_beans.security.tables;


import ervu_dashboard.ervu_dashboard.db_beans.security.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.security.Security;
import ervu_dashboard.ervu_dashboard.db_beans.security.tables.UserAccount.UserAccountPath;
import ervu_dashboard.ervu_dashboard.db_beans.security.tables.records.UserAccountRefreshTokenRecord;

import java.sql.Timestamp;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
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 UserAccountRefreshToken extends TableImpl<UserAccountRefreshTokenRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>security.user_account_refresh_token</code>
     */
    public static final UserAccountRefreshToken USER_ACCOUNT_REFRESH_TOKEN = new UserAccountRefreshToken();

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

    /**
     * The column
     * <code>security.user_account_refresh_token.user_account_refresh_token_id</code>.
     */
    public final TableField<UserAccountRefreshTokenRecord, String> USER_ACCOUNT_REFRESH_TOKEN_ID = createField(DSL.name("user_account_refresh_token_id"), SQLDataType.CHAR(36).nullable(false), this, "");

    /**
     * The column
     * <code>security.user_account_refresh_token.user_account_id</code>.
     */
    public final TableField<UserAccountRefreshTokenRecord, String> USER_ACCOUNT_ID = createField(DSL.name("user_account_id"), SQLDataType.CHAR(36), this, "");

    /**
     * The column
     * <code>security.user_account_refresh_token.refresh_token</code>.
     */
    public final TableField<UserAccountRefreshTokenRecord, String> REFRESH_TOKEN = createField(DSL.name("refresh_token"), SQLDataType.CLOB, this, "");

    /**
     * The column <code>security.user_account_refresh_token.access_token</code>.
     */
    public final TableField<UserAccountRefreshTokenRecord, String> ACCESS_TOKEN = createField(DSL.name("access_token"), SQLDataType.CLOB, this, "");

    /**
     * The column
     * <code>security.user_account_refresh_token.expiration_time</code>.
     */
    public final TableField<UserAccountRefreshTokenRecord, Timestamp> EXPIRATION_TIME = createField(DSL.name("expiration_time"), SQLDataType.TIMESTAMP(0), this, "");

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

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

    /**
     * Create an aliased <code>security.user_account_refresh_token</code> table
     * reference
     */
    public UserAccountRefreshToken(String alias) {
        this(DSL.name(alias), USER_ACCOUNT_REFRESH_TOKEN);
    }

    /**
     * Create an aliased <code>security.user_account_refresh_token</code> table
     * reference
     */
    public UserAccountRefreshToken(Name alias) {
        this(alias, USER_ACCOUNT_REFRESH_TOKEN);
    }

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

    public <O extends Record> UserAccountRefreshToken(Table<O> path, ForeignKey<O, UserAccountRefreshTokenRecord> childPath, InverseForeignKey<O, UserAccountRefreshTokenRecord> parentPath) {
        super(path, childPath, parentPath, USER_ACCOUNT_REFRESH_TOKEN);
    }

    /**
     * A subtype implementing {@link Path} for simplified path-based joins.
     */
    public static class UserAccountRefreshTokenPath extends UserAccountRefreshToken implements Path<UserAccountRefreshTokenRecord> {
        public <O extends Record> UserAccountRefreshTokenPath(Table<O> path, ForeignKey<O, UserAccountRefreshTokenRecord> childPath, InverseForeignKey<O, UserAccountRefreshTokenRecord> parentPath) {
            super(path, childPath, parentPath);
        }
        private UserAccountRefreshTokenPath(Name alias, Table<UserAccountRefreshTokenRecord> aliased) {
            super(alias, aliased);
        }

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

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

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

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

    @Override
    public UniqueKey<UserAccountRefreshTokenRecord> getPrimaryKey() {
        return Keys.PK_USER_ACCOUNT_REFRESH_TOKEN;
    }

    @Override
    public List<ForeignKey<UserAccountRefreshTokenRecord, ?>> getReferences() {
        return Arrays.asList(Keys.USER_ACCOUNT_REFRESH_TOKEN__FK_USER_ACCOUNT_REFRESH_TOKEN);
    }

    private transient UserAccountPath _userAccount;

    /**
     * Get the implicit join path to the <code>security.user_account</code>
     * table.
     */
    public UserAccountPath userAccount() {
        if (_userAccount == null)
            _userAccount = new UserAccountPath(this, Keys.USER_ACCOUNT_REFRESH_TOKEN__FK_USER_ACCOUNT_REFRESH_TOKEN, null);

        return _userAccount;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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