silentbalanceyh/vertx-zero

View on GitHub
vertx-pin/zero-atom/src/main/java/cn/vertxup/atom/domain/tables/pojos/MAttribute.java

Summary

Maintainability
F
3 wks
Test Coverage
/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.atom.domain.tables.pojos;


import cn.vertxup.atom.domain.tables.interfaces.IMAttribute;
import io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo;

import java.time.LocalDateTime;
/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class MAttribute implements VertxPojo, IMAttribute {

    private static final long serialVersionUID = 1L;

    private String key;
    private String name;
    private String alias;
    private String type;
    private String expression;
    private String normalize;
    private String inComponent;
    private String outComponent;
    private String modelId;
    private String comments;
    private String source;
    private String sourceField;
    private String sourceConfig;
    private String sourceReference;
    private String sourceExternal;
    private Boolean isArray;
    private Boolean isRefer;
    private Boolean isSyncIn;
    private Boolean isSyncOut;
    private Boolean isLock;
    private Boolean isTrack;
    private Boolean isConfirm;
    private String sigma;
    private String language;
    private Boolean active;
    private String metadata;
    private LocalDateTime createdAt;
    private String createdBy;
    private LocalDateTime updatedAt;
    private String updatedBy;

    public MAttribute() {}

    public MAttribute(IMAttribute value) {
        this.key = value.getKey();
        this.name = value.getName();
        this.alias = value.getAlias();
        this.type = value.getType();
        this.expression = value.getExpression();
        this.normalize = value.getNormalize();
        this.inComponent = value.getInComponent();
        this.outComponent = value.getOutComponent();
        this.modelId = value.getModelId();
        this.comments = value.getComments();
        this.source = value.getSource();
        this.sourceField = value.getSourceField();
        this.sourceConfig = value.getSourceConfig();
        this.sourceReference = value.getSourceReference();
        this.sourceExternal = value.getSourceExternal();
        this.isArray = value.getIsArray();
        this.isRefer = value.getIsRefer();
        this.isSyncIn = value.getIsSyncIn();
        this.isSyncOut = value.getIsSyncOut();
        this.isLock = value.getIsLock();
        this.isTrack = value.getIsTrack();
        this.isConfirm = value.getIsConfirm();
        this.sigma = value.getSigma();
        this.language = value.getLanguage();
        this.active = value.getActive();
        this.metadata = value.getMetadata();
        this.createdAt = value.getCreatedAt();
        this.createdBy = value.getCreatedBy();
        this.updatedAt = value.getUpdatedAt();
        this.updatedBy = value.getUpdatedBy();
    }

    public MAttribute(
        String key,
        String name,
        String alias,
        String type,
        String expression,
        String normalize,
        String inComponent,
        String outComponent,
        String modelId,
        String comments,
        String source,
        String sourceField,
        String sourceConfig,
        String sourceReference,
        String sourceExternal,
        Boolean isArray,
        Boolean isRefer,
        Boolean isSyncIn,
        Boolean isSyncOut,
        Boolean isLock,
        Boolean isTrack,
        Boolean isConfirm,
        String sigma,
        String language,
        Boolean active,
        String metadata,
        LocalDateTime createdAt,
        String createdBy,
        LocalDateTime updatedAt,
        String updatedBy
    ) {
        this.key = key;
        this.name = name;
        this.alias = alias;
        this.type = type;
        this.expression = expression;
        this.normalize = normalize;
        this.inComponent = inComponent;
        this.outComponent = outComponent;
        this.modelId = modelId;
        this.comments = comments;
        this.source = source;
        this.sourceField = sourceField;
        this.sourceConfig = sourceConfig;
        this.sourceReference = sourceReference;
        this.sourceExternal = sourceExternal;
        this.isArray = isArray;
        this.isRefer = isRefer;
        this.isSyncIn = isSyncIn;
        this.isSyncOut = isSyncOut;
        this.isLock = isLock;
        this.isTrack = isTrack;
        this.isConfirm = isConfirm;
        this.sigma = sigma;
        this.language = language;
        this.active = active;
        this.metadata = metadata;
        this.createdAt = createdAt;
        this.createdBy = createdBy;
        this.updatedAt = updatedAt;
        this.updatedBy = updatedBy;
    }

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

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.KEY</code>. 「key」- 属性ID
     */
    @Override
    public String getKey() {
        return this.key;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.KEY</code>. 「key」- 属性ID
     */
    @Override
    public MAttribute setKey(String key) {
        this.key = key;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.NAME</code>. 「name」- 属性名称
     */
    @Override
    public String getName() {
        return this.name;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.NAME</code>. 「name」- 属性名称
     */
    @Override
    public MAttribute setName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.ALIAS</code>. 「alias」- 属性别名(业务名)
     */
    @Override
    public String getAlias() {
        return this.alias;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.ALIAS</code>. 「alias」- 属性别名(业务名)
     */
    @Override
    public MAttribute setAlias(String alias) {
        this.alias = alias;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.TYPE</code>. 「type」-
     * INTERNAL/EXTERNAL/REFERENCE属性
     */
    @Override
    public String getType() {
        return this.type;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.TYPE</code>. 「type」-
     * INTERNAL/EXTERNAL/REFERENCE属性
     */
    @Override
    public MAttribute setType(String type) {
        this.type = type;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.EXPRESSION</code>. 「expression」-
     * 表达式
     */
    @Override
    public String getExpression() {
        return this.expression;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.EXPRESSION</code>. 「expression」-
     * 表达式
     */
    @Override
    public MAttribute setExpression(String expression) {
        this.expression = expression;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.NORMALIZE</code>. 「normalize」-
     * 表达式
     */
    @Override
    public String getNormalize() {
        return this.normalize;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.NORMALIZE</code>. 「normalize」-
     * 表达式
     */
    @Override
    public MAttribute setNormalize(String normalize) {
        this.normalize = normalize;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IN_COMPONENT</code>.
     * 「inComponent」- 写入插件
     */
    @Override
    public String getInComponent() {
        return this.inComponent;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IN_COMPONENT</code>.
     * 「inComponent」- 写入插件
     */
    @Override
    public MAttribute setInComponent(String inComponent) {
        this.inComponent = inComponent;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.OUT_COMPONENT</code>.
     * 「outComponent」- 读取插件
     */
    @Override
    public String getOutComponent() {
        return this.outComponent;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.OUT_COMPONENT</code>.
     * 「outComponent」- 读取插件
     */
    @Override
    public MAttribute setOutComponent(String outComponent) {
        this.outComponent = outComponent;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.MODEL_ID</code>. 「modelId」-
     * 关联的模型ID
     */
    @Override
    public String getModelId() {
        return this.modelId;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.MODEL_ID</code>. 「modelId」-
     * 关联的模型ID
     */
    @Override
    public MAttribute setModelId(String modelId) {
        this.modelId = modelId;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.COMMENTS</code>. 「comments」-
     * 当前属性的描述信息
     */
    @Override
    public String getComments() {
        return this.comments;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.COMMENTS</code>. 「comments」-
     * 当前属性的描述信息
     */
    @Override
    public MAttribute setComments(String comments) {
        this.comments = comments;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE</code>. 「source」- 关联实体ID
     */
    @Override
    public String getSource() {
        return this.source;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE</code>. 「source」- 关联实体ID
     */
    @Override
    public MAttribute setSource(String source) {
        this.source = source;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_FIELD</code>.
     * 「sourceField」- 可选,如果不设置则以name为主
     */
    @Override
    public String getSourceField() {
        return this.sourceField;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_FIELD</code>.
     * 「sourceField」- 可选,如果不设置则以name为主
     */
    @Override
    public MAttribute setSourceField(String sourceField) {
        this.sourceField = sourceField;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_CONFIG</code>.
     * 「sourceConfig」- 数据集配置(区分 Array 和 Object)
     */
    @Override
    public String getSourceConfig() {
        return this.sourceConfig;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_CONFIG</code>.
     * 「sourceConfig」- 数据集配置(区分 Array 和 Object)
     */
    @Override
    public MAttribute setSourceConfig(String sourceConfig) {
        this.sourceConfig = sourceConfig;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_REFERENCE</code>.
     * 「sourceReference」- 引用配置信息( type = REFERENCE)
     */
    @Override
    public String getSourceReference() {
        return this.sourceReference;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_REFERENCE</code>.
     * 「sourceReference」- 引用配置信息( type = REFERENCE)
     */
    @Override
    public MAttribute setSourceReference(String sourceReference) {
        this.sourceReference = sourceReference;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_EXTERNAL</code>.
     * 「sourceExternal」- 外部配置信息( type = EXTERNAL )
     */
    @Override
    public String getSourceExternal() {
        return this.sourceExternal;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.SOURCE_EXTERNAL</code>.
     * 「sourceExternal」- 外部配置信息( type = EXTERNAL )
     */
    @Override
    public MAttribute setSourceExternal(String sourceExternal) {
        this.sourceExternal = sourceExternal;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_ARRAY</code>. 「isArray」-
     * 是否集合属性,集合属性在导入导出时可用(保留)
     */
    @Override
    public Boolean getIsArray() {
        return this.isArray;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_ARRAY</code>. 「isArray」-
     * 是否集合属性,集合属性在导入导出时可用(保留)
     */
    @Override
    public MAttribute setIsArray(Boolean isArray) {
        this.isArray = isArray;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_REFER</code>. 「isRefer」-
     * 是否引用属性的主属性,主属性才可拥有 sourceReference 配置,根据 source 有区别
     */
    @Override
    public Boolean getIsRefer() {
        return this.isRefer;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_REFER</code>. 「isRefer」-
     * 是否引用属性的主属性,主属性才可拥有 sourceReference 配置,根据 source 有区别
     */
    @Override
    public MAttribute setIsRefer(Boolean isRefer) {
        this.isRefer = isRefer;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_SYNC_IN</code>. 「isSyncIn」-
     * 是否同步读
     */
    @Override
    public Boolean getIsSyncIn() {
        return this.isSyncIn;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_SYNC_IN</code>. 「isSyncIn」-
     * 是否同步读
     */
    @Override
    public MAttribute setIsSyncIn(Boolean isSyncIn) {
        this.isSyncIn = isSyncIn;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_SYNC_OUT</code>. 「isSyncOut」-
     * 是否同步写
     */
    @Override
    public Boolean getIsSyncOut() {
        return this.isSyncOut;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_SYNC_OUT</code>. 「isSyncOut」-
     * 是否同步写
     */
    @Override
    public MAttribute setIsSyncOut(Boolean isSyncOut) {
        this.isSyncOut = isSyncOut;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_LOCK</code>. 「isLock」-
     * 是否锁定,锁定属性不可删除
     */
    @Override
    public Boolean getIsLock() {
        return this.isLock;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_LOCK</code>. 「isLock」-
     * 是否锁定,锁定属性不可删除
     */
    @Override
    public MAttribute setIsLock(Boolean isLock) {
        this.isLock = isLock;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_TRACK</code>. 「isTrack」-
     * 是否实现历史记录,如果是 isTrack 那么启用 ACTIVITY 的变更记录,对应 ITEM
     */
    @Override
    public Boolean getIsTrack() {
        return this.isTrack;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_TRACK</code>. 「isTrack」-
     * 是否实现历史记录,如果是 isTrack 那么启用 ACTIVITY 的变更记录,对应 ITEM
     */
    @Override
    public MAttribute setIsTrack(Boolean isTrack) {
        this.isTrack = isTrack;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_CONFIRM</code>. 「isConfirm」-
     * 是否生成待确认变更,只有放在待确认变更中的数据需要生成待确认变更
     */
    @Override
    public Boolean getIsConfirm() {
        return this.isConfirm;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.IS_CONFIRM</code>. 「isConfirm」-
     * 是否生成待确认变更,只有放在待确认变更中的数据需要生成待确认变更
     */
    @Override
    public MAttribute setIsConfirm(Boolean isConfirm) {
        this.isConfirm = isConfirm;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.SIGMA</code>. 「sigma」- 统一标识
     */
    @Override
    public String getSigma() {
        return this.sigma;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.SIGMA</code>. 「sigma」- 统一标识
     */
    @Override
    public MAttribute setSigma(String sigma) {
        this.sigma = sigma;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.LANGUAGE</code>. 「language」-
     * 使用的语言
     */
    @Override
    public String getLanguage() {
        return this.language;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.LANGUAGE</code>. 「language」-
     * 使用的语言
     */
    @Override
    public MAttribute setLanguage(String language) {
        this.language = language;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.ACTIVE</code>. 「active」- 是否启用
     */
    @Override
    public Boolean getActive() {
        return this.active;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.ACTIVE</code>. 「active」- 是否启用
     */
    @Override
    public MAttribute setActive(Boolean active) {
        this.active = active;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.METADATA</code>. 「metadata」-
     * 附加配置数据
     */
    @Override
    public String getMetadata() {
        return this.metadata;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.METADATA</code>. 「metadata」-
     * 附加配置数据
     */
    @Override
    public MAttribute setMetadata(String metadata) {
        this.metadata = metadata;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.CREATED_AT</code>. 「createdAt」-
     * 创建时间
     */
    @Override
    public LocalDateTime getCreatedAt() {
        return this.createdAt;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.CREATED_AT</code>. 「createdAt」-
     * 创建时间
     */
    @Override
    public MAttribute setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.CREATED_BY</code>. 「createdBy」-
     * 创建人
     */
    @Override
    public String getCreatedBy() {
        return this.createdBy;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.CREATED_BY</code>. 「createdBy」-
     * 创建人
     */
    @Override
    public MAttribute setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.UPDATED_AT</code>. 「updatedAt」-
     * 更新时间
     */
    @Override
    public LocalDateTime getUpdatedAt() {
        return this.updatedAt;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.UPDATED_AT</code>. 「updatedAt」-
     * 更新时间
     */
    @Override
    public MAttribute setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_ATTRIBUTE.UPDATED_BY</code>. 「updatedBy」-
     * 更新人
     */
    @Override
    public String getUpdatedBy() {
        return this.updatedBy;
    }

    /**
     * Setter for <code>DB_ETERNAL.M_ATTRIBUTE.UPDATED_BY</code>. 「updatedBy」-
     * 更新人
     */
    @Override
    public MAttribute setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
        return this;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final MAttribute other = (MAttribute) obj;
        if (this.key == null) {
            if (other.key != null)
                return false;
        }
        else if (!this.key.equals(other.key))
            return false;
        if (this.name == null) {
            if (other.name != null)
                return false;
        }
        else if (!this.name.equals(other.name))
            return false;
        if (this.alias == null) {
            if (other.alias != null)
                return false;
        }
        else if (!this.alias.equals(other.alias))
            return false;
        if (this.type == null) {
            if (other.type != null)
                return false;
        }
        else if (!this.type.equals(other.type))
            return false;
        if (this.expression == null) {
            if (other.expression != null)
                return false;
        }
        else if (!this.expression.equals(other.expression))
            return false;
        if (this.normalize == null) {
            if (other.normalize != null)
                return false;
        }
        else if (!this.normalize.equals(other.normalize))
            return false;
        if (this.inComponent == null) {
            if (other.inComponent != null)
                return false;
        }
        else if (!this.inComponent.equals(other.inComponent))
            return false;
        if (this.outComponent == null) {
            if (other.outComponent != null)
                return false;
        }
        else if (!this.outComponent.equals(other.outComponent))
            return false;
        if (this.modelId == null) {
            if (other.modelId != null)
                return false;
        }
        else if (!this.modelId.equals(other.modelId))
            return false;
        if (this.comments == null) {
            if (other.comments != null)
                return false;
        }
        else if (!this.comments.equals(other.comments))
            return false;
        if (this.source == null) {
            if (other.source != null)
                return false;
        }
        else if (!this.source.equals(other.source))
            return false;
        if (this.sourceField == null) {
            if (other.sourceField != null)
                return false;
        }
        else if (!this.sourceField.equals(other.sourceField))
            return false;
        if (this.sourceConfig == null) {
            if (other.sourceConfig != null)
                return false;
        }
        else if (!this.sourceConfig.equals(other.sourceConfig))
            return false;
        if (this.sourceReference == null) {
            if (other.sourceReference != null)
                return false;
        }
        else if (!this.sourceReference.equals(other.sourceReference))
            return false;
        if (this.sourceExternal == null) {
            if (other.sourceExternal != null)
                return false;
        }
        else if (!this.sourceExternal.equals(other.sourceExternal))
            return false;
        if (this.isArray == null) {
            if (other.isArray != null)
                return false;
        }
        else if (!this.isArray.equals(other.isArray))
            return false;
        if (this.isRefer == null) {
            if (other.isRefer != null)
                return false;
        }
        else if (!this.isRefer.equals(other.isRefer))
            return false;
        if (this.isSyncIn == null) {
            if (other.isSyncIn != null)
                return false;
        }
        else if (!this.isSyncIn.equals(other.isSyncIn))
            return false;
        if (this.isSyncOut == null) {
            if (other.isSyncOut != null)
                return false;
        }
        else if (!this.isSyncOut.equals(other.isSyncOut))
            return false;
        if (this.isLock == null) {
            if (other.isLock != null)
                return false;
        }
        else if (!this.isLock.equals(other.isLock))
            return false;
        if (this.isTrack == null) {
            if (other.isTrack != null)
                return false;
        }
        else if (!this.isTrack.equals(other.isTrack))
            return false;
        if (this.isConfirm == null) {
            if (other.isConfirm != null)
                return false;
        }
        else if (!this.isConfirm.equals(other.isConfirm))
            return false;
        if (this.sigma == null) {
            if (other.sigma != null)
                return false;
        }
        else if (!this.sigma.equals(other.sigma))
            return false;
        if (this.language == null) {
            if (other.language != null)
                return false;
        }
        else if (!this.language.equals(other.language))
            return false;
        if (this.active == null) {
            if (other.active != null)
                return false;
        }
        else if (!this.active.equals(other.active))
            return false;
        if (this.metadata == null) {
            if (other.metadata != null)
                return false;
        }
        else if (!this.metadata.equals(other.metadata))
            return false;
        if (this.createdAt == null) {
            if (other.createdAt != null)
                return false;
        }
        else if (!this.createdAt.equals(other.createdAt))
            return false;
        if (this.createdBy == null) {
            if (other.createdBy != null)
                return false;
        }
        else if (!this.createdBy.equals(other.createdBy))
            return false;
        if (this.updatedAt == null) {
            if (other.updatedAt != null)
                return false;
        }
        else if (!this.updatedAt.equals(other.updatedAt))
            return false;
        if (this.updatedBy == null) {
            if (other.updatedBy != null)
                return false;
        }
        else if (!this.updatedBy.equals(other.updatedBy))
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.key == null) ? 0 : this.key.hashCode());
        result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
        result = prime * result + ((this.alias == null) ? 0 : this.alias.hashCode());
        result = prime * result + ((this.type == null) ? 0 : this.type.hashCode());
        result = prime * result + ((this.expression == null) ? 0 : this.expression.hashCode());
        result = prime * result + ((this.normalize == null) ? 0 : this.normalize.hashCode());
        result = prime * result + ((this.inComponent == null) ? 0 : this.inComponent.hashCode());
        result = prime * result + ((this.outComponent == null) ? 0 : this.outComponent.hashCode());
        result = prime * result + ((this.modelId == null) ? 0 : this.modelId.hashCode());
        result = prime * result + ((this.comments == null) ? 0 : this.comments.hashCode());
        result = prime * result + ((this.source == null) ? 0 : this.source.hashCode());
        result = prime * result + ((this.sourceField == null) ? 0 : this.sourceField.hashCode());
        result = prime * result + ((this.sourceConfig == null) ? 0 : this.sourceConfig.hashCode());
        result = prime * result + ((this.sourceReference == null) ? 0 : this.sourceReference.hashCode());
        result = prime * result + ((this.sourceExternal == null) ? 0 : this.sourceExternal.hashCode());
        result = prime * result + ((this.isArray == null) ? 0 : this.isArray.hashCode());
        result = prime * result + ((this.isRefer == null) ? 0 : this.isRefer.hashCode());
        result = prime * result + ((this.isSyncIn == null) ? 0 : this.isSyncIn.hashCode());
        result = prime * result + ((this.isSyncOut == null) ? 0 : this.isSyncOut.hashCode());
        result = prime * result + ((this.isLock == null) ? 0 : this.isLock.hashCode());
        result = prime * result + ((this.isTrack == null) ? 0 : this.isTrack.hashCode());
        result = prime * result + ((this.isConfirm == null) ? 0 : this.isConfirm.hashCode());
        result = prime * result + ((this.sigma == null) ? 0 : this.sigma.hashCode());
        result = prime * result + ((this.language == null) ? 0 : this.language.hashCode());
        result = prime * result + ((this.active == null) ? 0 : this.active.hashCode());
        result = prime * result + ((this.metadata == null) ? 0 : this.metadata.hashCode());
        result = prime * result + ((this.createdAt == null) ? 0 : this.createdAt.hashCode());
        result = prime * result + ((this.createdBy == null) ? 0 : this.createdBy.hashCode());
        result = prime * result + ((this.updatedAt == null) ? 0 : this.updatedAt.hashCode());
        result = prime * result + ((this.updatedBy == null) ? 0 : this.updatedBy.hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("MAttribute (");

        sb.append(key);
        sb.append(", ").append(name);
        sb.append(", ").append(alias);
        sb.append(", ").append(type);
        sb.append(", ").append(expression);
        sb.append(", ").append(normalize);
        sb.append(", ").append(inComponent);
        sb.append(", ").append(outComponent);
        sb.append(", ").append(modelId);
        sb.append(", ").append(comments);
        sb.append(", ").append(source);
        sb.append(", ").append(sourceField);
        sb.append(", ").append(sourceConfig);
        sb.append(", ").append(sourceReference);
        sb.append(", ").append(sourceExternal);
        sb.append(", ").append(isArray);
        sb.append(", ").append(isRefer);
        sb.append(", ").append(isSyncIn);
        sb.append(", ").append(isSyncOut);
        sb.append(", ").append(isLock);
        sb.append(", ").append(isTrack);
        sb.append(", ").append(isConfirm);
        sb.append(", ").append(sigma);
        sb.append(", ").append(language);
        sb.append(", ").append(active);
        sb.append(", ").append(metadata);
        sb.append(", ").append(createdAt);
        sb.append(", ").append(createdBy);
        sb.append(", ").append(updatedAt);
        sb.append(", ").append(updatedBy);

        sb.append(")");
        return sb.toString();
    }

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

    @Override
    public void from(IMAttribute from) {
        setKey(from.getKey());
        setName(from.getName());
        setAlias(from.getAlias());
        setType(from.getType());
        setExpression(from.getExpression());
        setNormalize(from.getNormalize());
        setInComponent(from.getInComponent());
        setOutComponent(from.getOutComponent());
        setModelId(from.getModelId());
        setComments(from.getComments());
        setSource(from.getSource());
        setSourceField(from.getSourceField());
        setSourceConfig(from.getSourceConfig());
        setSourceReference(from.getSourceReference());
        setSourceExternal(from.getSourceExternal());
        setIsArray(from.getIsArray());
        setIsRefer(from.getIsRefer());
        setIsSyncIn(from.getIsSyncIn());
        setIsSyncOut(from.getIsSyncOut());
        setIsLock(from.getIsLock());
        setIsTrack(from.getIsTrack());
        setIsConfirm(from.getIsConfirm());
        setSigma(from.getSigma());
        setLanguage(from.getLanguage());
        setActive(from.getActive());
        setMetadata(from.getMetadata());
        setCreatedAt(from.getCreatedAt());
        setCreatedBy(from.getCreatedBy());
        setUpdatedAt(from.getUpdatedAt());
        setUpdatedBy(from.getUpdatedBy());
    }

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