/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.atom.domain.tables.records;


import cn.vertxup.atom.domain.tables.MJoin;
import cn.vertxup.atom.domain.tables.interfaces.IMJoin;
import io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo;
import org.jooq.Field;
import org.jooq.Record4;
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 MJoinRecord extends UpdatableRecordImpl<MJoinRecord> implements VertxPojo, Record5<String, String, String, Integer, String>, IMJoin {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>DB_ETERNAL.M_JOIN.MODEL</code>. 「model」- 模型identifier
     */
    @Override
    public MJoinRecord setModel(String value) {
        set(0, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_JOIN.MODEL</code>. 「model」- 模型identifier
     */
    @Override
    public String getModel() {
        return (String) get(0);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_JOIN.ENTITY</code>. 「entity」- 实体identifier
     */
    @Override
    public MJoinRecord setEntity(String value) {
        set(1, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_JOIN.ENTITY</code>. 「entity」- 实体identifier
     */
    @Override
    public String getEntity() {
        return (String) get(1);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_JOIN.ENTITY_KEY</code>. 「entityKey」-
     * 实体主键字段名
     */
    @Override
    public MJoinRecord setEntityKey(String value) {
        set(2, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_JOIN.ENTITY_KEY</code>. 「entityKey」-
     * 实体主键字段名
     */
    @Override
    public String getEntityKey() {
        return (String) get(2);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_JOIN.PRIORITY</code>. 「priority」- 优先级
     */
    @Override
    public MJoinRecord setPriority(Integer value) {
        set(3, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_JOIN.PRIORITY</code>. 「priority」- 优先级
     */
    @Override
    public Integer getPriority() {
        return (Integer) get(3);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_JOIN.NAMESPACE</code>. 「namespace」-
     * 名空间（和App绑定的）
     */
    @Override
    public MJoinRecord setNamespace(String value) {
        set(4, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_JOIN.NAMESPACE</code>. 「namespace」-
     * 名空间（和App绑定的）
     */
    @Override
    public String getNamespace() {
        return (String) get(4);
    }

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

    @Override
    public Record4<String, String, String, String> key() {
        return (Record4) super.key();
    }

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

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

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

    @Override
    public Field<String> field1() {
        return MJoin.M_JOIN.MODEL;
    }

    @Override
    public Field<String> field2() {
        return MJoin.M_JOIN.ENTITY;
    }

    @Override
    public Field<String> field3() {
        return MJoin.M_JOIN.ENTITY_KEY;
    }

    @Override
    public Field<Integer> field4() {
        return MJoin.M_JOIN.PRIORITY;
    }

    @Override
    public Field<String> field5() {
        return MJoin.M_JOIN.NAMESPACE;
    }

    @Override
    public String component1() {
        return getModel();
    }

    @Override
    public String component2() {
        return getEntity();
    }

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

    @Override
    public Integer component4() {
        return getPriority();
    }

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

    @Override
    public String value1() {
        return getModel();
    }

    @Override
    public String value2() {
        return getEntity();
    }

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

    @Override
    public Integer value4() {
        return getPriority();
    }

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

    @Override
    public MJoinRecord value1(String value) {
        setModel(value);
        return this;
    }

    @Override
    public MJoinRecord value2(String value) {
        setEntity(value);
        return this;
    }

    @Override
    public MJoinRecord value3(String value) {
        setEntityKey(value);
        return this;
    }

    @Override
    public MJoinRecord value4(Integer value) {
        setPriority(value);
        return this;
    }

    @Override
    public MJoinRecord value5(String value) {
        setNamespace(value);
        return this;
    }

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

    // -------------------------------------------------------------------------
    // FROM and INTO
    // -------------------------------------------------------------------------

    @Override
    public void from(IMJoin from) {
        setModel(from.getModel());
        setEntity(from.getEntity());
        setEntityKey(from.getEntityKey());
        setPriority(from.getPriority());
        setNamespace(from.getNamespace());
    }

    @Override
    public <E extends IMJoin> E into(E into) {
        into.from(this);
        return into;
    }

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

    /**
     * Create a detached MJoinRecord
     */
    public MJoinRecord() {
        super(MJoin.M_JOIN);
    }

    /**
     * Create a detached, initialised MJoinRecord
     */
    public MJoinRecord(String model, String entity, String entityKey, Integer priority, String namespace) {
        super(MJoin.M_JOIN);

        setModel(model);
        setEntity(entity);
        setEntityKey(entityKey);
        setPriority(priority);
        setNamespace(namespace);
    }

    /**
     * Create a detached, initialised MJoinRecord
     */
    public MJoinRecord(cn.vertxup.atom.domain.tables.pojos.MJoin value) {
        super(MJoin.M_JOIN);

        if (value != null) {
            setModel(value.getModel());
            setEntity(value.getEntity());
            setEntityKey(value.getEntityKey());
            setPriority(value.getPriority());
            setNamespace(value.getNamespace());
        }
    }

        public MJoinRecord(io.vertx.core.json.JsonObject json) {
                this();
                fromJson(json);
        }
}
