package com.liangjian.dataplatform.member.service;

import com.liangjian.dataplatform.member.entity.vo.datanodes.DataNode;
import com.liangjian.dataplatform.member.entity.vo.datanodes.MetaCorePackage;
import com.liangjian.dataplatform.member.entity.vo.datanodes.MetaDataSource;
import com.liangjian.dataplatform.member.entity.vo.datanodes.PDM;
import com.liangjian.dataplatform.member.entity.vo.detailvo.*;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @Author: 黄子奇
 * @Date: 2019/8/26 14:07
 */
public interface IMetaCoreQueryService {

    //获取节点数据系列，比如树状结构的拿到树上的各种节点

    List<DataNode> createRootNodes();

    List<DataNode> queryByPrtId(String pid);

    Page<DataNode> queryByPrtId(String pid, Integer page, Integer size);

    List<DataNode> queryByPrtIdAndMetaMdl(String pid, String metaMdl);

    Page<DataNode> queryByPrtIdAndMetaMdl(String pid, String metaMdl, Integer page, Integer size);

    List<DataNode> queryByRootType(String rootType);

    Page<DataNode> queryByRootType(String rootType, Integer page, Integer size);

    //获取节点详细信息

    DetailVo getNodeDetail(String id);

    PackageDetailVo getPackageDetail(DataNode node);

    DataSourceDetailVo getDataSourceDetail(DataNode node);

    PDMDetailVo getPDMDetail(DataNode node, Object extract);

    PDMColumnDetailVo getPDMColumnDetail(DataNode node, Object extract);

    RootDetailVo getRootDetailVo(DataNode node);

    /**
     * 获取关联关系的子表
     * @param id
     * @return
     */
    List<DataNode> getRelaChildTables(String id);
}
