/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.rbac.domain.tables.pojos;


import cn.vertxup.rbac.domain.tables.interfaces.ISView;
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 SView implements VertxPojo, ISView {

    private static final long serialVersionUID = 1L;

    private String key;
    private String name;
    private String title;
    private String owner;
    private String ownerType;
    private String resourceId;
    private String projection;
    private String criteria;
    private String rows;
    private String position;
    private Boolean visitant;
    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 SView() {}

    public SView(ISView value) {
        this.key = value.getKey();
        this.name = value.getName();
        this.title = value.getTitle();
        this.owner = value.getOwner();
        this.ownerType = value.getOwnerType();
        this.resourceId = value.getResourceId();
        this.projection = value.getProjection();
        this.criteria = value.getCriteria();
        this.rows = value.getRows();
        this.position = value.getPosition();
        this.visitant = value.getVisitant();
        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 SView(
        String key,
        String name,
        String title,
        String owner,
        String ownerType,
        String resourceId,
        String projection,
        String criteria,
        String rows,
        String position,
        Boolean visitant,
        String sigma,
        String language,
        Boolean active,
        String metadata,
        LocalDateTime createdAt,
        String createdBy,
        LocalDateTime updatedAt,
        String updatedBy
    ) {
        this.key = key;
        this.name = name;
        this.title = title;
        this.owner = owner;
        this.ownerType = ownerType;
        this.resourceId = resourceId;
        this.projection = projection;
        this.criteria = criteria;
        this.rows = rows;
        this.position = position;
        this.visitant = visitant;
        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 SView(io.vertx.core.json.JsonObject json) {
                this();
                fromJson(json);
        }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.KEY</code>. 「key」- 限定记录ID
     */
    @Override
    public String getKey() {
        return this.key;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.KEY</code>. 「key」- 限定记录ID
     */
    @Override
    public SView setKey(String key) {
        this.key = key;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.NAME</code>. 「name」- 视图名称，每个 MATRIX
     * 对应一个视图
     */
    @Override
    public String getName() {
        return this.name;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.NAME</code>. 「name」- 视图名称，每个 MATRIX
     * 对应一个视图
     */
    @Override
    public SView setName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.TITLE</code>. 「title」- 视图标题，用户输入，可选择
     */
    @Override
    public String getTitle() {
        return this.title;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.TITLE</code>. 「title」- 视图标题，用户输入，可选择
     */
    @Override
    public SView setTitle(String title) {
        this.title = title;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.OWNER</code>. 「owner」- 用户 / 角色ID
     */
    @Override
    public String getOwner() {
        return this.owner;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.OWNER</code>. 「owner」- 用户 / 角色ID
     */
    @Override
    public SView setOwner(String owner) {
        this.owner = owner;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.OWNER_TYPE</code>. 「ownerType」- ROLE
     * 角色，USER 用户
     */
    @Override
    public String getOwnerType() {
        return this.ownerType;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.OWNER_TYPE</code>. 「ownerType」- ROLE
     * 角色，USER 用户
     */
    @Override
    public SView setOwnerType(String ownerType) {
        this.ownerType = ownerType;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.RESOURCE_ID</code>. 「resourceId」-
     * 关联资源ID
     */
    @Override
    public String getResourceId() {
        return this.resourceId;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.RESOURCE_ID</code>. 「resourceId」-
     * 关联资源ID
     */
    @Override
    public SView setResourceId(String resourceId) {
        this.resourceId = resourceId;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.PROJECTION</code>. 「projection」-
     * 该资源的列定义（单用户处理）
     */
    @Override
    public String getProjection() {
        return this.projection;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.PROJECTION</code>. 「projection」-
     * 该资源的列定义（单用户处理）
     */
    @Override
    public SView setProjection(String projection) {
        this.projection = projection;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.CRITERIA</code>. 「criteria」-
     * 该资源的行查询（单用户处理）
     */
    @Override
    public String getCriteria() {
        return this.criteria;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.CRITERIA</code>. 「criteria」-
     * 该资源的行查询（单用户处理）
     */
    @Override
    public SView setCriteria(String criteria) {
        this.criteria = criteria;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.ROWS</code>. 「rows」- 该资源针对保存的行进行过滤
     */
    @Override
    public String getRows() {
        return this.rows;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.ROWS</code>. 「rows」- 该资源针对保存的行进行过滤
     */
    @Override
    public SView setRows(String rows) {
        this.rows = rows;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.POSITION</code>. 「position」-
     * 当前视图的模块位置，比页面低一个维度
     */
    @Override
    public String getPosition() {
        return this.position;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.POSITION</code>. 「position」-
     * 当前视图的模块位置，比页面低一个维度
     */
    @Override
    public SView setPosition(String position) {
        this.position = position;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.VISITANT</code>. 「visitant」-
     * 是否包含了视图访问者
     */
    @Override
    public Boolean getVisitant() {
        return this.visitant;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.VISITANT</code>. 「visitant」-
     * 是否包含了视图访问者
     */
    @Override
    public SView setVisitant(Boolean visitant) {
        this.visitant = visitant;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.S_VIEW.SIGMA</code>. 「sigma」- 用户组绑定的统一标识
     */
    @Override
    public String getSigma() {
        return this.sigma;
    }

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.SIGMA</code>. 「sigma」- 用户组绑定的统一标识
     */
    @Override
    public SView setSigma(String sigma) {
        this.sigma = sigma;
        return this;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Setter for <code>DB_ETERNAL.S_VIEW.UPDATED_BY</code>. 「updatedBy」- 更新人
     */
    @Override
    public SView 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 SView other = (SView) 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.title == null) {
            if (other.title != null)
                return false;
        }
        else if (!this.title.equals(other.title))
            return false;
        if (this.owner == null) {
            if (other.owner != null)
                return false;
        }
        else if (!this.owner.equals(other.owner))
            return false;
        if (this.ownerType == null) {
            if (other.ownerType != null)
                return false;
        }
        else if (!this.ownerType.equals(other.ownerType))
            return false;
        if (this.resourceId == null) {
            if (other.resourceId != null)
                return false;
        }
        else if (!this.resourceId.equals(other.resourceId))
            return false;
        if (this.projection == null) {
            if (other.projection != null)
                return false;
        }
        else if (!this.projection.equals(other.projection))
            return false;
        if (this.criteria == null) {
            if (other.criteria != null)
                return false;
        }
        else if (!this.criteria.equals(other.criteria))
            return false;
        if (this.rows == null) {
            if (other.rows != null)
                return false;
        }
        else if (!this.rows.equals(other.rows))
            return false;
        if (this.position == null) {
            if (other.position != null)
                return false;
        }
        else if (!this.position.equals(other.position))
            return false;
        if (this.visitant == null) {
            if (other.visitant != null)
                return false;
        }
        else if (!this.visitant.equals(other.visitant))
            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.title == null) ? 0 : this.title.hashCode());
        result = prime * result + ((this.owner == null) ? 0 : this.owner.hashCode());
        result = prime * result + ((this.ownerType == null) ? 0 : this.ownerType.hashCode());
        result = prime * result + ((this.resourceId == null) ? 0 : this.resourceId.hashCode());
        result = prime * result + ((this.projection == null) ? 0 : this.projection.hashCode());
        result = prime * result + ((this.criteria == null) ? 0 : this.criteria.hashCode());
        result = prime * result + ((this.rows == null) ? 0 : this.rows.hashCode());
        result = prime * result + ((this.position == null) ? 0 : this.position.hashCode());
        result = prime * result + ((this.visitant == null) ? 0 : this.visitant.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("SView (");

        sb.append(key);
        sb.append(", ").append(name);
        sb.append(", ").append(title);
        sb.append(", ").append(owner);
        sb.append(", ").append(ownerType);
        sb.append(", ").append(resourceId);
        sb.append(", ").append(projection);
        sb.append(", ").append(criteria);
        sb.append(", ").append(rows);
        sb.append(", ").append(position);
        sb.append(", ").append(visitant);
        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(ISView from) {
        setKey(from.getKey());
        setName(from.getName());
        setTitle(from.getTitle());
        setOwner(from.getOwner());
        setOwnerType(from.getOwnerType());
        setResourceId(from.getResourceId());
        setProjection(from.getProjection());
        setCriteria(from.getCriteria());
        setRows(from.getRows());
        setPosition(from.getPosition());
        setVisitant(from.getVisitant());
        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 ISView> E into(E into) {
        into.from(this);
        return into;
    }
}
