package cn.com.tenlion.configtable.dao.configtable;

import cn.com.tenlion.configtable.pojo.dtos.configtableoperation.ConfigTableOperationDTO;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import cn.com.tenlion.configtable.pojo.bos.configtable.ConfigTableBO;
import cn.com.tenlion.configtable.pojo.pos.configtable.ConfigTablePO;
import cn.com.tenlion.configtable.pojo.dtos.configtable.ConfigTableDTO;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IConfigTableDao
 * @Description: 
 * @Author: CodeFactory
 * @Date: 2021-06-24 10:59:30
 * @Version: 3.0
 **/
@Repository
public interface IConfigTableDao {

    /**
     * 新增
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;

    /**
     * 删除（物理）
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 修改
     *
     * @param params
     * @throws UpdateException
     */
    void update(Map<String, Object> params) throws UpdateException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    ConfigTableDTO get(Map<String, Object> params) throws SearchException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    ConfigTableBO getBO(Map<String, Object> params) throws SearchException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    ConfigTablePO getPO(Map<String, Object> params) throws SearchException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ConfigTableDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ConfigTableBO> listBO(Map<String, Object> params) throws SearchException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ConfigTablePO> listPO(Map<String, Object> params) throws SearchException;

    /**
     * 统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;

    /**
     * 判断编码是否存在
     *
     * @param configTableNumber
     * @return
     * @throws SearchException
     */
    ConfigTableDTO getTableNumber(String configTableNumber) throws SearchException;

    /**
     * 判断表名是否存在
     *
     * @param configTableCode
     * @return
     * @throws SearchException
     */
    ConfigTableDTO getTableCode(String configTableCode) throws SearchException;

    /**
     * 更新激活状态
     * @param updateActivation
     * @throws UpdateException
     */
    void updateActivation(Map<String, Object> updateActivation) throws UpdateException;

}