public interface IElasticSearchService<T,ID extends Serializable>
| 限定符和类型 | 方法和说明 |
|---|---|
long |
count(com.lmaye.app.common.query.Query query,
Class<T> clazz)
Returns entities number matching the given
Query.In case no match could be found, an zero |
void |
deleteById(ID id)
Deletes the entity with the given id.
|
List<T> |
findAll(com.lmaye.app.common.query.ListQuery query,
Class<T> clazz)
|
List<T> |
findAll(com.lmaye.app.common.query.Query query,
Class<T> clazz)
Returns all entities matching the given
Query. |
Optional<T> |
findById(ID id)
Retrieves an entity by its id.
|
com.lmaye.app.common.context.PageResult<T> |
findPage(com.lmaye.app.common.query.PageQuery query,
Class<T> clazz)
Returns a
PageResult of entities matching the given PageQuery.In case no match could be found, an empty
PageResult is returned. |
List<T> |
findScrollAll(com.lmaye.app.common.query.ListQuery query,
Class<T> clazz)
|
com.lmaye.app.common.context.PageResult<T> |
findScrollPage(com.lmaye.app.common.query.PageQuery query,
Class<T> clazz)
Returns a
PageResult of entities matching the given PageQuery.In case no match could be found, an empty
PageResult is returned. |
<S extends T> |
insertOrUpdate(S entity)
Saves a given entity.
|
<S extends T> |
saveAll(Iterable<S> entities)
Saves all given entities.
|
<S extends T> S insertOrUpdate(S entity)
entity - must not be null.<S extends T> Iterable<S> saveAll(Iterable<S> entities)
entities - must not be null.IllegalArgumentException - in case the given entity is null.void deleteById(ID id)
id - must not be null.IllegalArgumentException - in case the given id is nullOptional<T> findById(ID id)
id - must not be null.List<T> findAll(com.lmaye.app.common.query.Query query, Class<T> clazz)
Query. In case no match could be found an empty List
is returned.query - must not be null.clazz - TList of entities matching the given Query.List<T> findAll(com.lmaye.app.common.query.ListQuery query, Class<T> clazz)
List of entities matching the given ListQuery.In case no match could be found, an empty
List is returned.query - may be null.clazz - TList of entities matching the given ListQuery.List<T> findScrollAll(com.lmaye.app.common.query.ListQuery query, Class<T> clazz)
List of entities matching the given ListQuery.In case no match could be found, an empty
List is returned.query - may be null.clazz - TList of entities matching the given ListQuery.com.lmaye.app.common.context.PageResult<T> findPage(com.lmaye.app.common.query.PageQuery query, Class<T> clazz)
PageResult of entities matching the given PageQuery.In case no match could be found, an empty
PageResult is returned.query - must not be null.clazz - TPageResult of entities matching the given PageQuery.com.lmaye.app.common.context.PageResult<T> findScrollPage(com.lmaye.app.common.query.PageQuery query, Class<T> clazz)
PageResult of entities matching the given PageQuery.In case no match could be found, an empty
PageResult is returned.query - must not be null.clazz - TPageResult of entities matching the given PageQuery.Copyright © 2020. All rights reserved.