| 限定符和类型 | 方法和说明 |
|---|---|
int |
countAll()
相当于 select count(1) form xxxx
|
int |
countBySample(T entity)
根据 entity 条件,作为样本 null 将不会被列入条件。
|
default LambdaOperations.LambdaDelete<T> |
delete()
return LambdaDelete for delete
|
int |
delete(T entity)
删除
|
int |
deleteById(Serializable id)
根据 ID 删除
|
int |
deleteByIds(List<? extends Serializable> idList)
根据 ID 删除
|
Class<T> |
entityType() |
default int |
executeStatement(String stId,
Object parameter)
执行 Mapper 配置文件中的 SQL
|
T |
getById(Serializable id)
根据 ID 查询
|
List<T> |
getByIds(List<? extends Serializable> idList)
查询(根据ID 批量查询)
|
DalSession |
getSession() |
default Page |
initPageBySample(Object sample,
int pageSize)
初始化分页对象
|
Page |
initPageBySample(Object sample,
int pageSize,
int pageNumberOffset)
初始化分页对象
|
default LambdaOperations.LambdaInsert<T> |
insert()
return LambdaInsert for insert
|
List<T> |
listBySample(T entity)
根据 entity 条件,作为样本 null 将不会被列入条件。
|
PageResult<T> |
pageBySample(Object sample,
Page page)
分页查询
|
default LambdaOperations.LambdaQuery<T> |
query()
return LambdaQuery for query
|
default <E> List<E> |
queryStatement(String stId,
Object parameter)
执行 Mapper 配置文件中的 SQL
|
default <E> List<E> |
queryStatement(String stId,
Object parameter,
Page page)
执行 Mapper 配置文件中的 SQL
|
default int |
save(List<T> entity)
插入一组记录
|
default int |
save(T entity)
插入一条记录
|
int |
saveOrUpdate(T entity)
保存或修改
|
LambdaTemplate |
template() |
default LambdaOperations.LambdaUpdate<T> |
update()
return LambdaUpdate for update
|
LambdaTemplate template()
DalSession getSession()
default LambdaOperations.LambdaInsert<T> insert()
default LambdaOperations.LambdaDelete<T> delete()
default LambdaOperations.LambdaUpdate<T> update()
default LambdaOperations.LambdaQuery<T> query()
default int executeStatement(String stId, Object parameter) throws SQLException
SQLExceptiondefault <E> List<E> queryStatement(String stId, Object parameter) throws SQLException
SQLExceptiondefault <E> List<E> queryStatement(String stId, Object parameter, Page page) throws SQLException
SQLExceptiondefault int save(T entity) throws SQLException
entity - 实体对象SQLExceptiondefault int save(List<T> entity) throws SQLException
entity - 实体对象列表SQLExceptionint saveOrUpdate(T entity) throws SQLException
entity - 实体对象SQLExceptionint delete(T entity) throws SQLException
entity - 实体对象SQLExceptionint deleteById(Serializable id) throws SQLException
id - 主键IDSQLExceptionint deleteByIds(List<? extends Serializable> idList) throws SQLException
idList - 主键IDSQLExceptionT getById(Serializable id) throws SQLException
id - 主键IDSQLExceptionList<T> getByIds(List<? extends Serializable> idList) throws SQLException
idList - 主键ID列表SQLExceptionList<T> listBySample(T entity) throws SQLException
entity - 实体对象SQLExceptionint countBySample(T entity) throws SQLException
entity - 实体对象SQLExceptionint countAll()
throws SQLException
SQLExceptionPageResult<T> pageBySample(Object sample, Page page) throws SQLException
SQLExceptiondefault Page initPageBySample(Object sample, int pageSize) throws SQLException
SQLExceptionPage initPageBySample(Object sample, int pageSize, int pageNumberOffset) throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.