/*
 * This file is generated by jOOQ.
 */
package com.databasir.dao.tables.records;


import com.databasir.dao.tables.TableIndexDocument;
import com.databasir.dao.tables.pojos.TableIndexDocumentPojo;

import java.time.LocalDateTime;

import org.jooq.Field;
import org.jooq.JSON;
import org.jooq.Record1;
import org.jooq.Record7;
import org.jooq.Row7;
import org.jooq.impl.UpdatableRecordImpl;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TableIndexDocumentRecord extends UpdatableRecordImpl<TableIndexDocumentRecord> implements Record7<Integer, Integer, Integer, String, Boolean, JSON, LocalDateTime> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>databasir.table_index_document.id</code>.
     */
    public void setId(Integer value) {
        set(0, value);
    }

    /**
     * Getter for <code>databasir.table_index_document.id</code>.
     */
    public Integer getId() {
        return (Integer) get(0);
    }

    /**
     * Setter for <code>databasir.table_index_document.table_document_id</code>.
     */
    public void setTableDocumentId(Integer value) {
        set(1, value);
    }

    /**
     * Getter for <code>databasir.table_index_document.table_document_id</code>.
     */
    public Integer getTableDocumentId() {
        return (Integer) get(1);
    }

    /**
     * Setter for
     * <code>databasir.table_index_document.database_document_id</code>.
     */
    public void setDatabaseDocumentId(Integer value) {
        set(2, value);
    }

    /**
     * Getter for
     * <code>databasir.table_index_document.database_document_id</code>.
     */
    public Integer getDatabaseDocumentId() {
        return (Integer) get(2);
    }

    /**
     * Setter for <code>databasir.table_index_document.name</code>.
     */
    public void setName(String value) {
        set(3, value);
    }

    /**
     * Getter for <code>databasir.table_index_document.name</code>.
     */
    public String getName() {
        return (String) get(3);
    }

    /**
     * Setter for <code>databasir.table_index_document.is_unique</code>.
     */
    public void setIsUnique(Boolean value) {
        set(4, value);
    }

    /**
     * Getter for <code>databasir.table_index_document.is_unique</code>.
     */
    public Boolean getIsUnique() {
        return (Boolean) get(4);
    }

    /**
     * Setter for <code>databasir.table_index_document.column_name_array</code>.
     */
    public void setColumnNameArray(JSON value) {
        set(5, value);
    }

    /**
     * Getter for <code>databasir.table_index_document.column_name_array</code>.
     */
    public JSON getColumnNameArray() {
        return (JSON) get(5);
    }

    /**
     * Setter for <code>databasir.table_index_document.create_at</code>.
     */
    public void setCreateAt(LocalDateTime value) {
        set(6, value);
    }

    /**
     * Getter for <code>databasir.table_index_document.create_at</code>.
     */
    public LocalDateTime getCreateAt() {
        return (LocalDateTime) get(6);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record1<Integer> key() {
        return (Record1) super.key();
    }

    // -------------------------------------------------------------------------
    // Record7 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row7<Integer, Integer, Integer, String, Boolean, JSON, LocalDateTime> fieldsRow() {
        return (Row7) super.fieldsRow();
    }

    @Override
    public Row7<Integer, Integer, Integer, String, Boolean, JSON, LocalDateTime> valuesRow() {
        return (Row7) super.valuesRow();
    }

    @Override
    public Field<Integer> field1() {
        return TableIndexDocument.TABLE_INDEX_DOCUMENT.ID;
    }

    @Override
    public Field<Integer> field2() {
        return TableIndexDocument.TABLE_INDEX_DOCUMENT.TABLE_DOCUMENT_ID;
    }

    @Override
    public Field<Integer> field3() {
        return TableIndexDocument.TABLE_INDEX_DOCUMENT.DATABASE_DOCUMENT_ID;
    }

    @Override
    public Field<String> field4() {
        return TableIndexDocument.TABLE_INDEX_DOCUMENT.NAME;
    }

    @Override
    public Field<Boolean> field5() {
        return TableIndexDocument.TABLE_INDEX_DOCUMENT.IS_UNIQUE;
    }

    @Override
    public Field<JSON> field6() {
        return TableIndexDocument.TABLE_INDEX_DOCUMENT.COLUMN_NAME_ARRAY;
    }

    @Override
    public Field<LocalDateTime> field7() {
        return TableIndexDocument.TABLE_INDEX_DOCUMENT.CREATE_AT;
    }

    @Override
    public Integer component1() {
        return getId();
    }

    @Override
    public Integer component2() {
        return getTableDocumentId();
    }

    @Override
    public Integer component3() {
        return getDatabaseDocumentId();
    }

    @Override
    public String component4() {
        return getName();
    }

    @Override
    public Boolean component5() {
        return getIsUnique();
    }

    @Override
    public JSON component6() {
        return getColumnNameArray();
    }

    @Override
    public LocalDateTime component7() {
        return getCreateAt();
    }

    @Override
    public Integer value1() {
        return getId();
    }

    @Override
    public Integer value2() {
        return getTableDocumentId();
    }

    @Override
    public Integer value3() {
        return getDatabaseDocumentId();
    }

    @Override
    public String value4() {
        return getName();
    }

    @Override
    public Boolean value5() {
        return getIsUnique();
    }

    @Override
    public JSON value6() {
        return getColumnNameArray();
    }

    @Override
    public LocalDateTime value7() {
        return getCreateAt();
    }

    @Override
    public TableIndexDocumentRecord value1(Integer value) {
        setId(value);
        return this;
    }

    @Override
    public TableIndexDocumentRecord value2(Integer value) {
        setTableDocumentId(value);
        return this;
    }

    @Override
    public TableIndexDocumentRecord value3(Integer value) {
        setDatabaseDocumentId(value);
        return this;
    }

    @Override
    public TableIndexDocumentRecord value4(String value) {
        setName(value);
        return this;
    }

    @Override
    public TableIndexDocumentRecord value5(Boolean value) {
        setIsUnique(value);
        return this;
    }

    @Override
    public TableIndexDocumentRecord value6(JSON value) {
        setColumnNameArray(value);
        return this;
    }

    @Override
    public TableIndexDocumentRecord value7(LocalDateTime value) {
        setCreateAt(value);
        return this;
    }

    @Override
    public TableIndexDocumentRecord values(Integer value1, Integer value2, Integer value3, String value4, Boolean value5, JSON value6, LocalDateTime value7) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached TableIndexDocumentRecord
     */
    public TableIndexDocumentRecord() {
        super(TableIndexDocument.TABLE_INDEX_DOCUMENT);
    }

    /**
     * Create a detached, initialised TableIndexDocumentRecord
     */
    public TableIndexDocumentRecord(Integer id, Integer tableDocumentId, Integer databaseDocumentId, String name, Boolean isUnique, JSON columnNameArray, LocalDateTime createAt) {
        super(TableIndexDocument.TABLE_INDEX_DOCUMENT);

        setId(id);
        setTableDocumentId(tableDocumentId);
        setDatabaseDocumentId(databaseDocumentId);
        setName(name);
        setIsUnique(isUnique);
        setColumnNameArray(columnNameArray);
        setCreateAt(createAt);
    }

    /**
     * Create a detached, initialised TableIndexDocumentRecord
     */
    public TableIndexDocumentRecord(TableIndexDocumentPojo value) {
        super(TableIndexDocument.TABLE_INDEX_DOCUMENT);

        if (value != null) {
            setId(value.getId());
            setTableDocumentId(value.getTableDocumentId());
            setDatabaseDocumentId(value.getDatabaseDocumentId());
            setName(value.getName());
            setIsUnique(value.getIsUnique());
            setColumnNameArray(value.getColumnNameArray());
            setCreateAt(value.getCreateAt());
        }
    }
}
