/*
 * This file is generated by jOOQ.
*/
package com.oneops.crawler.jooq.cms.tables;


import com.oneops.crawler.jooq.cms.Indexes;
import com.oneops.crawler.jooq.cms.Keys;
import com.oneops.crawler.jooq.cms.Kloopzcm;
import com.oneops.crawler.jooq.cms.tables.records.CmCiRelationAttributesRecord;

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

import javax.annotation.Generated;

import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Index;
import org.jooq.Name;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.TableImpl;


/**
 * This class is generated by jOOQ.
 */
@Generated(
    value = {
        "http://www.jooq.org",
        "jOOQ version:3.10.0"
    },
    comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CmCiRelationAttributes extends TableImpl<CmCiRelationAttributesRecord> {

    private static final long serialVersionUID = 432832913;

    /**
     * The reference instance of <code>kloopzcm.cm_ci_relation_attributes</code>
     */
    public static final CmCiRelationAttributes CM_CI_RELATION_ATTRIBUTES = new CmCiRelationAttributes();

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

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.ci_rel_attribute_id</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, Long> CI_REL_ATTRIBUTE_ID = createField("ci_rel_attribute_id", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.ci_relation_id</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, Long> CI_RELATION_ID = createField("ci_relation_id", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.attribute_id</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, Integer> ATTRIBUTE_ID = createField("attribute_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.df_attribute_value</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, String> DF_ATTRIBUTE_VALUE = createField("df_attribute_value", org.jooq.impl.SQLDataType.CLOB, this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.dj_attribute_value</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, String> DJ_ATTRIBUTE_VALUE = createField("dj_attribute_value", org.jooq.impl.SQLDataType.CLOB, this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.owner</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, String> OWNER = createField("owner", org.jooq.impl.SQLDataType.VARCHAR(32), this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.comments</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, String> COMMENTS = createField("comments", org.jooq.impl.SQLDataType.VARCHAR(2000), this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.created</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, Timestamp> CREATED = createField("created", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, "");

    /**
     * The column <code>kloopzcm.cm_ci_relation_attributes.updated</code>.
     */
    public final TableField<CmCiRelationAttributesRecord, Timestamp> UPDATED = createField("updated", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, "");

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

    /**
     * Create an aliased <code>kloopzcm.cm_ci_relation_attributes</code> table reference
     */
    public CmCiRelationAttributes(String alias) {
        this(DSL.name(alias), CM_CI_RELATION_ATTRIBUTES);
    }

    /**
     * Create an aliased <code>kloopzcm.cm_ci_relation_attributes</code> table reference
     */
    public CmCiRelationAttributes(Name alias) {
        this(alias, CM_CI_RELATION_ATTRIBUTES);
    }

    private CmCiRelationAttributes(Name alias, Table<CmCiRelationAttributesRecord> aliased) {
        this(alias, aliased, null);
    }

    private CmCiRelationAttributes(Name alias, Table<CmCiRelationAttributesRecord> aliased, Field<?>[] parameters) {
        super(alias, null, aliased, parameters, "");
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Schema getSchema() {
        return Kloopzcm.KLOOPZCM;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<Index> getIndexes() {
        return Arrays.<Index>asList(Indexes.CM_CI_RELATION_ATTR_A_IDX, Indexes.CM_CI_RELATION_ATTR_DJ_VALUE_IDX, Indexes.CM_CI_RELATION_ATTR_RIDX, Indexes.CM_CI_RELATION_ATTRIBUTES_PK);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public UniqueKey<CmCiRelationAttributesRecord> getPrimaryKey() {
        return Keys.CM_CI_RELATION_ATTRIBUTES_PK;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<UniqueKey<CmCiRelationAttributesRecord>> getKeys() {
        return Arrays.<UniqueKey<CmCiRelationAttributesRecord>>asList(Keys.CM_CI_RELATION_ATTRIBUTES_PK);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<ForeignKey<CmCiRelationAttributesRecord, ?>> getReferences() {
        return Arrays.<ForeignKey<CmCiRelationAttributesRecord, ?>>asList(Keys.CM_CI_RELATION_ATTRIBUTES__CM_CI_RELATION_ATTRIBUTES_CRID_FK, Keys.CM_CI_RELATION_ATTRIBUTES__CM_CI_RELATION_ATTRIBUTES_RAID_FK);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public CmCiRelationAttributes as(String alias) {
        return new CmCiRelationAttributes(DSL.name(alias), this);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public CmCiRelationAttributes as(Name alias) {
        return new CmCiRelationAttributes(alias, this);
    }

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

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