public interface IService<T>
BaseMapper| 限定符和类型 | 方法和说明 |
|---|---|
List<T> |
aggregateList(AggregateChainWrapper<T,?> queryChainWrapper) |
List<T> |
aggregateList(com.mongodb.client.ClientSession clientSession,
AggregateChainWrapper<T,?> queryChainWrapper) |
long |
count() |
long |
count(com.mongodb.client.ClientSession clientSession) |
long |
count(com.mongodb.client.ClientSession clientSession,
QueryChainWrapper<T,?> queryChainWrapper) |
long |
count(QueryChainWrapper<T,?> queryChainWrapper) |
String |
createIndex(org.bson.conversions.Bson bson)
创建索引
|
String |
createIndex(org.bson.conversions.Bson bson,
com.mongodb.client.model.IndexOptions indexOptions)
使用给定的键和选项创建索引。
|
String |
createIndex(com.mongodb.client.ClientSession clientSession,
org.bson.conversions.Bson bson)
创建索引,携带事务
|
String |
createIndex(com.mongodb.client.ClientSession clientSession,
org.bson.conversions.Bson bson,
com.mongodb.client.model.IndexOptions indexOptions)
使用给定的键和选项创建索引。
|
List<String> |
createIndexes(com.mongodb.client.ClientSession clientSession,
List<com.mongodb.client.model.IndexModel> indexes)
创建多个索引
|
List<String> |
createIndexes(com.mongodb.client.ClientSession clientSession,
List<com.mongodb.client.model.IndexModel> indexes,
com.mongodb.client.model.CreateIndexOptions createIndexOptions)
创建多个索引
|
List<String> |
createIndexes(List<com.mongodb.client.model.IndexModel> indexes)
创建多个索引
|
List<String> |
createIndexes(List<com.mongodb.client.model.IndexModel> indexes,
com.mongodb.client.model.CreateIndexOptions createIndexOptions)
创建多个索引
|
void |
dropIndex(org.bson.conversions.Bson keys)
在给定用于创建索引的键的情况下删除索引。
|
void |
dropIndex(org.bson.conversions.Bson keys,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
在给定用于创建索引的键的情况下删除索引。
|
void |
dropIndex(com.mongodb.client.ClientSession clientSession,
org.bson.conversions.Bson keys)
在给定用于创建索引的键的情况下删除索引。
|
void |
dropIndex(com.mongodb.client.ClientSession clientSession,
org.bson.conversions.Bson keys,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
在给定用于创建索引的键的情况下删除索引。
|
void |
dropIndex(com.mongodb.client.ClientSession clientSession,
String indexName)
删除给定其名称的索引。
|
void |
dropIndex(com.mongodb.client.ClientSession clientSession,
String indexName,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
删除给定其名称的索引。
|
void |
dropIndex(String indexName)
删除给定其名称的索引。
|
void |
dropIndex(String indexName,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
删除给定其名称的索引。
|
void |
dropIndexes()
删除此集合上的所有索引,但 _id 上的默认值除外。
|
void |
dropIndexes(com.mongodb.client.ClientSession clientSession)
删除此集合上的所有索引,但 _id 上的默认值除外。
|
void |
dropIndexes(com.mongodb.client.ClientSession clientSession,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
删除此集合上的所有索引,但 _id 上的默认值除外。
|
void |
dropIndexes(com.mongodb.client.model.DropIndexOptions dropIndexOptions)
删除此集合上的所有索引,但 _id 上的默认值除外。
|
List<T> |
getByColumn(com.mongodb.client.ClientSession clientSession,
SFunction<T,Object> field,
Object fieldValue) |
List<T> |
getByColumn(com.mongodb.client.ClientSession clientSession,
String field,
Object fieldValue) |
List<T> |
getByColumn(SFunction<T,Object> field,
Object fieldValue)
根据某一列查询
|
List<T> |
getByColumn(String field,
Object fieldValue)
根据某一列查询
|
T |
getById(com.mongodb.client.ClientSession clientSession,
Serializable id)
根据id查询单个
|
T |
getById(Serializable id)
根据id查询单个
|
List<T> |
getByIds(com.mongodb.client.ClientSession clientSession,
Collection<Serializable> ids) |
List<T> |
getByIds(Collection<Serializable> ids) |
Class<T> |
getGenericityClazz() |
SqlExecute |
getSqlOperation() |
LambdaAggregateChainWrapper<T> |
lambdaAggregate() |
LambdaQueryChainWrapper<T> |
lambdaQuery() |
LambdaUpdateChainWrapper<T> |
lambdaUpdate() |
T |
limitOne(com.mongodb.client.ClientSession clientSession,
QueryChainWrapper<T,?> queryChainWrapper)
获取单个,返回T类型的对象
注:如果查询到大于一条数据,会取第一条返回 |
T |
limitOne(QueryChainWrapper<T,?> queryChainWrapper)
获取单个,返回T类型的对象
注:如果查询到大于一条数据,会取第一条返回 |
List<T> |
list()
查询所有
|
List<T> |
list(AggregateChainWrapper<T,?> queryChainWrapper) |
List<T> |
list(com.mongodb.client.ClientSession clientSession)
查询所有
|
List<T> |
list(com.mongodb.client.ClientSession clientSession,
AggregateChainWrapper<T,?> queryChainWrapper) |
List<T> |
list(com.mongodb.client.ClientSession clientSession,
QueryChainWrapper<T,?> queryChainWrapper) |
List<T> |
list(QueryChainWrapper<T,?> queryChainWrapper) |
List<org.bson.Document> |
listIndexes()
获取此集合中的所有索引。
|
List<org.bson.Document> |
listIndexes(com.mongodb.client.ClientSession clientSession)
获取此集合中的所有索引。
|
T |
one(com.mongodb.client.ClientSession clientSession,
QueryChainWrapper<T,?> queryChainWrapper) |
T |
one(QueryChainWrapper<T,?> queryChainWrapper) |
PageResult<T> |
page(com.mongodb.client.ClientSession clientSession,
Integer pageNum,
Integer pageSize)
分页查询
|
PageResult<T> |
page(com.mongodb.client.ClientSession clientSession,
PageParam pageParam)
分页查询
|
PageResult<T> |
page(com.mongodb.client.ClientSession clientSession,
QueryChainWrapper<T,?> queryChainWrapper,
Integer pageNum,
Integer pageSize) |
PageResult<T> |
page(com.mongodb.client.ClientSession clientSession,
QueryChainWrapper<T,?> queryChainWrapper,
PageParam pageParam) |
PageResult<T> |
page(Integer pageNum,
Integer pageSize)
分页查询
|
PageResult<T> |
page(PageParam pageParam)
分页查询
|
PageResult<T> |
page(QueryChainWrapper<T,?> queryChainWrapper,
Integer pageNum,
Integer pageSize) |
PageResult<T> |
page(QueryChainWrapper<T,?> queryChainWrapper,
PageParam pageParam) |
Boolean |
remove(com.mongodb.client.ClientSession clientSession,
UpdateChainWrapper<T,?> updateChainWrapper)
根据条件删除
|
Boolean |
remove(UpdateChainWrapper<T,?> updateChainWrapper)
根据条件删除
|
Boolean |
removeBatchByIds(com.mongodb.client.ClientSession clientSession,
Collection<Serializable> idList)
根据id批量删除
|
Boolean |
removeBatchByIds(Collection<Serializable> idList)
根据id批量删除
|
Boolean |
removeByColumn(com.mongodb.client.ClientSession clientSession,
SFunction<T,Object> column,
Object value)
根据字段删除
|
Boolean |
removeByColumn(com.mongodb.client.ClientSession clientSession,
String column,
Object value)
根据字段删除
|
Boolean |
removeByColumn(SFunction<T,Object> column,
Object value)
根据字段删除
|
Boolean |
removeByColumn(String column,
Object value)
根据字段删除
|
Boolean |
removeById(com.mongodb.client.ClientSession clientSession,
Serializable id)
根据id删除
|
Boolean |
removeById(Serializable id)
根据id删除
|
Boolean |
save(com.mongodb.client.ClientSession clientSession,
T entity)
添加
|
Boolean |
save(T entity)
添加
|
Boolean |
saveBatch(com.mongodb.client.ClientSession clientSession,
Collection<T> entityList)
添加多个
|
Boolean |
saveBatch(Collection<T> entityList)
添加多个
|
Boolean |
saveOrUpdate(com.mongodb.client.ClientSession clientSession,
T entity)
添加或修改
|
Boolean |
saveOrUpdate(T entity)
添加或修改
|
Boolean |
saveOrUpdateBatch(com.mongodb.client.ClientSession clientSession,
Collection<T> entityList)
批量添加或修改
|
Boolean |
saveOrUpdateBatch(Collection<T> entityList)
批量添加或修改
|
List<T> |
sql(com.mongodb.client.ClientSession clientSession,
String sql) |
List<T> |
sql(String sql)
查询sql,传入值为json,如{eq:XXX}
|
Boolean |
update(com.mongodb.client.ClientSession clientSession,
UpdateChainWrapper<T,?> updateChainWrapper)
根据条件修改
|
Boolean |
update(UpdateChainWrapper<T,?> updateChainWrapper)
根据条件修改
|
Boolean |
updateBatchByIds(com.mongodb.client.ClientSession clientSession,
Collection<T> entityList) |
Boolean |
updateBatchByIds(Collection<T> entityList) |
Boolean |
updateByColumn(com.mongodb.client.ClientSession clientSession,
T entity,
SFunction<T,Object> column)
通过列进行修改
|
Boolean |
updateByColumn(com.mongodb.client.ClientSession clientSession,
T entity,
String column) |
Boolean |
updateByColumn(T entity,
SFunction<T,Object> column)
通过列进行修改
|
Boolean |
updateByColumn(T entity,
String column) |
Boolean |
updateById(com.mongodb.client.ClientSession clientSession,
T entity)
修改
|
Boolean |
updateById(T entity)
修改
|
Boolean save(com.mongodb.client.ClientSession clientSession, T entity)
entity - 添加的对象Boolean saveBatch(Collection<T> entityList)
entityList - 对象集合Boolean saveBatch(com.mongodb.client.ClientSession clientSession, Collection<T> entityList)
entityList - 对象集合Boolean saveOrUpdate(T entity)
entity - 对象Boolean saveOrUpdate(com.mongodb.client.ClientSession clientSession, T entity)
entity - 对象Boolean saveOrUpdateBatch(Collection<T> entityList)
entityList - 对象集合Boolean saveOrUpdateBatch(com.mongodb.client.ClientSession clientSession, Collection<T> entityList)
entityList - 对象集合Boolean updateById(T entity)
entity - 修改的对象,需要包含idBoolean updateById(com.mongodb.client.ClientSession clientSession, T entity)
entity - 修改的对象,需要包含idBoolean updateBatchByIds(Collection<T> entityList)
Boolean updateBatchByIds(com.mongodb.client.ClientSession clientSession, Collection<T> entityList)
Boolean updateByColumn(T entity, SFunction<T,Object> column)
entity - 修改的实体column - 根据什么列修改Boolean updateByColumn(com.mongodb.client.ClientSession clientSession, T entity, SFunction<T,Object> column)
entity - 修改的实体column - 根据什么列修改Boolean updateByColumn(com.mongodb.client.ClientSession clientSession, T entity, String column)
Boolean remove(UpdateChainWrapper<T,?> updateChainWrapper)
updateChainWrapper - 条件Boolean remove(com.mongodb.client.ClientSession clientSession, UpdateChainWrapper<T,?> updateChainWrapper)
updateChainWrapper - 条件clientSession - 事务接口Boolean update(UpdateChainWrapper<T,?> updateChainWrapper)
updateChainWrapper - 条件Boolean update(com.mongodb.client.ClientSession clientSession, UpdateChainWrapper<T,?> updateChainWrapper)
updateChainWrapper - 条件clientSession - 事务接口Boolean removeById(Serializable id)
id - 数据idBoolean removeById(com.mongodb.client.ClientSession clientSession, Serializable id)
id - 数据idBoolean removeByColumn(SFunction<T,Object> column, Object value)
column - 字段名Boolean removeByColumn(com.mongodb.client.ClientSession clientSession, SFunction<T,Object> column, Object value)
column - 字段名Boolean removeByColumn(String column, Object value)
column - 字段value - 值Boolean removeByColumn(com.mongodb.client.ClientSession clientSession, String column, Object value)
column - 字段value - 值Boolean removeBatchByIds(Collection<Serializable> idList)
idList - id集合Boolean removeBatchByIds(com.mongodb.client.ClientSession clientSession, Collection<Serializable> idList)
idList - id集合List<T> list(com.mongodb.client.ClientSession clientSession)
List<T> aggregateList(AggregateChainWrapper<T,?> queryChainWrapper)
List<T> aggregateList(com.mongodb.client.ClientSession clientSession, AggregateChainWrapper<T,?> queryChainWrapper)
T one(QueryChainWrapper<T,?> queryChainWrapper)
T one(com.mongodb.client.ClientSession clientSession, QueryChainWrapper<T,?> queryChainWrapper)
T limitOne(QueryChainWrapper<T,?> queryChainWrapper)
注:如果查询到大于一条数据,会取第一条返回
T limitOne(com.mongodb.client.ClientSession clientSession, QueryChainWrapper<T,?> queryChainWrapper)
注:如果查询到大于一条数据,会取第一条返回
List<T> list(QueryChainWrapper<T,?> queryChainWrapper)
List<T> list(com.mongodb.client.ClientSession clientSession, QueryChainWrapper<T,?> queryChainWrapper)
List<T> list(AggregateChainWrapper<T,?> queryChainWrapper)
List<T> list(com.mongodb.client.ClientSession clientSession, AggregateChainWrapper<T,?> queryChainWrapper)
long count()
long count(com.mongodb.client.ClientSession clientSession)
long count(QueryChainWrapper<T,?> queryChainWrapper)
long count(com.mongodb.client.ClientSession clientSession,
QueryChainWrapper<T,?> queryChainWrapper)
PageResult<T> page(PageParam pageParam)
pageParam - 分页参数对象PageResult<T> page(com.mongodb.client.ClientSession clientSession, PageParam pageParam)
pageParam - 分页参数对象PageResult<T> page(Integer pageNum, Integer pageSize)
pageNum - 当前页pageSize - 每页显示行数PageResult<T> page(com.mongodb.client.ClientSession clientSession, Integer pageNum, Integer pageSize)
pageNum - 当前页pageSize - 每页显示行数PageResult<T> page(QueryChainWrapper<T,?> queryChainWrapper, Integer pageNum, Integer pageSize)
PageResult<T> page(com.mongodb.client.ClientSession clientSession, QueryChainWrapper<T,?> queryChainWrapper, Integer pageNum, Integer pageSize)
PageResult<T> page(QueryChainWrapper<T,?> queryChainWrapper, PageParam pageParam)
PageResult<T> page(com.mongodb.client.ClientSession clientSession, QueryChainWrapper<T,?> queryChainWrapper, PageParam pageParam)
T getById(Serializable id)
id - idT getById(com.mongodb.client.ClientSession clientSession, Serializable id)
id - idList<T> getByIds(Collection<Serializable> ids)
List<T> getByIds(com.mongodb.client.ClientSession clientSession, Collection<Serializable> ids)
List<T> getByColumn(SFunction<T,Object> field, Object fieldValue)
field - 字段fieldValue - 字段值List<T> getByColumn(com.mongodb.client.ClientSession clientSession, SFunction<T,Object> field, Object fieldValue)
List<T> getByColumn(String field, Object fieldValue)
field - 字段fieldValue - 字段值List<T> getByColumn(com.mongodb.client.ClientSession clientSession, String field, Object fieldValue)
String createIndex(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson bson)
bson - 描述索引键的对象,该对象不能为 nullString createIndex(org.bson.conversions.Bson bson)
bson - 描述索引键的对象,该对象不能为 nullString createIndex(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson bson, com.mongodb.client.model.IndexOptions indexOptions)
clientSession - 要与此操作关联的客户端会话bson - 描述索引键的对象,该对象不能为 nullindexOptions - 指数的选项String createIndex(org.bson.conversions.Bson bson, com.mongodb.client.model.IndexOptions indexOptions)
bson - 描述索引键的对象,该对象不能为 nullindexOptions - 指数的选项List<String> createIndexes(List<com.mongodb.client.model.IndexModel> indexes)
indexes - 索引列表List<String> createIndexes(List<com.mongodb.client.model.IndexModel> indexes, com.mongodb.client.model.CreateIndexOptions createIndexOptions)
indexes - 索引列表createIndexOptions - 创建索引时要使用的选项List<String> createIndexes(com.mongodb.client.ClientSession clientSession, List<com.mongodb.client.model.IndexModel> indexes)
clientSession - 要与此操作关联的客户端会话indexes - 索引列表List<String> createIndexes(com.mongodb.client.ClientSession clientSession, List<com.mongodb.client.model.IndexModel> indexes, com.mongodb.client.model.CreateIndexOptions createIndexOptions)
clientSession - 要与此操作关联的客户端会话indexes - 索引列表createIndexOptions - 创建索引时要使用的选项List<org.bson.Document> listIndexes()
List<org.bson.Document> listIndexes(com.mongodb.client.ClientSession clientSession)
clientSession - 要与此操作关联的客户端会话void dropIndex(String indexName)
indexName - 要删除的索引的名称void dropIndex(String indexName, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
indexName - 要删除的索引的名称dropIndexOptions - 删除索引时要使用的选项void dropIndex(org.bson.conversions.Bson keys)
keys - 要删除的索引的键void dropIndex(org.bson.conversions.Bson keys,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
keys - 要删除的索引的键dropIndexOptions - 删除索引时要使用的选项void dropIndex(com.mongodb.client.ClientSession clientSession,
String indexName)
clientSession - 要与此操作关联的客户端会话indexName - 要删除的索引的名称void dropIndex(com.mongodb.client.ClientSession clientSession,
org.bson.conversions.Bson keys)
clientSession - 要与此操作关联的客户端会话keys - 要删除的索引的键void dropIndex(com.mongodb.client.ClientSession clientSession,
String indexName,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
clientSession - 要与此操作关联的客户端会话indexName - 要删除的索引的名称dropIndexOptions - 删除索引时要使用的选项void dropIndex(com.mongodb.client.ClientSession clientSession,
org.bson.conversions.Bson keys,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
clientSession - 要与此操作关联的客户端会话keys - 要删除的索引的键dropIndexOptions - 删除索引时要使用的选项void dropIndexes()
void dropIndexes(com.mongodb.client.ClientSession clientSession)
clientSession - 要与此操作关联的客户端会话void dropIndexes(com.mongodb.client.model.DropIndexOptions dropIndexOptions)
dropIndexOptions - 删除索引时要使用的选项void dropIndexes(com.mongodb.client.ClientSession clientSession,
com.mongodb.client.model.DropIndexOptions dropIndexOptions)
clientSession - 要与此操作关联的客户端会话dropIndexOptions - 删除索引时要使用的选项SqlExecute getSqlOperation()
LambdaQueryChainWrapper<T> lambdaQuery()
LambdaAggregateChainWrapper<T> lambdaAggregate()
LambdaUpdateChainWrapper<T> lambdaUpdate()
Copyright © 2023. All rights reserved.