mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-22 20:12:11 +00:00
DATAES-264 - Make available the entity class of the repository so generic code can be written more easily.
This commit is contained in:
parent
392a87ab0a
commit
edfca24527
@ -43,4 +43,6 @@ public interface ElasticsearchRepository<T, ID extends Serializable> extends Ela
|
||||
Page<T> searchSimilar(T entity, String[] fields, Pageable pageable);
|
||||
|
||||
void refresh();
|
||||
|
||||
Class<T> getEntityClass();
|
||||
}
|
||||
|
@ -276,6 +276,7 @@ public abstract class AbstractElasticsearchRepository<T, ID extends Serializable
|
||||
return resolveReturnedClassFromGenericType(clazz.getSuperclass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<T> getEntityClass() {
|
||||
if (!isEntityClassSet()) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user