package com.liangjian.dataplatform.member.entity.vo.detailvo;

import com.liangjian.dataplatform.member.entity.vo.MetaRelVo;
import com.liangjian.dataplatform.member.entity.vo.datanodes.DataNode;
import com.liangjian.dataplatform.member.entity.vo.datanodes.PDM;
import com.liangjian.dataplatform.member.entity.vo.datanodes.PDMColumn;

import java.util.List;

/**
 * @Author: 黄子奇
 * @Date: 2019/8/28 16:29
 */
public class PDMDetailVo implements DetailVo<PDM> {
    private static final long serialVersionUID = -7308025815564491056L;

    private PDM pdm;
    private List<PDMColumn> columns;
    private List<MetaRelVo> relations;

    public PDMDetailVo() {
    }

    public PDMDetailVo(PDM pdm, List<PDMColumn> columns, List<MetaRelVo> relations) {
        this.pdm = pdm;
        this.columns = columns;
        this.relations = relations;
    }

    @Override
    public DataNode getRealNode() {
        return pdm;
    }

    @Override
    public void setRealNode(PDM pdm) {
        this.pdm = pdm;
    }

    @Override
    public String getNodeType() {
        return pdm.getNodeType();
    }

    @Override
    public String getDataNodeType() {
        return pdm.getDataKind();
    }

    public List<PDMColumn> getColumns() {
        return columns;
    }

    public void setColumns(List<PDMColumn> columns) {
        this.columns = columns;
    }

    public List<MetaRelVo> getRelations() {
        return relations;
    }

    public void setRelations(List<MetaRelVo> relations) {
        this.relations = relations;
    }
}
