接口 CRUDHandler
- 所有已知实现类:
CRUDHandlerImpl
public interface CRUDHandler
crud 各个逻辑的 handler
-
方法概要
修饰符和类型方法说明default longbatchDelete(String modelName, long[] deleteIDs) 批量删除default booleancheckUnique(String modelName, String fieldName, Object value, Long id) 检查字段值唯一性default boolean删除default cool.scx.base.BaseModel获取单条数据信息default CRUDListResultlist(String modelName, Integer limit, Integer page, List<CRUDOrderByBody> orderByBodyList, List<CRUDWhereBody> whereBodyList) 获取列表数据default booleanrevokeDelete(String modelName, Long id) default cool.scx.base.BaseModeldefault cool.scx.base.BaseModel更新数据
-
方法详细资料
-
checkUnique
检查字段值唯一性- 参数:
modelName- model 名称fieldName- 列名称value- 列值id- id (不为空时会排除此 id 进行唯一性检查)- 返回:
- 是否唯一
-
revokeDelete
- 参数:
modelName- model 名称id- model 的 id- 返回:
- r
-
batchDelete
批量删除- 参数:
modelName- model 名称deleteIDs- 批量删除的 id- 返回:
- r
-
delete
删除- 参数:
modelName- model 名称id- model 类的 id- 返回:
- r
-
update
更新数据- 参数:
modelName- model 名称entityMap- 可以转换为 model类的 map (其中需要存在 id)- 返回:
- c
-
save
- 参数:
modelName- model 名称entityMap- 可以转换为 model类的 map- 返回:
- c
-
info
获取单条数据信息- 参数:
modelName- model 名称id- 查询的 id- 返回:
- 单条数据信息
-
list
default CRUDListResult list(String modelName, Integer limit, Integer page, List<CRUDOrderByBody> orderByBodyList, List<CRUDWhereBody> whereBodyList) 获取列表数据- 参数:
modelName- model 名称limit- 分页:每页数据page- 分页:页码orderByBodyList- 排序参数 (字段,类型)whereBodyList- 查询参数- 返回:
- 列表数据
-