code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Override
public <S extends T> S save(S entity) {
Assert.notNull(entity, "Cannot save 'null' entity.");
return executeAndRefresh(operations -> operations.save(entity, getIndexCoordinates()));
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | save | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> S save(S entity, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entity, "entity must not be null");
return executeAndRefresh(operations -> operations.save(entity, getIndexCoordinates()), refreshPolicy);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | save | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
public <S extends T> List<S> save(List<S> entities) {
Assert.notNull(entities, "Cannot insert 'null' as a List.");
return Streamable.of(saveAll(entities)).stream().collect(Collectors.toList());
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | save | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
public <S extends T> List<S> save(List<S> entities, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entities, "Cannot insert 'null' as a List.");
return Streamable.of(saveAll(entities, refreshPolicy)).stream().collect(Collectors.toList());
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | save | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Iterable<S> saveAll(Iterable<S> entities) {
Assert.notNull(entities, "Cannot insert 'null' as a List.");
IndexCoordinates indexCoordinates = getIndexCoordinates();
executeAndRefresh(operations -> operations.save(entities, indexCoordinates));
return entities;
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | saveAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Iterable<S> saveAll(Iterable<S> entities, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entities, "Cannot insert 'null' as a List.");
IndexCoordinates indexCoordinates = getIndexCoordinates();
executeAndRefresh(operations -> operations.save(entities, indexCoordinates), r... | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | saveAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public boolean existsById(ID id) {
// noinspection ConstantConditions
return execute(operations -> operations.exists(stringIdRepresentation(id), getIndexCoordinates()));
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | existsById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@SuppressWarnings("unchecked")
@Override
public Page<T> searchSimilar(T entity, @Nullable String[] fields, Pageable pageable) {
Assert.notNull(entity, "Cannot search similar records for 'null'.");
Assert.notNull(pageable, "'pageable' cannot be 'null'");
MoreLikeThisQuery query = new MoreLikeThisQuery();
que... | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | searchSimilar | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteById(ID id) {
Assert.notNull(id, "Cannot delete entity with id 'null'.");
doDelete(id, null, getIndexCoordinates());
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteById(ID id, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(id, "Cannot delete entity with id 'null'.");
doDelete(id, null, getIndexCoordinates(), refreshPolicy);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void delete(T entity) {
Assert.notNull(entity, "Cannot delete 'null' entity.");
doDelete(extractIdFromBean(entity), operations.getEntityRouting(entity), getIndexCoordinates());
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | delete | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void delete(T entity, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entity, "Cannot delete 'null' entity.");
doDelete(extractIdFromBean(entity), operations.getEntityRouting(entity), getIndexCoordinates(), refreshPolicy);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | delete | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteAllById(Iterable<? extends ID> ids) {
// noinspection DuplicatedCode
Assert.notNull(ids, "Cannot delete 'null' list.");
List<String> idStrings = new ArrayList<>();
for (ID id : ids) {
idStrings.add(stringIdRepresentation(id));
}
if (idStrings.isEmpty()) {
return;
}
... | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteAllById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteAllById(Iterable<? extends ID> ids, @Nullable RefreshPolicy refreshPolicy) {
// noinspection DuplicatedCode
Assert.notNull(ids, "Cannot delete 'null' list.");
List<String> idStrings = new ArrayList<>();
for (ID id : ids) {
idStrings.add(stringIdRepresentation(id));
}
if (i... | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteAllById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteAll(Iterable<? extends T> entities) {
deleteAllById(getEntityIds(entities));
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteAll(Iterable<? extends T> entities, @Nullable RefreshPolicy refreshPolicy) {
deleteAllById(getEntityIds(entities), refreshPolicy);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@NotNull
private List<ID> getEntityIds(Iterable<? extends T> entities) {
Assert.notNull(entities, "Cannot delete 'null' list.");
List<ID> ids = new ArrayList<>();
for (T entity : entities) {
ID id = extractIdFromBean(entity);
if (id != null) {
ids.add(id);
}
}
return ids;
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | getEntityIds | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
private void doDelete(@Nullable ID id, @Nullable String routing, IndexCoordinates indexCoordinates) {
if (id != null) {
executeAndRefresh(operations -> {
var ops = routing != null ? operations.withRouting(RoutingResolver.just(routing)) : operations;
return ops.delete(stringIdRepresentation(id), indexCoord... | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | doDelete | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
private void doDelete(@Nullable ID id, @Nullable String routing, IndexCoordinates indexCoordinates,
@Nullable RefreshPolicy refreshPolicy) {
if (id != null) {
executeAndRefresh(operations -> {
var ops = routing != null ? operations.withRouting(RoutingResolver.just(routing)) : operations;
return ops.del... | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | doDelete | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteAll() {
executeAndRefresh((OperationsCallback<Void>) operations -> {
operations.delete(DeleteQuery.builder(Query.findAll()).build(), entityClass, getIndexCoordinates());
return null;
});
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Override
public void deleteAll(@Nullable RefreshPolicy refreshPolicy) {
executeAndRefresh((OperationsCallback<Void>) operations -> {
operations.delete(DeleteQuery.builder(Query.findAll()).build(), entityClass, getIndexCoordinates());
return null;
}, refreshPolicy);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
private void doRefresh() {
RefreshPolicy refreshPolicy = null;
if (operations instanceof AbstractElasticsearchTemplate template) {
refreshPolicy = template.getRefreshPolicy();
}
if (refreshPolicy == null) {
indexOperations.refresh();
}
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | doRefresh | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Nullable
protected ID extractIdFromBean(T entity) {
return entityInformation.getId(entity);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | extractIdFromBean | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
private List<String> stringIdsRepresentation(Iterable<? extends ID> ids) {
Assert.notNull(ids, "ids can't be null.");
return StreamUtils.createStreamFromIterator(ids.iterator()).map(this::stringIdRepresentation)
.collect(Collectors.toList());
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | stringIdsRepresentation | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
protected @Nullable String stringIdRepresentation(@Nullable ID id) {
return operations.convertId(id);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | stringIdRepresentation | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
private IndexCoordinates getIndexCoordinates() {
return operations.getIndexCoordinatesFor(entityClass);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | getIndexCoordinates | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
private Query getIdQuery(List<String> stringIds) {
return operations.idsQuery(stringIds);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | getIdQuery | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Nullable
public <R> R execute(OperationsCallback<R> callback) {
return callback.doWithOperations(operations);
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | execute | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Nullable
public <R> R executeAndRefresh(OperationsCallback<R> callback) {
R result = callback.doWithOperations(operations);
doRefresh();
return result;
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | executeAndRefresh | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
@Nullable
public <R> R executeAndRefresh(OperationsCallback<R> callback, @Nullable RefreshPolicy refreshPolicy) {
return callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
} | Elasticsearch specific repository implementation. Likely to be used as target within
{@link ElasticsearchRepositoryFactory}
@author Rizwan Idrees
@author Mohsin Husen
@author Ryan Henszey
@author Kevin Leturc
@author Mark Paluch
@author Christoph Strobl
@author Michael Wirth
@author Sascha Woo
@author Murali Chevuri
@... | executeAndRefresh | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java | Apache-2.0 |
public void createIndexAndMappingIfNeeded() {
var blockingIndexOperations = blocking(indexOperations);
if (shouldCreateIndexAndMapping()) {
if (!blockingIndexOperations.exists()) {
blockingIndexOperations.createWithMapping();
}
} else if (shouldAlwaysWriteMapping()) {
blockingIndexOperations.putMap... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | createIndexAndMappingIfNeeded | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
private boolean shouldCreateIndexAndMapping() {
final ElasticsearchPersistentEntity<?> entity = operations.getElasticsearchConverter().getMappingContext()
.getRequiredPersistentEntity(entityInformation.getJavaType());
return entity.isCreateIndexAndMapping();
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | shouldCreateIndexAndMapping | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
private boolean shouldAlwaysWriteMapping() {
return operations.getElasticsearchConverter().getMappingContext()
.getRequiredPersistentEntity(entityInformation.getJavaType()).isAlwaysWriteMapping();
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | shouldAlwaysWriteMapping | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Mono<S> save(S entity) {
Assert.notNull(entity, "Entity must not be null!");
return operations.save(entity, entityInformation.getIndexCoordinates())
.flatMap(saved -> doRefresh().thenReturn(saved));
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | save | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Mono<S> save(S entity, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entity, "Entity must not be null!");
return operations.withRefreshPolicy(refreshPolicy).save(entity, entityInformation.getIndexCoordinates())
.flatMap(saved -> doRefresh().thenReturn(saved));
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | save | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Flux<S> saveAll(Iterable<S> entities) {
Assert.notNull(entities, "Entities must not be null!");
return saveAll(Flux.fromIterable(entities));
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | saveAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Flux<S> saveAll(Iterable<S> entities, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entities, "Entities must not be null!");
return saveAll(Flux.fromIterable(entities), refreshPolicy);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | saveAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Flux<S> saveAll(Publisher<S> entityStream) {
Assert.notNull(entityStream, "EntityStream must not be null!");
return operations.save(Flux.from(entityStream), entityInformation.getIndexCoordinates())
.concatWith(doRefresh().then(Mono.empty()));
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | saveAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public <S extends T> Flux<S> saveAll(Publisher<S> entityStream, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entityStream, "EntityStream must not be null!");
return operations.withRefreshPolicy(refreshPolicy)
.save(Flux.from(entityStream), entityInformation.getIndexCoordinates())
.co... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | saveAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<T> findById(ID id) {
Assert.notNull(id, "Id must not be null!");
return operations.get(convertId(id), entityInformation.getJavaType(), entityInformation.getIndexCoordinates());
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | findById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<T> findById(Publisher<ID> id) {
Assert.notNull(id, "Id must not be null!");
return Mono.from(id).flatMap(this::findById);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | findById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Boolean> existsById(ID id) {
Assert.notNull(id, "Id must not be null!");
return operations.exists(convertId(id), entityInformation.getIndexCoordinates());
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | existsById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Boolean> existsById(Publisher<ID> id) {
Assert.notNull(id, "Id must not be null!");
return Mono.from(id).flatMap(this::existsById);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | existsById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Flux<T> findAll() {
return operations.search(Query.findAll().setPageable(Pageable.unpaged()), entityInformation.getJavaType(),
entityInformation.getIndexCoordinates()).map(SearchHit::getContent);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | findAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Flux<T> findAll(Sort sort) {
return operations.search(Query.findAll().addSort(sort).setPageable(Pageable.unpaged()),
entityInformation.getJavaType(), entityInformation.getIndexCoordinates()).map(SearchHit::getContent);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | findAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Flux<T> findAllById(Iterable<ID> ids) {
Assert.notNull(ids, "Ids must not be null!");
return findAllById(Flux.fromIterable(ids));
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | findAllById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Flux<T> findAllById(Publisher<ID> idStream) {
Assert.notNull(idStream, "IdStream must not be null!");
return Flux.from(idStream) //
.map(this::convertId) //
.collectList() //
.map(ids -> {
var query = new BaseQuery();
query.setIds(ids);
return query;
}) //
.flat... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | findAllById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Long> count() {
return operations.count(Query.findAll(), entityInformation.getJavaType(), entityInformation.getIndexCoordinates());
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | count | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteById(ID id) {
Assert.notNull(id, "Id must not be null!");
return operations.delete(convertId(id), entityInformation.getIndexCoordinates()) //
.then(doRefresh());
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteById(ID id, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(id, "Id must not be null!");
return operations.withRefreshPolicy(refreshPolicy).delete(convertId(id), entityInformation.getIndexCoordinates()) //
.then(doRefresh());
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteById(Publisher<ID> id) {
Assert.notNull(id, "Id must not be null!");
return Mono.from(id).flatMap(this::deleteById);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteById(Publisher<ID> id, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(id, "Id must not be null!");
return Mono.from(id).flatMap(id2 -> deleteById(id, refreshPolicy));
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> delete(T entity) {
Assert.notNull(entity, "Entity must not be null!");
var routing = operations.getEntityRouting(entity);
var ops = routing != null ? operations.withRouting(RoutingResolver.just(routing)) : operations;
return ops.delete(entity, entityInformation.getIndexCoordinates... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | delete | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> delete(T entity, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entity, "Entity must not be null!");
var routing = operations.getEntityRouting(entity);
var ops = routing != null ? operations.withRouting(RoutingResolver.just(routing)) : operations;
return ops.withRefreshPo... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | delete | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAllById(Iterable<? extends ID> ids) {
Assert.notNull(ids, "Ids must not be null!");
return Flux.fromIterable(ids) //
.map(this::convertId) //
.collectList() //
.map(operations::idsQuery) //
.flatMap(
query -> operations.delete(DeleteQuery.builder(query).bui... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAllById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAllById(Iterable<? extends ID> ids, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(ids, "Ids must not be null!");
var operationsWithRefreshPolicy = operations.withRefreshPolicy(refreshPolicy);
return Flux.fromIterable(ids) //
.map(this::convertId) //
.collectL... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAllById | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAll(Iterable<? extends T> entities) {
Assert.notNull(entities, "Entities must not be null!");
return deleteAll(Flux.fromIterable(entities));
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAll(Iterable<? extends T> entities, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entities, "Entities must not be null!");
return deleteAll(Flux.fromIterable(entities), refreshPolicy);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAll(Publisher<? extends T> entityStream) {
Assert.notNull(entityStream, "EntityStream must not be null!");
return Flux.from(entityStream) //
.map(entityInformation::getRequiredId) //
.map(this::convertId) //
.collectList() //
.map(operations::idsQuery)
.flatM... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAll(Publisher<? extends T> entityStream, @Nullable RefreshPolicy refreshPolicy) {
Assert.notNull(entityStream, "EntityStream must not be null!");
var operationsWithRefreshPolicy = operations.withRefreshPolicy(refreshPolicy);
return Flux.from(entityStream) //
.map(entityInf... | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAll() {
return operations
.delete(DeleteQuery.builder(Query.findAll()).build(), entityInformation.getJavaType(),
entityInformation.getIndexCoordinates()) //
.then(doRefresh());
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
@Override
public Mono<Void> deleteAll(@Nullable RefreshPolicy refreshPolicy) {
return operations.withRefreshPolicy(refreshPolicy)
.delete(DeleteQuery.builder(Query.findAll()).build(), entityInformation.getJavaType(),
entityInformation.getIndexCoordinates()) //
.then(doRefresh());
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | deleteAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
private String convertId(Object id) {
return operations.getElasticsearchConverter().convertId(id);
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | convertId | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
private Mono<Void> doRefresh() {
RefreshPolicy refreshPolicy = null;
if (operations instanceof AbstractReactiveElasticsearchTemplate template) {
refreshPolicy = template.getRefreshPolicy();
}
if (refreshPolicy == null) {
return indexOperations.refresh();
}
return Mono.empty();
} | @author Christoph Strobl
@author Peter-Josef Meisch
@author Aleksei Arsenev
@author Jens Schauder
@since 3.2 | doRefresh | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java | Apache-2.0 |
<S> Criteria criteria(Example<S> example) {
return buildCriteria(example);
} | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | criteria | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
private <S> Criteria buildCriteria(Example<S> example) {
final ExampleMatcherAccessor matcherAccessor = new ExampleMatcherAccessor(example.getMatcher());
return applyPropertySpecs(new Criteria(), "", example.getProbe(),
mappingContext.getRequiredPersistentEntity(example.getProbeType()), matcherAccessor,
ex... | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | buildCriteria | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
private Criteria applyPropertySpecs(Criteria criteria, String path, @Nullable Object probe,
ElasticsearchPersistentEntity<?> persistentEntity, ExampleMatcherAccessor exampleSpecAccessor,
ExampleMatcher.MatchMode matchMode) {
if (probe == null) {
return criteria;
}
PersistentPropertyAccessor<?> property... | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | applyPropertySpecs | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
private Criteria applyPropertySpec(String path, Object propertyValue, ExampleMatcherAccessor exampleSpecAccessor,
ElasticsearchPersistentProperty property, ExampleMatcher.MatchMode matchMode, Criteria criteria) {
if (exampleSpecAccessor.isIgnoreCaseForPath(path)) {
throw new InvalidDataAccessApiUsageException(... | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | applyPropertySpec | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
private Criteria tryToAppendMustNotSentence(Criteria criteria, String path,
ExampleMatcherAccessor exampleSpecAccessor) {
if (ExampleMatcher.NullHandler.INCLUDE.equals(exampleSpecAccessor.getNullHandler())
|| exampleSpecAccessor.hasPropertySpecifier(path)) {
return criteria.and(path).not().exists();
}
r... | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | tryToAppendMustNotSentence | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
private Criteria applyMatchMode(Criteria criteria, String path, ExampleMatcher.MatchMode matchMode) {
if (matchMode == ExampleMatcher.MatchMode.ALL) {
return criteria.and(path);
} else {
return criteria.or(path);
}
} | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | applyMatchMode | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
private Criteria applyStringMatcher(Criteria criteria, Object value, ExampleMatcher.StringMatcher stringMatcher) {
return switch (stringMatcher) {
case DEFAULT -> criteria.is(value);
case EXACT -> criteria.matchesAll(value);
case STARTING -> criteria.startsWith(validateString(value));
case ENDING -> crite... | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | applyStringMatcher | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
private String validateString(Object value) {
if (value instanceof String) {
return value.toString();
}
throw new IllegalArgumentException("This operation requires a String but got " + value.getClass());
} | Builds a {@link ExampleCriteriaMapper}
@param mappingContext mappingContext to use | validateString | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java | Apache-2.0 |
public String evaluate() {
Expression expr = getQueryExpression(queryString);
if (expr != null) {
EvaluationContext context = evaluationContextProvider.getEvaluationContext(parameterAccessor.getValues())
.getRequiredEvaluationContext();
if (context instanceof StandardEvaluationContext standardEvaluatio... | Evaluate the SpEL parts of the query string.
@return a plain string with values evaluated | evaluate | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java | Apache-2.0 |
private String parseExpressions(Expression rootExpr, EvaluationContext context) {
StringBuilder parsed = new StringBuilder();
if (rootExpr instanceof LiteralExpression literalExpression) {
// get the string literal directly
parsed.append(literalExpression.getExpressionString());
} else if (rootExpr instanc... | {@link Expression#getValue(EvaluationContext, Class)} is not used because the value part in SpEL should be
converted by {@link ElasticsearchStringValueToStringConverter} or
{@link ElasticsearchCollectionValueToStringConverter} to escape the quotations, but other literal parts in SpEL
expression should not be processed ... | parseExpressions | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java | Apache-2.0 |
@Nullable
private Expression getQueryExpression(String queryString) {
return QUERY_EXPRESSIONS.computeIfAbsent(queryString, f -> {
Expression expr = PARSER.parseExpression(queryString, ParserContext.TEMPLATE_EXPRESSION);
return expr instanceof LiteralExpression ? null : expr;
});
} | {@link Expression#getValue(EvaluationContext, Class)} is not used because the value part in SpEL should be
converted by {@link ElasticsearchStringValueToStringConverter} or
{@link ElasticsearchCollectionValueToStringConverter} to escape the quotations, but other literal parts in SpEL
expression should not be processed ... | getQueryExpression | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java | Apache-2.0 |
@Override
public Set<ConvertiblePair> getConvertibleTypes() {
return Collections.singleton(new ConvertiblePair(Collection.class, String.class));
} | Convert a collection into string for value part of the elasticsearch query.
<p>
If the value is type {@link String}, it should be wrapped with square brackets, with each element quoted therefore
escaped(by {@link ElasticsearchStringValueToStringConverter}) if quotations exist in the original element.
<p>
eg: The value ... | getConvertibleTypes | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchCollectionValueToStringConverter.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchCollectionValueToStringConverter.java | Apache-2.0 |
@Override
@Nullable
public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source == null) {
return "[]";
}
Collection<?> sourceCollection = (Collection<?>) source;
if (sourceCollection.isEmpty()) {
return "[]";
}
StringJoiner sb = new StringJoi... | Convert a collection into string for value part of the elasticsearch query.
<p>
If the value is type {@link String}, it should be wrapped with square brackets, with each element quoted therefore
escaped(by {@link ElasticsearchStringValueToStringConverter}) if quotations exist in the original element.
<p>
eg: The value ... | convert | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchCollectionValueToStringConverter.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchCollectionValueToStringConverter.java | Apache-2.0 |
public static ElasticsearchQueryValueConversionService getInstance(ConversionService conversionService) {
return CACHE.computeIfAbsent(conversionService, ElasticsearchQueryValueConversionService::new);
} | Get a {@link ElasticsearchQueryValueConversionService} with this conversion service as delegated.
@param conversionService conversion service as delegated
@return a conversion service having the capability to convert query values in elasticsearch query | getInstance | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | Apache-2.0 |
@Override
public boolean canConvert(@Nullable Class<?> sourceType, Class<?> targetType) {
Assert.notNull(targetType, "Target type to convert to cannot be null");
return canConvert(TypeDescriptor.valueOf(sourceType), TypeDescriptor.valueOf(targetType));
} | Get a {@link ElasticsearchQueryValueConversionService} with this conversion service as delegated.
@param conversionService conversion service as delegated
@return a conversion service having the capability to convert query values in elasticsearch query | canConvert | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | Apache-2.0 |
@Override
public boolean canConvert(@Nullable TypeDescriptor sourceType, TypeDescriptor targetType) {
return valueConversionService.canConvert(sourceType, targetType)
|| delegate.canConvert(sourceType, targetType);
} | Get a {@link ElasticsearchQueryValueConversionService} with this conversion service as delegated.
@param conversionService conversion service as delegated
@return a conversion service having the capability to convert query values in elasticsearch query | canConvert | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | Apache-2.0 |
@SuppressWarnings("unchecked")
@Override
@Nullable
public <T> T convert(@Nullable Object source, Class<T> targetType) {
Assert.notNull(targetType, "Target type to convert to cannot be null");
return (T) convert(source, TypeDescriptor.forObject(source), TypeDescriptor.valueOf(targetType));
} | Get a {@link ElasticsearchQueryValueConversionService} with this conversion service as delegated.
@param conversionService conversion service as delegated
@return a conversion service having the capability to convert query values in elasticsearch query | convert | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | Apache-2.0 |
@Override
@Nullable
public Object convert(@Nullable Object source, @Nullable TypeDescriptor sourceType, TypeDescriptor targetType) {
if (valueConversionService.canConvert(sourceType, targetType)) {
return valueConversionService.convert(source, sourceType, targetType);
} else {
return delegate.convert(sourc... | Get a {@link ElasticsearchQueryValueConversionService} with this conversion service as delegated.
@param conversionService conversion service as delegated
@return a conversion service having the capability to convert query values in elasticsearch query | convert | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java | Apache-2.0 |
@Override
public Set<ConvertiblePair> getConvertibleTypes() {
return Collections.singleton(new ConvertiblePair(String.class, String.class));
} | Values in elasticsearch query may contain quotations and should be escaped when converting. Note that the converter
should only be used in this situation, rather than common string to string conversions.
@since 5.3
@author Haibo Liu | getConvertibleTypes | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java | Apache-2.0 |
@Override
@Nullable
public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
return source != null ? escape(source) : null;
} | Values in elasticsearch query may contain quotations and should be escaped when converting. Note that the converter
should only be used in this situation, rather than common string to string conversions.
@since 5.3
@author Haibo Liu | convert | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java | Apache-2.0 |
private String escape(@Nullable Object source) {
// escape the quotes in the string, because the string should already be quoted manually
return String.valueOf(source).replaceAll("\"", Matcher.quoteReplacement("\\\""));
} | Values in elasticsearch query may contain quotations and should be escaped when converting. Note that the converter
should only be used in this situation, rather than common string to string conversions.
@since 5.3
@author Haibo Liu | escape | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java | Apache-2.0 |
@Nullable
public Object path(String path) {
Assert.notNull(path, "path must not be null");
Map<String, Object> current = this;
String[] segments = path.split("\\.");
for (int i = 0; i < segments.length; i++) {
String segment = segments[i];
if (current.containsKey(segment)) {
Object currentObject ... | Gets the object at the given key path (dot separated) or null if no object exists with this path.
@param path the key path, must not be {@literal null}
@return the found object or null | path | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMap.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMap.java | Apache-2.0 |
public static boolean isCausedByConnectionException(Throwable throwable) {
Throwable t = throwable;
do {
if (t instanceof ConnectException) {
return true;
}
t = t.getCause();
} while (t != null);
return false;
} | checks if the given throwable is a {@link ConnectException} or has one in its cause chain
@param throwable the throwable to check
@return true if throwable is caused by a {@link ConnectException} | isCausedByConnectionException | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/ExceptionUtils.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/ExceptionUtils.java | Apache-2.0 |
@Override
@Nullable
public String getFirst(String key) {
return delegate.getFirst(key);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | getFirst | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public void add(String key, @Nullable String value) {
delegate.add(key, value);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | add | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public void addAll(String key, List<? extends String> values) {
delegate.addAll(key, values);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | addAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public void addAll(MultiValueMap<String, String> values) {
delegate.addAll(values);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | addAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public void set(String key, @Nullable String value) {
delegate.set(key, value);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | set | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public void setAll(Map<String, String> values) {
delegate.setAll(values);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | setAll | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public Map<String, String> toSingleValueMap() {
return delegate.toSingleValueMap();
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | toSingleValueMap | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public int size() {
return delegate.size();
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | size | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public boolean isEmpty() {
return delegate.isEmpty();
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | isEmpty | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public boolean containsKey(Object key) {
return delegate.containsKey(key);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | containsKey | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
public boolean containsValue(Object value) {
return delegate.containsValue(value);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | containsValue | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Override
@Nullable
public List<String> get(Object key) {
return delegate.get(key);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | get | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
@Nullable
@Override
public List<String> put(String key, List<String> value) {
return delegate.put(key, value);
} | A simple class implementing HTTP headers as a MultiValueMap. This own implementation is necessary to remove the
dependency to the class with the same name from org.springframework:spring-web. Under the hood is uses a
{@link LinkedCaseInsensitiveMap}.
@author Peter-Josef Meisch
@since 5.0 | put | java | spring-projects/spring-data-elasticsearch | src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.