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


import com.databasir.dao.tables.DatabaseDocument;
import com.databasir.dao.tables.pojos.DatabaseDocumentPojo;

import java.time.LocalDateTime;

import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record8;
import org.jooq.Row8;
import org.jooq.impl.UpdatableRecordImpl;


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

    private static final long serialVersionUID = 1L;

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

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

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

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

    /**
     * Setter for <code>databasir.database_document.database_name</code>.
     */
    public void setDatabaseName(String value) {
        set(2, value);
    }

    /**
     * Getter for <code>databasir.database_document.database_name</code>.
     */
    public String getDatabaseName() {
        return (String) get(2);
    }

    /**
     * Setter for <code>databasir.database_document.product_name</code>.
     */
    public void setProductName(String value) {
        set(3, value);
    }

    /**
     * Getter for <code>databasir.database_document.product_name</code>.
     */
    public String getProductName() {
        return (String) get(3);
    }

    /**
     * Setter for <code>databasir.database_document.product_version</code>.
     */
    public void setProductVersion(String value) {
        set(4, value);
    }

    /**
     * Getter for <code>databasir.database_document.product_version</code>.
     */
    public String getProductVersion() {
        return (String) get(4);
    }

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

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

    /**
     * Setter for <code>databasir.database_document.update_at</code>.
     */
    public void setUpdateAt(LocalDateTime value) {
        set(6, value);
    }

    /**
     * Getter for <code>databasir.database_document.update_at</code>.
     */
    public LocalDateTime getUpdateAt() {
        return (LocalDateTime) get(6);
    }

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

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

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

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

    // -------------------------------------------------------------------------
    // Record8 type implementation
    // -------------------------------------------------------------------------

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

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

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

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

    @Override
    public Field<String> field3() {
        return DatabaseDocument.DATABASE_DOCUMENT.DATABASE_NAME;
    }

    @Override
    public Field<String> field4() {
        return DatabaseDocument.DATABASE_DOCUMENT.PRODUCT_NAME;
    }

    @Override
    public Field<String> field5() {
        return DatabaseDocument.DATABASE_DOCUMENT.PRODUCT_VERSION;
    }

    @Override
    public Field<Long> field6() {
        return DatabaseDocument.DATABASE_DOCUMENT.VERSION;
    }

    @Override
    public Field<LocalDateTime> field7() {
        return DatabaseDocument.DATABASE_DOCUMENT.UPDATE_AT;
    }

    @Override
    public Field<LocalDateTime> field8() {
        return DatabaseDocument.DATABASE_DOCUMENT.CREATE_AT;
    }

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

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

    @Override
    public String component3() {
        return getDatabaseName();
    }

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

    @Override
    public String component5() {
        return getProductVersion();
    }

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

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

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

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

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

    @Override
    public String value3() {
        return getDatabaseName();
    }

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

    @Override
    public String value5() {
        return getProductVersion();
    }

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

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

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

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

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

    @Override
    public DatabaseDocumentRecord value3(String value) {
        setDatabaseName(value);
        return this;
    }

    @Override
    public DatabaseDocumentRecord value4(String value) {
        setProductName(value);
        return this;
    }

    @Override
    public DatabaseDocumentRecord value5(String value) {
        setProductVersion(value);
        return this;
    }

    @Override
    public DatabaseDocumentRecord value6(Long value) {
        setVersion(value);
        return this;
    }

    @Override
    public DatabaseDocumentRecord value7(LocalDateTime value) {
        setUpdateAt(value);
        return this;
    }

    @Override
    public DatabaseDocumentRecord value8(LocalDateTime value) {
        setCreateAt(value);
        return this;
    }

    @Override
    public DatabaseDocumentRecord values(Integer value1, Integer value2, String value3, String value4, String value5, Long value6, LocalDateTime value7, LocalDateTime value8) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        value8(value8);
        return this;
    }

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

    /**
     * Create a detached DatabaseDocumentRecord
     */
    public DatabaseDocumentRecord() {
        super(DatabaseDocument.DATABASE_DOCUMENT);
    }

    /**
     * Create a detached, initialised DatabaseDocumentRecord
     */
    public DatabaseDocumentRecord(Integer id, Integer projectId, String databaseName, String productName, String productVersion, Long version, LocalDateTime updateAt, LocalDateTime createAt) {
        super(DatabaseDocument.DATABASE_DOCUMENT);

        setId(id);
        setProjectId(projectId);
        setDatabaseName(databaseName);
        setProductName(productName);
        setProductVersion(productVersion);
        setVersion(version);
        setUpdateAt(updateAt);
        setCreateAt(createAt);
    }

    /**
     * Create a detached, initialised DatabaseDocumentRecord
     */
    public DatabaseDocumentRecord(DatabaseDocumentPojo value) {
        super(DatabaseDocument.DATABASE_DOCUMENT);

        if (value != null) {
            setId(value.getId());
            setProjectId(value.getProjectId());
            setDatabaseName(value.getDatabaseName());
            setProductName(value.getProductName());
            setProductVersion(value.getProductVersion());
            setVersion(value.getVersion());
            setUpdateAt(value.getUpdateAt());
            setCreateAt(value.getCreateAt());
        }
    }
}
