public class BaseEsMapperImpl<T> extends Object implements BaseEsMapper<T>
Copyright © 2021 xpc1024 All Rights Reserved
| 构造器和说明 |
|---|
BaseEsMapperImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
Boolean |
createIndex()
创建索引,根据当前mapper对应实体类信息及其注解配置生成索引信息
|
Boolean |
createIndex(LambdaEsIndexWrapper<T> wrapper)
创建索引
|
Integer |
delete(LambdaEsQueryWrapper<T> wrapper)
根据 entity 条件,删除记录
|
Integer |
deleteBatchIds(Collection<? extends Serializable> idList)
删除(根据ID 批量删除)
|
Integer |
deleteBatchIds(Collection<? extends Serializable> idList,
String indexName)
删除(根据ID 批量删除)
|
Integer |
deleteById(Serializable id)
根据 ID 删除
|
Integer |
deleteById(Serializable id,
String indexName)
根据 ID 删除
|
Boolean |
deleteIndex(String indexName)
删除指定索引
|
Boolean |
existsIndex(String indexName)
是否存在索引
|
org.elasticsearch.client.indices.GetIndexResponse |
getIndex()
获取当前索引信息
|
org.elasticsearch.client.indices.GetIndexResponse |
getIndex(String indexName)
获取指定索引信息
|
org.elasticsearch.search.builder.SearchSourceBuilder |
getSearchSourceBuilder(LambdaEsQueryWrapper<T> wrapper)
获取SearchSourceBuilder,可用于本框架生成基础查询条件,不支持的高阶语法用户可通过SearchSourceBuilder 进一步封装
|
String |
getSource(LambdaEsQueryWrapper<T> wrapper)
获取通过本框架生成的查询参数,可用于检验本框架生成的查询参数是否正确
|
Integer |
insert(T entity)
插入一条记录
|
Integer |
insert(T entity,
String indexName)
插入一条记录,可指定索引插入
|
Integer |
insertBatch(Collection<T> entityList)
批量插入
|
Integer |
insertBatch(Collection<T> entityList,
String indexName)
批量插入
|
PageInfo<T> |
pageQuery(LambdaEsQueryWrapper<T> wrapper,
Integer pageNum,
Integer pageSize)
指定返回类型及分页参数
|
org.elasticsearch.action.search.SearchResponse |
scroll(org.elasticsearch.action.search.SearchScrollRequest searchScrollRequest,
org.elasticsearch.client.RequestOptions requestOptions)
es原生滚动查询
|
org.elasticsearch.action.search.SearchResponse |
search(LambdaEsQueryWrapper<T> wrapper)
标准查询
|
org.elasticsearch.action.search.SearchResponse |
search(org.elasticsearch.action.search.SearchRequest searchRequest,
org.elasticsearch.client.RequestOptions requestOptions)
es原生查询
|
SAPageInfo<T> |
searchAfterPage(LambdaEsQueryWrapper<T> wrapper,
List<Object> searchAfter,
Integer pageSize)
searchAfter类型分页
|
List<T> |
selectBatchIds(Collection<? extends Serializable> idList)
查询(根据ID 批量查询)
|
List<T> |
selectBatchIds(Collection<? extends Serializable> idList,
String indexName)
查询(根据ID 批量查询)
|
T |
selectById(Serializable id)
根据 ID 查询
|
T |
selectById(Serializable id,
String indexName)
根据 ID 查询
|
Long |
selectCount(LambdaEsQueryWrapper<T> wrapper,
boolean distinct)
是否去重获取总数
|
List<T> |
selectList(LambdaEsQueryWrapper<T> wrapper)
根据 entity 条件,查询全部记录
|
T |
selectOne(LambdaEsQueryWrapper<T> wrapper)
根据 entity 条件,查询一条记录
|
Boolean |
setCurrentActiveIndex(String indexName)
设置当前Mapper默认激活的全局索引名称 务必谨慎操作,设置后全局生效,永驻jvm,除非项目重启
|
Integer |
update(T entity,
LambdaEsUpdateWrapper<T> updateWrapper)
根据 whereEntity 条件,更新记录
|
Integer |
updateBatchByIds(Collection<T> entityList)
根据ID 批量更新
|
Integer |
updateBatchByIds(Collection<T> entityList,
String indexName)
根据ID 批量更新
|
Integer |
updateById(T entity)
根据 ID 更新
|
Integer |
updateById(T entity,
String indexName)
根据 ID 更新
|
Boolean |
updateIndex(LambdaEsIndexWrapper<T> wrapper)
更新索引
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitselectCountpublic Boolean existsIndex(String indexName)
BaseEsMapperexistsIndex 在接口中 BaseEsMapper<T>indexName - 索引名称public org.elasticsearch.client.indices.GetIndexResponse getIndex()
BaseEsMappergetIndex 在接口中 BaseEsMapper<T>public org.elasticsearch.client.indices.GetIndexResponse getIndex(String indexName)
BaseEsMappergetIndex 在接口中 BaseEsMapper<T>indexName - 指定索引名public Boolean createIndex()
BaseEsMappercreateIndex 在接口中 BaseEsMapper<T>public Boolean createIndex(LambdaEsIndexWrapper<T> wrapper)
BaseEsMappercreateIndex 在接口中 BaseEsMapper<T>wrapper - 条件public Boolean updateIndex(LambdaEsIndexWrapper<T> wrapper)
BaseEsMapperupdateIndex 在接口中 BaseEsMapper<T>wrapper - 条件public Boolean deleteIndex(String indexName)
BaseEsMapperdeleteIndex 在接口中 BaseEsMapper<T>indexName - 索引名称public org.elasticsearch.action.search.SearchResponse search(LambdaEsQueryWrapper<T> wrapper)
BaseEsMappersearch 在接口中 BaseEsMapper<T>wrapper - 条件public org.elasticsearch.action.search.SearchResponse search(org.elasticsearch.action.search.SearchRequest searchRequest,
org.elasticsearch.client.RequestOptions requestOptions)
throws IOException
BaseEsMappersearch 在接口中 BaseEsMapper<T>searchRequest - 查询请求参数requestOptions - 类型IOException - IO异常public org.elasticsearch.action.search.SearchResponse scroll(org.elasticsearch.action.search.SearchScrollRequest searchScrollRequest,
org.elasticsearch.client.RequestOptions requestOptions)
throws IOException
BaseEsMapperscroll 在接口中 BaseEsMapper<T>searchScrollRequest - 查询请求参数requestOptions - 类型IOException - IO异常public org.elasticsearch.search.builder.SearchSourceBuilder getSearchSourceBuilder(LambdaEsQueryWrapper<T> wrapper)
BaseEsMappergetSearchSourceBuilder 在接口中 BaseEsMapper<T>wrapper - 条件public String getSource(LambdaEsQueryWrapper<T> wrapper)
BaseEsMappergetSource 在接口中 BaseEsMapper<T>wrapper - 条件public PageInfo<T> pageQuery(LambdaEsQueryWrapper<T> wrapper, Integer pageNum, Integer pageSize)
BaseEsMapperpageQuery 在接口中 BaseEsMapper<T>wrapper - 条件pageNum - 当前页pageSize - 每页条数public SAPageInfo<T> searchAfterPage(LambdaEsQueryWrapper<T> wrapper, List<Object> searchAfter, Integer pageSize)
BaseEsMappersearchAfterPage 在接口中 BaseEsMapper<T>wrapper - 条件searchAfter - 当前页 第一页时为nullpageSize - 每页条数public Long selectCount(LambdaEsQueryWrapper<T> wrapper, boolean distinct)
BaseEsMapperselectCount 在接口中 BaseEsMapper<T>wrapper - 条件distinct - 是否去重public Integer insert(T entity)
BaseEsMapperinsert 在接口中 BaseEsMapper<T>entity - 插入的数据对象public Integer insert(T entity, String indexName)
BaseEsMapperinsert 在接口中 BaseEsMapper<T>entity - 插入的数据对象indexName - 指定插入的索引名public Integer insertBatch(Collection<T> entityList)
BaseEsMapperinsertBatch 在接口中 BaseEsMapper<T>entityList - 插入的数据对象列表public Integer insertBatch(Collection<T> entityList, String indexName)
BaseEsMapperinsertBatch 在接口中 BaseEsMapper<T>entityList - 插入的数据对象列表indexName - 指定插入的索引名public Integer deleteById(Serializable id)
BaseEsMapperdeleteById 在接口中 BaseEsMapper<T>id - 主键public Integer deleteById(Serializable id, String indexName)
BaseEsMapperdeleteById 在接口中 BaseEsMapper<T>id - 主键indexName - 指定删除的索引名public Integer delete(LambdaEsQueryWrapper<T> wrapper)
BaseEsMapperdelete 在接口中 BaseEsMapper<T>wrapper - 条件public Integer deleteBatchIds(Collection<? extends Serializable> idList)
BaseEsMapperdeleteBatchIds 在接口中 BaseEsMapper<T>idList - 主键列表public Integer deleteBatchIds(Collection<? extends Serializable> idList, String indexName)
BaseEsMapperdeleteBatchIds 在接口中 BaseEsMapper<T>idList - 主键列表indexName - 指定删除的索引名public Integer updateById(T entity)
BaseEsMapperupdateById 在接口中 BaseEsMapper<T>entity - 更新对象public Integer updateById(T entity, String indexName)
BaseEsMapperupdateById 在接口中 BaseEsMapper<T>entity - 更新对象indexName - 指定更新的索引名称public Integer updateBatchByIds(Collection<T> entityList)
BaseEsMapperupdateBatchByIds 在接口中 BaseEsMapper<T>entityList - 更新对象列表public Integer updateBatchByIds(Collection<T> entityList, String indexName)
BaseEsMapperupdateBatchByIds 在接口中 BaseEsMapper<T>entityList - 更新对象列表indexName - 指定更新的索引名称public Integer update(T entity, LambdaEsUpdateWrapper<T> updateWrapper)
BaseEsMapperupdate 在接口中 BaseEsMapper<T>entity - 更新对象updateWrapper - 条件public T selectById(Serializable id)
BaseEsMapperselectById 在接口中 BaseEsMapper<T>id - 主键public T selectById(Serializable id, String indexName)
BaseEsMapperselectById 在接口中 BaseEsMapper<T>id - 主键indexName - 指定查询的索引名public List<T> selectBatchIds(Collection<? extends Serializable> idList)
BaseEsMapperselectBatchIds 在接口中 BaseEsMapper<T>idList - 主键列表public List<T> selectBatchIds(Collection<? extends Serializable> idList, String indexName)
BaseEsMapperselectBatchIds 在接口中 BaseEsMapper<T>idList - 主键列表indexName - 指定查询的索引名public T selectOne(LambdaEsQueryWrapper<T> wrapper)
BaseEsMapperselectOne 在接口中 BaseEsMapper<T>wrapper - 条件public List<T> selectList(LambdaEsQueryWrapper<T> wrapper)
BaseEsMapperselectList 在接口中 BaseEsMapper<T>wrapper - 条件public Boolean setCurrentActiveIndex(String indexName)
BaseEsMappersetCurrentActiveIndex 在接口中 BaseEsMapper<T>indexName - 索引名称Copyright © 2022. All rights reserved.