﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ajax.Model;
using System.ServiceModel;

namespace Ajax.Service.Interfaces
{
    [ServiceContract]
    public interface IDatasetService
    {
        /// <summary>
        /// 获取所有数据集
        /// </summary>
        /// <returns>数据集集合</returns>
        [OperationContract]
        IList<Dataset> GetAllDataSet();
        /// <summary>
        /// 根据PID获取子级数据集
        /// </summary>
        /// <param name="pid">数据集PID</param>
        /// <returns>数据集集合</returns>
        [OperationContract]
        IList<Dataset> GetAllDataSetByPID(Guid pid);
        /// <summary>
        /// 创建新的数据集
        /// </summary>
        /// <param name="dataset">数据集实例</param>
        /// <param name="result">返回消息</param>
        [OperationContract]
        void CreateDataset(Dataset dataset, ref Message_Return<Dataset> result);
        /// <summary>
        /// 更新数据集
        /// </summary>
        /// <param name="dataset">数据集实例</param>
        /// <param name="result">返回消息</param>
        [OperationContract]
        void UpdateDataset(Dataset dataset, ref Message_Return<Dataset> result);
        /// <summary>
        /// 删除数据集
        /// </summary>
        /// <param name="dataset">数据集实例</param>
        /// <param name="result">返回消息</param>
        [OperationContract]
        void DeleteDataset(Dataset dataset, ref Message_Return<Dataset> result);
        /// <summary>
        /// 查询数据集
        /// </summary>
        /// <param name="dataset">数据集实例</param>
        /// <param name="result">返回消息</param>
        [OperationContract]
        void QueryDataset(Dataset dataset, ref Message_Return<Dataset> result); 
        /// <summary>
        /// 根据数据集ID查询数据集下面的数据元记录
        /// </summary>
        /// <param name="datasetID">数据集ID</param>
        /// <param name="result">返回消息</param>
        [OperationContract]
        IList<HealthMetaData> QueryMeteDataByDatasetID(Guid datasetID, ref Message_Return<HealthMetaData> result);
    }
}
