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


import com.databasir.dao.tables.DataSourceProperty;
import com.databasir.dao.tables.pojos.DataSourcePropertyPojo;

import java.time.LocalDateTime;

import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record5;
import org.jooq.Row5;
import org.jooq.impl.UpdatableRecordImpl;


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

    private static final long serialVersionUID = 1L;

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

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

    /**
     * Setter for <code>databasir.data_source_property.data_source_id</code>.
     */
    public void setDataSourceId(Integer value) {
        set(1, value);
    }

    /**
     * Getter for <code>databasir.data_source_property.data_source_id</code>.
     */
    public Integer getDataSourceId() {
        return (Integer) get(1);
    }

    /**
     * Setter for <code>databasir.data_source_property.key</code>.
     */
    public void setKey(String value) {
        set(2, value);
    }

    /**
     * Getter for <code>databasir.data_source_property.key</code>.
     */
    public String getKey() {
        return (String) get(2);
    }

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

    /**
     * Getter for <code>databasir.data_source_property.value</code>.
     */
    public String getValue() {
        return (String) get(3);
    }

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

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

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

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

    // -------------------------------------------------------------------------
    // Record5 type implementation
    // -------------------------------------------------------------------------

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

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

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

    @Override
    public Field<Integer> field2() {
        return DataSourceProperty.DATA_SOURCE_PROPERTY.DATA_SOURCE_ID;
    }

    @Override
    public Field<String> field3() {
        return DataSourceProperty.DATA_SOURCE_PROPERTY.KEY;
    }

    @Override
    public Field<String> field4() {
        return DataSourceProperty.DATA_SOURCE_PROPERTY.VALUE;
    }

    @Override
    public Field<LocalDateTime> field5() {
        return DataSourceProperty.DATA_SOURCE_PROPERTY.CREATE_AT;
    }

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

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

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

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

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

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

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

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

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

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

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

    @Override
    public DataSourcePropertyRecord value2(Integer value) {
        setDataSourceId(value);
        return this;
    }

    @Override
    public DataSourcePropertyRecord value3(String value) {
        setKey(value);
        return this;
    }

    @Override
    public DataSourcePropertyRecord value4(String value) {
        setValue(value);
        return this;
    }

    @Override
    public DataSourcePropertyRecord value5(LocalDateTime value) {
        setCreateAt(value);
        return this;
    }

    @Override
    public DataSourcePropertyRecord values(Integer value1, Integer value2, String value3, String value4, LocalDateTime value5) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        return this;
    }

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

    /**
     * Create a detached DataSourcePropertyRecord
     */
    public DataSourcePropertyRecord() {
        super(DataSourceProperty.DATA_SOURCE_PROPERTY);
    }

    /**
     * Create a detached, initialised DataSourcePropertyRecord
     */
    public DataSourcePropertyRecord(Integer id, Integer dataSourceId, String key, String value, LocalDateTime createAt) {
        super(DataSourceProperty.DATA_SOURCE_PROPERTY);

        setId(id);
        setDataSourceId(dataSourceId);
        setKey(key);
        setValue(value);
        setCreateAt(createAt);
    }

    /**
     * Create a detached, initialised DataSourcePropertyRecord
     */
    public DataSourcePropertyRecord(DataSourcePropertyPojo value) {
        super(DataSourceProperty.DATA_SOURCE_PROPERTY);

        if (value != null) {
            setId(value.getId());
            setDataSourceId(value.getDataSourceId());
            setKey(value.getKey());
            setValue(value.getValue());
            setCreateAt(value.getCreateAt());
        }
    }
}
