This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-ntc/src/main/java/com/nis/web/dao/CrudDao.java
wangxin 463a43c0c1 jdbc加入批量插入转换参数rewriteBatchedStatements=true
取消修改基础service中没必要调用的代码
2018-11-14 11:32:02 +08:00

81 lines
1.2 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.nis.web.dao;
import java.util.List;
/**
* DAO支持类实现
* @author
* @version
* @param <T>
*/
public interface CrudDao<T> {
/**
* 获取单条数据
* @param id
* @return
*/
public T get(Long id);
/**
* 获取单条数据
* @param entity
* @return
*/
public T get(T entity);
/**
* 查询数据列表如果需要分页请设置分页对象entity.setPage(new Page<T>());
* @param entity
* @return
*/
public List<T> findList(T entity);
/**
* 查询所有数据列表
* @param entity
* @return
*/
public List<T> findAllList(T entity);
/**
* 插入数据
* @param entity
* @return
*/
public int insert(T entity);
/**
* 批量插入数据专用,不返回id
* @param entity
* @return
*/
public int insertForBatch(T entity);
/**
* 更新数据
* @param entity
* @return
*/
public int update(T entity);
public int updateValid(T entity);
/**
* 删除数据一般为逻辑删除更新del_flag字段为1
* @param entity
* @return
*/
public int delete(T entity);
/**
* audit(审核数据)
* (这里描述这个方法适用条件 可选)
* @param t
*void
* @exception
* @since 1.0.0
*/
public int audit(T entity);
}