package com.yihu.hos.system.dao.intf;

import com.yihu.hos.web.framework.dao.XSQLGeneralDAO;
import com.yihu.hos.web.framework.model.DataGridResult;
import com.yihu.hos.system.model.SystemDatasource;

import java.util.List;
import java.util.Map;

/**
 * Created by hzp on 2016/1/11.
 */
public interface IDatasourceDao extends XSQLGeneralDAO {

    /**
     * 测试连接数据源
     */
    void testDatasource(String type, String config) throws Exception;

    /**
     * 获取数据源列表
     * @return
     */
    DataGridResult getDatasource(Map<String, Object> conditionMap, Integer page, Integer pageSize) throws Exception;

    /**
     * 获取全部数据源列表
     * @return
     */
    DataGridResult getDatasourceByOrg(String orgId) throws Exception;

    /**
     * 修改数据源状态(暂弃)
     */
    void validDatasource(String id, String valid) throws Exception;

    List<SystemDatasource> getDatasources(String orgId)throws Exception;
}
