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


import com.databasir.dao.tables.DataSource;
import com.databasir.dao.tables.pojos.DataSourcePojo;

import java.time.LocalDateTime;

import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record9;
import org.jooq.Row9;
import org.jooq.impl.UpdatableRecordImpl;


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

    private static final long serialVersionUID = 1L;

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

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

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

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

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

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

    /**
     * Setter for <code>databasir.data_source.database_type</code>.
     */
    public void setDatabaseType(String value) {
        set(3, value);
    }

    /**
     * Getter for <code>databasir.data_source.database_type</code>.
     */
    public String getDatabaseType() {
        return (String) get(3);
    }

    /**
     * Setter for <code>databasir.data_source.url</code>.
     */
    public void setUrl(String value) {
        set(4, value);
    }

    /**
     * Getter for <code>databasir.data_source.url</code>.
     */
    public String getUrl() {
        return (String) get(4);
    }

    /**
     * Setter for <code>databasir.data_source.username</code>.
     */
    public void setUsername(String value) {
        set(5, value);
    }

    /**
     * Getter for <code>databasir.data_source.username</code>.
     */
    public String getUsername() {
        return (String) get(5);
    }

    /**
     * Setter for <code>databasir.data_source.password</code>.
     */
    public void setPassword(String value) {
        set(6, value);
    }

    /**
     * Getter for <code>databasir.data_source.password</code>.
     */
    public String getPassword() {
        return (String) get(6);
    }

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

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

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

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

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

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

    // -------------------------------------------------------------------------
    // Record9 type implementation
    // -------------------------------------------------------------------------

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

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

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

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

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

    @Override
    public Field<String> field4() {
        return DataSource.DATA_SOURCE.DATABASE_TYPE;
    }

    @Override
    public Field<String> field5() {
        return DataSource.DATA_SOURCE.URL;
    }

    @Override
    public Field<String> field6() {
        return DataSource.DATA_SOURCE.USERNAME;
    }

    @Override
    public Field<String> field7() {
        return DataSource.DATA_SOURCE.PASSWORD;
    }

    @Override
    public Field<LocalDateTime> field8() {
        return DataSource.DATA_SOURCE.UPDATE_AT;
    }

    @Override
    public Field<LocalDateTime> field9() {
        return DataSource.DATA_SOURCE.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 getDatabaseType();
    }

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

    @Override
    public String component6() {
        return getUsername();
    }

    @Override
    public String component7() {
        return getPassword();
    }

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

    @Override
    public LocalDateTime component9() {
        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 getDatabaseType();
    }

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

    @Override
    public String value6() {
        return getUsername();
    }

    @Override
    public String value7() {
        return getPassword();
    }

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

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

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

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

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

    @Override
    public DataSourceRecord value4(String value) {
        setDatabaseType(value);
        return this;
    }

    @Override
    public DataSourceRecord value5(String value) {
        setUrl(value);
        return this;
    }

    @Override
    public DataSourceRecord value6(String value) {
        setUsername(value);
        return this;
    }

    @Override
    public DataSourceRecord value7(String value) {
        setPassword(value);
        return this;
    }

    @Override
    public DataSourceRecord value8(LocalDateTime value) {
        setUpdateAt(value);
        return this;
    }

    @Override
    public DataSourceRecord value9(LocalDateTime value) {
        setCreateAt(value);
        return this;
    }

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

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

    /**
     * Create a detached DataSourceRecord
     */
    public DataSourceRecord() {
        super(DataSource.DATA_SOURCE);
    }

    /**
     * Create a detached, initialised DataSourceRecord
     */
    public DataSourceRecord(Integer id, Integer projectId, String databaseName, String databaseType, String url, String username, String password, LocalDateTime updateAt, LocalDateTime createAt) {
        super(DataSource.DATA_SOURCE);

        setId(id);
        setProjectId(projectId);
        setDatabaseName(databaseName);
        setDatabaseType(databaseType);
        setUrl(url);
        setUsername(username);
        setPassword(password);
        setUpdateAt(updateAt);
        setCreateAt(createAt);
    }

    /**
     * Create a detached, initialised DataSourceRecord
     */
    public DataSourceRecord(DataSourcePojo value) {
        super(DataSource.DATA_SOURCE);

        if (value != null) {
            setId(value.getId());
            setProjectId(value.getProjectId());
            setDatabaseName(value.getDatabaseName());
            setDatabaseType(value.getDatabaseType());
            setUrl(value.getUrl());
            setUsername(value.getUsername());
            setPassword(value.getPassword());
            setUpdateAt(value.getUpdateAt());
            setCreateAt(value.getCreateAt());
        }
    }
}
