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


import com.databasir.dao.tables.DatabaseDocumentHistory;
import com.databasir.dao.tables.pojos.DatabaseDocumentHistoryPojo;

import java.time.LocalDateTime;

import org.jooq.Field;
import org.jooq.JSON;
import org.jooq.Record1;
import org.jooq.Record6;
import org.jooq.Row6;
import org.jooq.impl.UpdatableRecordImpl;


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

    private static final long serialVersionUID = 1L;

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

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

    /**
     * Setter for <code>databasir.database_document_history.project_id</code>.
     */
    public void setProjectId(Integer value) {
        set(1, value);
    }

    /**
     * Getter for <code>databasir.database_document_history.project_id</code>.
     */
    public Integer getProjectId() {
        return (Integer) get(1);
    }

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

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

    /**
     * Setter for
     * <code>databasir.database_document_history.database_document_object</code>.
     */
    public void setDatabaseDocumentObject(JSON value) {
        set(3, value);
    }

    /**
     * Getter for
     * <code>databasir.database_document_history.database_document_object</code>.
     */
    public JSON getDatabaseDocumentObject() {
        return (JSON) get(3);
    }

    /**
     * Setter for <code>databasir.database_document_history.version</code>.
     */
    public void setVersion(Long value) {
        set(4, value);
    }

    /**
     * Getter for <code>databasir.database_document_history.version</code>.
     */
    public Long getVersion() {
        return (Long) get(4);
    }

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

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

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

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

    // -------------------------------------------------------------------------
    // Record6 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row6<Integer, Integer, Integer, JSON, Long, LocalDateTime> fieldsRow() {
        return (Row6) super.fieldsRow();
    }

    @Override
    public Row6<Integer, Integer, Integer, JSON, Long, LocalDateTime> valuesRow() {
        return (Row6) super.valuesRow();
    }

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

    @Override
    public Field<Integer> field2() {
        return DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY.PROJECT_ID;
    }

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

    @Override
    public Field<JSON> field4() {
        return DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY.DATABASE_DOCUMENT_OBJECT;
    }

    @Override
    public Field<Long> field5() {
        return DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY.VERSION;
    }

    @Override
    public Field<LocalDateTime> field6() {
        return DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY.CREATE_AT;
    }

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

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

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

    @Override
    public JSON component4() {
        return getDatabaseDocumentObject();
    }

    @Override
    public Long component5() {
        return getVersion();
    }

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

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

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

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

    @Override
    public JSON value4() {
        return getDatabaseDocumentObject();
    }

    @Override
    public Long value5() {
        return getVersion();
    }

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

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

    @Override
    public DatabaseDocumentHistoryRecord value2(Integer value) {
        setProjectId(value);
        return this;
    }

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

    @Override
    public DatabaseDocumentHistoryRecord value4(JSON value) {
        setDatabaseDocumentObject(value);
        return this;
    }

    @Override
    public DatabaseDocumentHistoryRecord value5(Long value) {
        setVersion(value);
        return this;
    }

    @Override
    public DatabaseDocumentHistoryRecord value6(LocalDateTime value) {
        setCreateAt(value);
        return this;
    }

    @Override
    public DatabaseDocumentHistoryRecord values(Integer value1, Integer value2, Integer value3, JSON value4, Long value5, LocalDateTime value6) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        return this;
    }

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

    /**
     * Create a detached DatabaseDocumentHistoryRecord
     */
    public DatabaseDocumentHistoryRecord() {
        super(DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY);
    }

    /**
     * Create a detached, initialised DatabaseDocumentHistoryRecord
     */
    public DatabaseDocumentHistoryRecord(Integer id, Integer projectId, Integer databaseDocumentId, JSON databaseDocumentObject, Long version, LocalDateTime createAt) {
        super(DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY);

        setId(id);
        setProjectId(projectId);
        setDatabaseDocumentId(databaseDocumentId);
        setDatabaseDocumentObject(databaseDocumentObject);
        setVersion(version);
        setCreateAt(createAt);
    }

    /**
     * Create a detached, initialised DatabaseDocumentHistoryRecord
     */
    public DatabaseDocumentHistoryRecord(DatabaseDocumentHistoryPojo value) {
        super(DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY);

        if (value != null) {
            setId(value.getId());
            setProjectId(value.getProjectId());
            setDatabaseDocumentId(value.getDatabaseDocumentId());
            setDatabaseDocumentObject(value.getDatabaseDocumentObject());
            setVersion(value.getVersion());
            setCreateAt(value.getCreateAt());
        }
    }
}
