From f3fb779923262cf20b4b81dcdc3b1bc2fba726b8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 2 Jan 2019 12:36:07 +0100 Subject: [PATCH] DATAES-524 - Update copyright years to 2019. --- src/main/asciidoc/index.adoc | 2 +- .../elasticsearch/ElasticsearchException.java | 2 +- .../annotations/CompletionField.java | 2 +- .../elasticsearch/annotations/DateFormat.java | 2 +- .../elasticsearch/annotations/Document.java | 2 +- .../data/elasticsearch/annotations/Field.java | 2 +- .../elasticsearch/annotations/FieldType.java | 2 +- .../annotations/GeoPointField.java | 2 +- .../elasticsearch/annotations/InnerField.java | 2 +- .../elasticsearch/annotations/Mapping.java | 2 +- .../elasticsearch/annotations/MultiField.java | 2 +- .../elasticsearch/annotations/Parent.java | 2 +- .../data/elasticsearch/annotations/Query.java | 2 +- .../elasticsearch/annotations/Setting.java | 2 +- .../client/ClientConfiguration.java | 2 +- .../client/ClientConfigurationBuilder.java | 2 +- .../elasticsearch/client/ClientLogger.java | 2 +- .../elasticsearch/client/ClusterNodes.java | 2 +- .../client/DefaultClientConfiguration.java | 2 +- .../client/ElasticsearchHost.java | 2 +- .../client/InetSocketAddressParser.java | 2 +- .../client/NoReachableHostException.java | 2 +- .../client/NodeClientFactoryBean.java | 2 +- .../client/RestClientFactoryBean.java | 186 +- .../elasticsearch/client/RestClients.java | 2 +- .../client/TransportClientFactoryBean.java | 302 +-- .../DefaultReactiveElasticsearchClient.java | 2 +- .../reactive/DefaultWebClientProvider.java | 2 +- .../client/reactive/HostProvider.java | 2 +- .../reactive/MultiNodeHostProvider.java | 2 +- .../client/reactive/RawActionResponse.java | 2 +- .../reactive/ReactiveElasticsearchClient.java | 2 +- .../client/reactive/ReactiveRestClients.java | 2 +- .../RequestBodyEncodingException.java | 2 +- .../reactive/SingleNodeHostProvider.java | 2 +- .../client/reactive/WebClientProvider.java | 2 +- .../client/util/RequestConverters.java | 2 +- .../AbstractElasticsearchConfiguration.java | 2 +- ...actReactiveElasticsearchConfiguration.java | 2 +- .../ElasticsearchConfigurationSupport.java | 2 +- .../config/ElasticsearchNamespaceHandler.java | 2 +- .../NodeClientBeanDefinitionParser.java | 2 +- .../RestClientBeanDefinitionParser.java | 94 +- .../TransportClientBeanDefinitionParser.java | 2 +- .../core/AbstractResultMapper.java | 2 +- .../core/CriteriaFilterProcessor.java | 2 +- .../core/CriteriaQueryProcessor.java | 2 +- .../core/DefaultEntityMapper.java | 2 +- .../core/DefaultResultMapper.java | 2 +- .../ElasticsearchExceptionTranslator.java | 2 +- .../core/ElasticsearchOperations.java | 1264 ++++----- .../core/ElasticsearchRestTemplate.java | 2 +- .../core/ElasticsearchTemplate.java | 2 +- .../data/elasticsearch/core/EntityMapper.java | 2 +- .../elasticsearch/core/EntityOperations.java | 2 +- .../data/elasticsearch/core/EsClient.java | 52 +- .../data/elasticsearch/core/FacetedPage.java | 2 +- .../elasticsearch/core/FacetedPageImpl.java | 2 +- .../elasticsearch/core/GetResultMapper.java | 2 +- .../elasticsearch/core/MappingBuilder.java | 2 +- .../core/MultiGetResultMapper.java | 2 +- .../core/ReactiveElasticsearchOperations.java | 2 +- .../core/ReactiveElasticsearchTemplate.java | 2 +- .../elasticsearch/core/ResultsExtractor.java | 2 +- .../elasticsearch/core/ResultsMapper.java | 2 +- .../data/elasticsearch/core/ScoredPage.java | 2 +- .../core/SearchResultMapper.java | 2 +- .../aggregation/impl/AggregatedPageImpl.java | 2 +- .../core/client/support/AliasData.java | 68 +- .../core/convert/DateTimeConverters.java | 2 +- .../core/convert/ElasticsearchConverter.java | 2 +- .../ElasticsearchCustomConversions.java | 2 +- .../MappingElasticsearchConverter.java | 2 +- .../core/facet/AbstractFacetRequest.java | 4 +- .../core/facet/AbstractFacetResult.java | 2 +- .../core/facet/FacetRequest.java | 2 +- .../elasticsearch/core/facet/FacetResult.java | 2 +- .../elasticsearch/core/facet/FacetType.java | 2 +- .../facet/request/HistogramFacetRequest.java | 4 +- .../request/HistogramFacetRequestBuilder.java | 4 +- .../facet/request/NativeFacetRequest.java | 2 +- .../core/facet/request/RangeFacetRequest.java | 2 +- .../request/RangeFacetRequestBuilder.java | 4 +- .../request/StatisticalFacetRequest.java | 4 +- .../StatisticalFacetRequestBuilder.java | 4 +- .../core/facet/request/TermFacetOrder.java | 2 +- .../core/facet/request/TermFacetRequest.java | 2 +- .../request/TermFacetRequestBuilder.java | 4 +- .../core/facet/result/HistogramResult.java | 2 +- .../core/facet/result/IntervalUnit.java | 2 +- .../core/facet/result/Range.java | 2 +- .../core/facet/result/RangeResult.java | 2 +- .../core/facet/result/StatisticalResult.java | 2 +- .../elasticsearch/core/facet/result/Term.java | 2 +- .../core/facet/result/TermResult.java | 2 +- .../data/elasticsearch/core/geo/GeoBox.java | 2 +- .../data/elasticsearch/core/geo/GeoPoint.java | 2 +- .../ElasticsearchPersistentEntity.java | 2 +- .../ElasticsearchPersistentProperty.java | 2 +- .../SimpleElasticsearchMappingContext.java | 2 +- .../SimpleElasticsearchPersistentEntity.java | 2 +- ...SimpleElasticsearchPersistentProperty.java | 2 +- .../core/query/AbstractQuery.java | 2 +- .../core/query/AliasBuilder.java | 2 +- .../elasticsearch/core/query/AliasQuery.java | 2 +- .../elasticsearch/core/query/Criteria.java | 2 +- .../core/query/CriteriaQuery.java | 2 +- .../elasticsearch/core/query/DeleteQuery.java | 2 +- .../core/query/FetchSourceFilter.java | 2 +- .../core/query/FetchSourceFilterBuilder.java | 2 +- .../data/elasticsearch/core/query/Field.java | 2 +- .../elasticsearch/core/query/GetQuery.java | 2 +- .../elasticsearch/core/query/IndexBoost.java | 2 +- .../elasticsearch/core/query/IndexQuery.java | 2 +- .../core/query/IndexQueryBuilder.java | 2 +- .../core/query/MoreLikeThisQuery.java | 2 +- .../core/query/NativeSearchQuery.java | 2 +- .../core/query/NativeSearchQueryBuilder.java | 2 +- .../data/elasticsearch/core/query/Query.java | 2 +- .../elasticsearch/core/query/SearchQuery.java | 2 +- .../elasticsearch/core/query/SimpleField.java | 4 +- .../core/query/SourceFilter.java | 2 +- .../elasticsearch/core/query/StringQuery.java | 2 +- .../elasticsearch/core/query/UpdateQuery.java | 2 +- .../core/query/UpdateQueryBuilder.java | 2 +- .../ElasticsearchCrudRepository.java | 2 +- .../repository/ElasticsearchRepository.java | 2 +- .../cdi/ElasticsearchRepositoryBean.java | 2 +- .../cdi/ElasticsearchRepositoryExtension.java | 2 +- .../ElasticsearchRepositoriesRegistrar.java | 2 +- ...lasticsearchRepositoryConfigExtension.java | 2 +- .../EnableElasticsearchRepositories.java | 2 +- .../AbstractElasticsearchRepositoryQuery.java | 2 +- .../query/ElasticsearchPartQuery.java | 2 +- .../query/ElasticsearchQueryMethod.java | 2 +- .../query/ElasticsearchStringQuery.java | 2 +- .../parser/ElasticsearchQueryCreator.java | 2 +- .../AbstractElasticsearchRepository.java | 2 +- .../ElasticsearchEntityInformation.java | 2 +- ...ElasticsearchEntityInformationCreator.java | 2 +- ...ticsearchEntityInformationCreatorImpl.java | 2 +- .../ElasticsearchRepositoryFactory.java | 2 +- .../ElasticsearchRepositoryFactoryBean.java | 2 +- ...MappingElasticsearchEntityInformation.java | 2 +- .../SimpleElasticsearchRepository.java | 2 +- src/main/resources/notice.txt | 2 +- .../elasticsearch/ElasticsearchVersion.java | 2 +- .../ElasticsearchVersionRule.java | 2 +- .../data/elasticsearch/InnerObjectTests.java | 2 +- .../data/elasticsearch/NestedObjectTests.java | 2 +- .../elasticsearch/NonDocumentEntityTests.java | 2 +- .../data/elasticsearch/SpELEntityTests.java | 2 +- .../data/elasticsearch/TestUtils.java | 2 +- .../data/elasticsearch/Utils.java | 2 +- .../builder/SampleInheritedEntityBuilder.java | 2 +- .../client/ClientConfigurationUnitTests.java | 2 +- .../client/ClusterNodesUnitTests.java | 2 +- .../InetSocketAddressParserUnitTests.java | 2 +- .../DefaultWebClientProviderUnitTests.java | 2 +- .../MultiNodeHostProviderUnitTests.java | 2 +- .../ReactiveElasticsearchClientTests.java | 2 +- .../ReactiveElasticsearchClientUnitTests.java | 2 +- .../ReactiveMockClientTestsUtils.java | 2 +- .../SingleNodeHostProviderUnitTests.java | 2 +- ...icsearchConfigurationSupportUnitTests.java | 2 +- .../ElasticsearchNamespaceHandlerTests.java | 126 +- ...eNestedElasticsearchRepositoriesTests.java | 2 +- .../data/elasticsearch/core/AliasTests.java | 2 +- .../core/CustomEntityMapper.java | 2 +- .../core/CustomResultMapper.java | 2 +- .../core/DefaultEntityMapperTests.java | 2 +- .../core/DefaultResultMapperTests.java | 2 +- .../core/ElasticsearchRestTemplateTests.java | 2 +- ...lasticsearchTemplateCustomMapperTests.java | 2 +- ...ElasticsearchTemplateParentChildTests.java | 2 +- .../core/ElasticsearchTemplateTests.java | 2 +- .../elasticsearch/core/LogEntityTests.java | 2 +- .../core/MappingBuilderTests.java | 2 +- .../ReactiveElasticsearchTemplateTests.java | 2 +- ...eactiveElasticsearchTemplateUnitTests.java | 2 +- .../SimpleElasticsearchDateMappingTests.java | 2 +- .../aggregation/AggregatedPageImplTest.java | 2 +- ...ElasticsearchTemplateAggregationTests.java | 2 +- .../AnnotatedCompletionEntityBuilder.java | 2 +- .../CompletionEntityAnnotatedBuilder.java | 2 +- .../completion/CompletionEntityBuilder.java | 2 +- .../ElasticsearchTemplateCompletionTests.java | 2 +- .../core/convert/DateTimeConvertersTests.java | 2 +- .../MappingElasticsearchConverterTests.java | 2 +- .../core/facet/ArticleEntity.java | 2 +- .../core/facet/ArticleEntityBuilder.java | 2 +- .../ElasticsearchTemplateFacetTests.java | 2 +- .../elasticsearch/core/facet/LogEntity.java | 2 +- .../core/facet/LogEntityBuilder.java | 2 +- .../core/geo/AuthorMarkerEntity.java | 2 +- .../core/geo/AuthorMarkerEntityBuilder.java | 2 +- .../geo/ElasticsearchTemplateGeoTests.java | 2 +- .../core/geo/LocationMarkerEntity.java | 2 +- ...pleElasticsearchPersistentEntityTests.java | 2 +- ...sticsearchPersistentPropertyUnitTests.java | 2 +- .../core/query/CriteriaQueryTests.java | 2 +- .../entities/AbstractInheritedEntity.java | 2 +- .../data/elasticsearch/entities/Author.java | 2 +- .../data/elasticsearch/entities/Book.java | 2 +- .../data/elasticsearch/entities/Car.java | 2 +- .../elasticsearch/entities/CopyToEntity.java | 2 +- .../entities/DoubleIDEntity.java | 2 +- .../DynamicSettingAndMappingEntity.java | 2 +- .../entities/FieldDynamicMappingEntity.java | 2 +- .../elasticsearch/entities/GirlFriend.java | 2 +- .../data/elasticsearch/entities/Group.java | 2 +- .../elasticsearch/entities/HetroEntity1.java | 2 +- .../elasticsearch/entities/HetroEntity2.java | 2 +- .../entities/IntegerIDEntity.java | 2 +- .../elasticsearch/entities/MinimalEntity.java | 2 +- .../entities/NonDocumentEntity.java | 2 +- .../entities/NormalizerEntity.java | 2 +- .../elasticsearch/entities/ParentEntity.java | 2 +- .../data/elasticsearch/entities/Person.java | 2 +- .../entities/PersonMultipleLevelNested.java | 2 +- .../data/elasticsearch/entities/Product.java | 2 +- .../elasticsearch/entities/SampleEntity.java | 2 +- .../entities/SampleEntityUUIDKeyed.java | 2 +- .../entities/SampleInheritedEntity.java | 2 +- .../entities/SampleMappingEntity.java | 2 +- .../entities/SampleTransientEntity.java | 2 +- .../entities/SimpleRecursiveEntity.java | 2 +- .../elasticsearch/entities/SpELEntity.java | 2 +- .../elasticsearch/entities/StockPrice.java | 2 +- .../elasticsearch/entities/SynonymEntity.java | 2 +- .../data/elasticsearch/entities/User.java | 2 +- .../ImmutableElasticsearchRepository.java | 2 +- ...ImmutableElasticsearchRepositoryTests.java | 2 +- .../immutable/ImmutableEntity.java | 2 +- .../CustomMethodRepositoryBaseTests.java | 2404 ++++++++--------- .../CustomMethodRepositoryRestTests.java | 84 +- .../CustomMethodRepositoryTests.java | 86 +- .../SampleElasticSearchBookRepository.java | 2 +- .../cdi/CdiProductRepository.java | 2 +- .../repositories/cdi/CdiRepositoryClient.java | 2 +- .../repositories/cdi/CdiRepositoryTests.java | 2 +- .../cdi/ElasticsearchTemplateProducer.java | 2 +- .../repositories/cdi/OtherQualifier.java | 2 +- .../repositories/cdi/PersonDB.java | 2 +- .../cdi/QualifiedProductRepository.java | 2 +- .../cdi/SamplePersonRepository.java | 2 +- .../cdi/SamplePersonRepositoryCustom.java | 2 +- .../cdi/SamplePersonRepositoryImpl.java | 2 +- .../custom/SampleCustomMethodRepository.java | 2 +- .../doubleid/DoubleIDRepository.java | 2 +- .../geo/SpringDataGeoRepositoryTests.java | 2 +- .../integer/IntegerIDRepository.java | 2 +- .../NonDocumentEntityRepository.java | 2 +- .../sample/SampleElasticsearchRepository.java | 2 +- ...ampleUUIDKeyedElasticsearchRepository.java | 2 +- ...amicSettingAndMappingEntityRepository.java | 2 +- ...ettingAndMappingEntityRepositoryTests.java | 2 +- .../FieldDynamicMappingEntityRepository.java | 2 +- ...ldDynamicMappingEntityRepositoryTests.java | 2 +- .../repositories/spel/SpELRepository.java | 2 +- .../synonym/SynonymRepository.java | 2 +- .../synonym/SynonymRepositoryTests.java | 2 +- ...stomMethodRepositoryManualWiringTests.java | 2 +- .../ComplexCustomMethodRepositoryTests.java | 2 +- .../ComplexElasticsearchRepository.java | 2 +- .../ComplexElasticsearchRepositoryCustom.java | 2 +- ...exElasticsearchRepositoryManualWiring.java | 2 +- ...asticsearchRepositoryManualWiringImpl.java | 2 +- .../support/DoubleIDRepositoryTests.java | 2 +- ...archEntityInformationCreatorImplTests.java | 2 +- .../ElasticsearchRepositoryFactoryTests.java | 2 +- .../support/IntegerIDRepositoryTests.java | 2 +- .../support/QueryKeywordsTests.java | 2 +- .../SimpleElasticsearchRepositoryTests.java | 2 +- .../UUIDElasticsearchRepositoryTests.java | 2 +- 275 files changed, 2606 insertions(+), 2606 deletions(-) diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 2ef372676..983a796f8 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -13,7 +13,7 @@ BioMed Central Development Team; Oliver Drotbohm; Greg Turnquist; Christoph Stro ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1600]] :spring-data-commons-docs: ../../../../spring-data-commons/src/main/asciidoc -(C) 2013-2018 The original author(s). +(C) 2013-2019 The original author(s). NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. diff --git a/src/main/java/org/springframework/data/elasticsearch/ElasticsearchException.java b/src/main/java/org/springframework/data/elasticsearch/ElasticsearchException.java index 88ea99643..1d2d19c1b 100644 --- a/src/main/java/org/springframework/data/elasticsearch/ElasticsearchException.java +++ b/src/main/java/org/springframework/data/elasticsearch/ElasticsearchException.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java index 7176d23b1..dd750aeca 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java b/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java index 056dc1482..450c33e9a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java index 5e0712b13..85e1bfc1e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java index 8f139f74a..5fc4396ce 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java b/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java index d78c95b9a..9c0c06636 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java index bdb8025bb..5080b2111 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java index 1f5bdfc30..e65a42251 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java index 323840495..e17dae8b4 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java index 1b5024576..e97d8299c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Parent.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Parent.java index 940e6f04f..bdfedb814 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/Parent.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Parent.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java index d1fc2f3f4..1ef243378 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java index c2d746f0f..938abb498 100644 --- a/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java +++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java index 00845f111..99c46d7ab 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java index 6e39a9861..c3987a0b0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java b/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java index 9f12731bd..bfa70d1c2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ClusterNodes.java b/src/main/java/org/springframework/data/elasticsearch/client/ClusterNodes.java index 43ac652bd..523719cb1 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/ClusterNodes.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/ClusterNodes.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java index 7ed954c7e..3db729e5d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java b/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java index e08753701..17f4d01c2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java b/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java index b6330cd88..38df18e02 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java b/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java index e6e4aa04d..060d5ebdc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/NodeClientFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/client/NodeClientFactoryBean.java index 05b2e5eba..c96ae068b 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/NodeClientFactoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/NodeClientFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2017 the original author or authors. + * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/RestClientFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/client/RestClientFactoryBean.java index bb6c60836..56c56ccd8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/RestClientFactoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/RestClientFactoryBean.java @@ -1,93 +1,93 @@ -/* - * Copyright 2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.client; - -import lombok.extern.slf4j.Slf4j; - -import java.net.URL; -import java.util.ArrayList; - -import org.apache.http.HttpHost; -import org.elasticsearch.client.RestClient; -import org.elasticsearch.client.RestHighLevelClient; -import org.springframework.beans.factory.DisposableBean; -import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.util.Assert; - -/** - * RestClientFactoryBean - * - * @author Don Wellington - */ -@Slf4j -public class RestClientFactoryBean implements FactoryBean, InitializingBean, DisposableBean { - - private RestHighLevelClient client; - private String hosts = "http://localhost:9200"; - static final String COMMA = ","; - - @Override - public void destroy() throws Exception { - try { - log.info("Closing elasticSearch client"); - if (client != null) { - client.close(); - } - } catch (final Exception e) { - log.error("Error closing ElasticSearch client: ", e); - } - } - - @Override - public void afterPropertiesSet() throws Exception { - buildClient(); - } - - @Override - public RestHighLevelClient getObject() throws Exception { - return client; - } - - @Override - public Class getObjectType() { - return RestHighLevelClient.class; - } - - @Override - public boolean isSingleton() { - return false; - } - - protected void buildClient() throws Exception { - - Assert.hasText(hosts, "[Assertion Failed] At least one host must be set."); - ArrayList httpHosts = new ArrayList(); - for (String host : hosts.split(COMMA)) { - URL hostUrl = new URL(host); - httpHosts.add(new HttpHost(hostUrl.getHost(), hostUrl.getPort(), hostUrl.getProtocol())); - } - client = new RestHighLevelClient(RestClient.builder(httpHosts.toArray(new HttpHost[httpHosts.size()]))); - } - - public void setHosts(String hosts) { - this.hosts = hosts; - } - - public String getHosts() { - return this.hosts; - } -} +/* + * Copyright 2018-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.client; + +import lombok.extern.slf4j.Slf4j; + +import java.net.URL; +import java.util.ArrayList; + +import org.apache.http.HttpHost; +import org.elasticsearch.client.RestClient; +import org.elasticsearch.client.RestHighLevelClient; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.util.Assert; + +/** + * RestClientFactoryBean + * + * @author Don Wellington + */ +@Slf4j +public class RestClientFactoryBean implements FactoryBean, InitializingBean, DisposableBean { + + private RestHighLevelClient client; + private String hosts = "http://localhost:9200"; + static final String COMMA = ","; + + @Override + public void destroy() throws Exception { + try { + log.info("Closing elasticSearch client"); + if (client != null) { + client.close(); + } + } catch (final Exception e) { + log.error("Error closing ElasticSearch client: ", e); + } + } + + @Override + public void afterPropertiesSet() throws Exception { + buildClient(); + } + + @Override + public RestHighLevelClient getObject() throws Exception { + return client; + } + + @Override + public Class getObjectType() { + return RestHighLevelClient.class; + } + + @Override + public boolean isSingleton() { + return false; + } + + protected void buildClient() throws Exception { + + Assert.hasText(hosts, "[Assertion Failed] At least one host must be set."); + ArrayList httpHosts = new ArrayList(); + for (String host : hosts.split(COMMA)) { + URL hostUrl = new URL(host); + httpHosts.add(new HttpHost(hostUrl.getHost(), hostUrl.getPort(), hostUrl.getProtocol())); + } + client = new RestHighLevelClient(RestClient.builder(httpHosts.toArray(new HttpHost[httpHosts.size()]))); + } + + public void setHosts(String hosts) { + this.hosts = hosts; + } + + public String getHosts() { + return this.hosts; + } +} diff --git a/src/main/java/org/springframework/data/elasticsearch/client/RestClients.java b/src/main/java/org/springframework/data/elasticsearch/client/RestClients.java index d2d3a1f61..fc59fcf0e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/RestClients.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/RestClients.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/TransportClientFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/client/TransportClientFactoryBean.java index 43b8fd373..a471c2318 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/TransportClientFactoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/TransportClientFactoryBean.java @@ -1,152 +1,152 @@ -/* - * Copyright 2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.client; - -import java.util.Properties; - -import org.elasticsearch.client.transport.TransportClient; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.transport.client.PreBuiltTransportClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.DisposableBean; -import org.springframework.beans.factory.FactoryBean; +/* + * Copyright 2013-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.client; + +import java.util.Properties; + +import org.elasticsearch.client.transport.TransportClient; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.transport.client.PreBuiltTransportClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; - -/** - * TransportClientFactoryBean - * - * @author Rizwan Idrees - * @author Mohsin Husen - * @author Jakub Vavrik - * @author Piotr Betkier - * @author Ilkang Na - * @author Oliver Gierke - */ -public class TransportClientFactoryBean implements FactoryBean, InitializingBean, DisposableBean { - - private static final Logger logger = LoggerFactory.getLogger(TransportClientFactoryBean.class); - private ClusterNodes clusterNodes = ClusterNodes.of("127.0.0.1:9300"); - private String clusterName = "elasticsearch"; - private Boolean clientTransportSniff = true; - private Boolean clientIgnoreClusterName = Boolean.FALSE; - private String clientPingTimeout = "5s"; - private String clientNodesSamplerInterval = "5s"; - private TransportClient client; - private Properties properties; - - @Override - public void destroy() throws Exception { - try { - logger.info("Closing elasticSearch client"); - if (client != null) { - client.close(); - } - } catch (final Exception e) { - logger.error("Error closing ElasticSearch client: ", e); - } - } - - @Override - public TransportClient getObject() throws Exception { - return client; - } - - @Override - public Class getObjectType() { - return TransportClient.class; - } - - @Override - public boolean isSingleton() { - return false; - } - - @Override - public void afterPropertiesSet() throws Exception { - buildClient(); - } - - protected void buildClient() throws Exception { - - client = new PreBuiltTransportClient(settings()); - - clusterNodes.stream() // - .peek(it -> logger.info("Adding transport node : " + it.toString())) // - .forEach(client::addTransportAddress); - - client.connectedNodes(); - } - - private Settings settings() { - if (properties != null) { - Settings.Builder builder = Settings.builder(); - - properties.forEach((key, value) -> { - builder.put(key.toString(), value.toString()); - }); - - return builder.build(); - } - return Settings.builder() - .put("cluster.name", clusterName) - .put("client.transport.sniff", clientTransportSniff) - .put("client.transport.ignore_cluster_name", clientIgnoreClusterName) - .put("client.transport.ping_timeout", clientPingTimeout) - .put("client.transport.nodes_sampler_interval", clientNodesSamplerInterval) - .build(); - } - - public void setClusterNodes(String clusterNodes) { - this.clusterNodes = ClusterNodes.of(clusterNodes); - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public void setClientTransportSniff(Boolean clientTransportSniff) { - this.clientTransportSniff = clientTransportSniff; - } - - public String getClientNodesSamplerInterval() { - return clientNodesSamplerInterval; - } - - public void setClientNodesSamplerInterval(String clientNodesSamplerInterval) { - this.clientNodesSamplerInterval = clientNodesSamplerInterval; - } - - public String getClientPingTimeout() { - return clientPingTimeout; - } - - public void setClientPingTimeout(String clientPingTimeout) { - this.clientPingTimeout = clientPingTimeout; - } - - public Boolean getClientIgnoreClusterName() { - return clientIgnoreClusterName; - } - - public void setClientIgnoreClusterName(Boolean clientIgnoreClusterName) { - this.clientIgnoreClusterName = clientIgnoreClusterName; - } - - public void setProperties(Properties properties) { - this.properties = properties; - } -} + +/** + * TransportClientFactoryBean + * + * @author Rizwan Idrees + * @author Mohsin Husen + * @author Jakub Vavrik + * @author Piotr Betkier + * @author Ilkang Na + * @author Oliver Gierke + */ +public class TransportClientFactoryBean implements FactoryBean, InitializingBean, DisposableBean { + + private static final Logger logger = LoggerFactory.getLogger(TransportClientFactoryBean.class); + private ClusterNodes clusterNodes = ClusterNodes.of("127.0.0.1:9300"); + private String clusterName = "elasticsearch"; + private Boolean clientTransportSniff = true; + private Boolean clientIgnoreClusterName = Boolean.FALSE; + private String clientPingTimeout = "5s"; + private String clientNodesSamplerInterval = "5s"; + private TransportClient client; + private Properties properties; + + @Override + public void destroy() throws Exception { + try { + logger.info("Closing elasticSearch client"); + if (client != null) { + client.close(); + } + } catch (final Exception e) { + logger.error("Error closing ElasticSearch client: ", e); + } + } + + @Override + public TransportClient getObject() throws Exception { + return client; + } + + @Override + public Class getObjectType() { + return TransportClient.class; + } + + @Override + public boolean isSingleton() { + return false; + } + + @Override + public void afterPropertiesSet() throws Exception { + buildClient(); + } + + protected void buildClient() throws Exception { + + client = new PreBuiltTransportClient(settings()); + + clusterNodes.stream() // + .peek(it -> logger.info("Adding transport node : " + it.toString())) // + .forEach(client::addTransportAddress); + + client.connectedNodes(); + } + + private Settings settings() { + if (properties != null) { + Settings.Builder builder = Settings.builder(); + + properties.forEach((key, value) -> { + builder.put(key.toString(), value.toString()); + }); + + return builder.build(); + } + return Settings.builder() + .put("cluster.name", clusterName) + .put("client.transport.sniff", clientTransportSniff) + .put("client.transport.ignore_cluster_name", clientIgnoreClusterName) + .put("client.transport.ping_timeout", clientPingTimeout) + .put("client.transport.nodes_sampler_interval", clientNodesSamplerInterval) + .build(); + } + + public void setClusterNodes(String clusterNodes) { + this.clusterNodes = ClusterNodes.of(clusterNodes); + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public void setClientTransportSniff(Boolean clientTransportSniff) { + this.clientTransportSniff = clientTransportSniff; + } + + public String getClientNodesSamplerInterval() { + return clientNodesSamplerInterval; + } + + public void setClientNodesSamplerInterval(String clientNodesSamplerInterval) { + this.clientNodesSamplerInterval = clientNodesSamplerInterval; + } + + public String getClientPingTimeout() { + return clientPingTimeout; + } + + public void setClientPingTimeout(String clientPingTimeout) { + this.clientPingTimeout = clientPingTimeout; + } + + public Boolean getClientIgnoreClusterName() { + return clientIgnoreClusterName; + } + + public void setClientIgnoreClusterName(Boolean clientIgnoreClusterName) { + this.clientIgnoreClusterName = clientIgnoreClusterName; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } +} diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultReactiveElasticsearchClient.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultReactiveElasticsearchClient.java index d31df3210..a734ef26b 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultReactiveElasticsearchClient.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultReactiveElasticsearchClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProvider.java index 89719b645..2c0b6f8dd 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/HostProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/HostProvider.java index b018fcb11..a5e533eda 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/HostProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/HostProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProvider.java index 99d30f2b1..c890f1462 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/RawActionResponse.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/RawActionResponse.java index 961f38766..aa190e81e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/RawActionResponse.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/RawActionResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClient.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClient.java index 895ff24d4..500bd2d4e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClient.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveRestClients.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveRestClients.java index c3545bce3..e9f00abdf 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveRestClients.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/ReactiveRestClients.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/RequestBodyEncodingException.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/RequestBodyEncodingException.java index 43b6aa78d..ffe13dab9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/RequestBodyEncodingException.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/RequestBodyEncodingException.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProvider.java index d2e0a7290..762b2f5f7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/reactive/WebClientProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/reactive/WebClientProvider.java index ddec5f2bd..c2291e19a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/reactive/WebClientProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/reactive/WebClientProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/util/RequestConverters.java b/src/main/java/org/springframework/data/elasticsearch/client/util/RequestConverters.java index cf48a701e..3e18ecce2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/util/RequestConverters.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/util/RequestConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/config/AbstractElasticsearchConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/config/AbstractElasticsearchConfiguration.java index f029c31a5..8d8165568 100644 --- a/src/main/java/org/springframework/data/elasticsearch/config/AbstractElasticsearchConfiguration.java +++ b/src/main/java/org/springframework/data/elasticsearch/config/AbstractElasticsearchConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/config/AbstractReactiveElasticsearchConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/config/AbstractReactiveElasticsearchConfiguration.java index 1f2c239d6..178b454d9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/config/AbstractReactiveElasticsearchConfiguration.java +++ b/src/main/java/org/springframework/data/elasticsearch/config/AbstractReactiveElasticsearchConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java index 604791719..79c587c7c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java +++ b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java index f33627516..995d2795a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java +++ b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/config/NodeClientBeanDefinitionParser.java b/src/main/java/org/springframework/data/elasticsearch/config/NodeClientBeanDefinitionParser.java index 96cad2e1d..23738c3f8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/config/NodeClientBeanDefinitionParser.java +++ b/src/main/java/org/springframework/data/elasticsearch/config/NodeClientBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/config/RestClientBeanDefinitionParser.java b/src/main/java/org/springframework/data/elasticsearch/config/RestClientBeanDefinitionParser.java index 5fcdf1f47..abbc20b68 100644 --- a/src/main/java/org/springframework/data/elasticsearch/config/RestClientBeanDefinitionParser.java +++ b/src/main/java/org/springframework/data/elasticsearch/config/RestClientBeanDefinitionParser.java @@ -1,47 +1,47 @@ -/* - * Copyright 2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.config; - -import org.springframework.beans.factory.support.AbstractBeanDefinition; -import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; -import org.springframework.beans.factory.support.BeanDefinitionBuilder; -import org.springframework.beans.factory.xml.ParserContext; -import org.springframework.data.elasticsearch.client.RestClientFactoryBean; -import org.w3c.dom.Element; - -/** - * @author Don Wellington - */ -public class RestClientBeanDefinitionParser extends AbstractBeanDefinitionParser { - - @Override - protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) { - BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(RestClientFactoryBean.class); - setConfigurations(element, builder); - return getSourcedBeanDefinition(builder, element, parserContext); - } - - private void setConfigurations(Element element, BeanDefinitionBuilder builder) { - builder.addPropertyValue("hosts", element.getAttribute("hosts")); - } - - private AbstractBeanDefinition getSourcedBeanDefinition(BeanDefinitionBuilder builder, Element source, - ParserContext context) { - AbstractBeanDefinition definition = builder.getBeanDefinition(); - definition.setSource(context.extractSource(source)); - return definition; - } -} +/* + * Copyright 2018-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.config; + +import org.springframework.beans.factory.support.AbstractBeanDefinition; +import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; +import org.springframework.beans.factory.support.BeanDefinitionBuilder; +import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.data.elasticsearch.client.RestClientFactoryBean; +import org.w3c.dom.Element; + +/** + * @author Don Wellington + */ +public class RestClientBeanDefinitionParser extends AbstractBeanDefinitionParser { + + @Override + protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) { + BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(RestClientFactoryBean.class); + setConfigurations(element, builder); + return getSourcedBeanDefinition(builder, element, parserContext); + } + + private void setConfigurations(Element element, BeanDefinitionBuilder builder) { + builder.addPropertyValue("hosts", element.getAttribute("hosts")); + } + + private AbstractBeanDefinition getSourcedBeanDefinition(BeanDefinitionBuilder builder, Element source, + ParserContext context) { + AbstractBeanDefinition definition = builder.getBeanDefinition(); + definition.setSource(context.extractSource(source)); + return definition; + } +} diff --git a/src/main/java/org/springframework/data/elasticsearch/config/TransportClientBeanDefinitionParser.java b/src/main/java/org/springframework/data/elasticsearch/config/TransportClientBeanDefinitionParser.java index 200f830ce..3149b2de0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/config/TransportClientBeanDefinitionParser.java +++ b/src/main/java/org/springframework/data/elasticsearch/config/TransportClientBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/AbstractResultMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/AbstractResultMapper.java index 282c23311..a83216381 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/AbstractResultMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/AbstractResultMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/CriteriaFilterProcessor.java b/src/main/java/org/springframework/data/elasticsearch/core/CriteriaFilterProcessor.java index 971d6a403..5ba2dd137 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/CriteriaFilterProcessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/CriteriaFilterProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/CriteriaQueryProcessor.java b/src/main/java/org/springframework/data/elasticsearch/core/CriteriaQueryProcessor.java index f082e9cfc..c91fd8b7e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/CriteriaQueryProcessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/CriteriaQueryProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/DefaultEntityMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/DefaultEntityMapper.java index 54d732459..528bb7bba 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/DefaultEntityMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/DefaultEntityMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/DefaultResultMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/DefaultResultMapper.java index ec090ec00..ac294b61a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/DefaultResultMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/DefaultResultMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchExceptionTranslator.java b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchExceptionTranslator.java index b3c0cb48c..fddf3f1a2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchExceptionTranslator.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchExceptionTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java index eece21e09..b8d239d68 100755 --- a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java @@ -1,632 +1,632 @@ -/* - * Copyright 2013-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.core; - -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.cluster.metadata.AliasMetaData; -import org.elasticsearch.common.Nullable; -import org.springframework.data.domain.Page; -import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; -import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; -import org.springframework.data.elasticsearch.core.query.*; -import org.springframework.data.util.CloseableIterator; - -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * ElasticsearchOperations - * - * @author Rizwan Idrees - * @author Mohsin Husen - * @author Kevin Leturc - * @author Zetang Zeng - */ -public interface ElasticsearchOperations { - - /** - * @return Converter in use - */ - ElasticsearchConverter getElasticsearchConverter(); - - /** - * Create an index for a class - * - * @param clazz - * @param - */ - boolean createIndex(Class clazz); - - /** - * Create an index for given indexName - * - * @param indexName - */ - boolean createIndex(String indexName); - - /** - * Create an index for given indexName and Settings - * - * @param indexName - * @param settings - */ - boolean createIndex(String indexName, Object settings); - - /** - * Create an index for given class and Settings - * - * @param clazz - * @param settings - */ - boolean createIndex(Class clazz, Object settings); - - /** - * Create mapping for a class - * - * @param clazz - * @param - */ - boolean putMapping(Class clazz); - - /** - * Create mapping for a given indexName and type - * - * @param indexName - * @param type - * @param mappings - */ - boolean putMapping(String indexName, String type, Object mappings); - - /** - * Create mapping for a class - * - * @param clazz - * @param mappings - */ - boolean putMapping(Class clazz, Object mappings); - - - /** - * Get mapping for a class - * - * @param clazz - * @param - */ - Map getMapping(Class clazz); - - /** - * Get mapping for a given indexName and type - * - * @param indexName - * @param type - */ - Map getMapping(String indexName, String type); - - /** - * Get settings for a given indexName - * - * @param indexName - */ - Map getSetting(String indexName); - - /** - * Get settings for a given class - * - * @param clazz - */ - Map getSetting(Class clazz); - - - /** - * Execute the query against elasticsearch and return the first returned object - * - * @param query - * @param clazz - * @return the first matching object - */ - T queryForObject(GetQuery query, Class clazz); - - /** - * Execute the query against elasticsearch and return the first returned object using custom mapper - * - * @param query - * @param clazz - * @param mapper - * @return the first matching object - */ - T queryForObject(GetQuery query, Class clazz, GetResultMapper mapper); - - /** - * Execute the query against elasticsearch and return the first returned object - * - * @param query - * @param clazz - * @return the first matching object - */ - T queryForObject(CriteriaQuery query, Class clazz); - - /** - * Execute the query against elasticsearch and return the first returned object - * - * @param query - * @param clazz - * @return the first matching object - */ - T queryForObject(StringQuery query, Class clazz); - - /** - * Execute the query against elasticsearch and return result as {@link Page} - * - * @param query - * @param clazz - * @return - */ - Page queryForPage(SearchQuery query, Class clazz); - - /** - * Execute the query against elasticsearch and return result as {@link Page} using custom mapper - * - * @param query - * @param clazz - * @return - */ - Page queryForPage(SearchQuery query, Class clazz, SearchResultMapper mapper); - - /** - * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} - * - * @param queries - * @param clazz - * @return - */ - List> queryForPage(List queries, Class clazz); - - /** - * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} using custom mapper - * - * @param queries - * @param clazz - * @return - */ - List> queryForPage(List queries, Class clazz, SearchResultMapper mapper); - - /** - * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} - * - * @param queries - * @param classes - * @return - */ - List> queryForPage(List queries, List> classes); - - /** - * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} using custom mapper - * - * @param queries - * @param classes - * @return - */ - List> queryForPage(List queries, List> classes, SearchResultMapper mapper); - - /** - * Execute the query against elasticsearch and return result as {@link Page} - * - * @param query - * @param clazz - * @return - */ - Page queryForPage(CriteriaQuery query, Class clazz); - - /** - * Execute the query against elasticsearch and return result as {@link Page} - * - * @param query - * @param clazz - * @return - */ - Page queryForPage(StringQuery query, Class clazz); - - /** - * Execute the query against elasticsearch and return result as {@link Page} using custom mapper - * - * @param query - * @param clazz - * @return - */ - Page queryForPage(StringQuery query, Class clazz, SearchResultMapper mapper); - - /** - * Executes the given {@link CriteriaQuery} against elasticsearch and return result as {@link CloseableIterator}. - *

- * Returns a {@link CloseableIterator} that wraps an Elasticsearch scroll context that needs to be closed in case of error. - * - * @param element return type - * @param query - * @param clazz - * @return - * @since 1.3 - */ - CloseableIterator stream(CriteriaQuery query, Class clazz); - - /** - * Executes the given {@link SearchQuery} against elasticsearch and return result as {@link CloseableIterator}. - *

- * Returns a {@link CloseableIterator} that wraps an Elasticsearch scroll context that needs to be closed in case of error. - * - * @param element return type - * @param query - * @param clazz - * @return - * @since 1.3 - */ - CloseableIterator stream(SearchQuery query, Class clazz); - - /** - * Executes the given {@link SearchQuery} against elasticsearch and return result as {@link CloseableIterator} using custom mapper. - *

- * Returns a {@link CloseableIterator} that wraps an Elasticsearch scroll context that needs to be closed in case of error. - * - * @param element return type - * @param query - * @param clazz - * @param mapper - * @return - * @since 1.3 - */ - CloseableIterator stream(SearchQuery query, Class clazz, SearchResultMapper mapper); - - /** - * Execute the criteria query against elasticsearch and return result as {@link List} - * - * @param query - * @param clazz - * @param - * @return - */ - List queryForList(CriteriaQuery query, Class clazz); - - /** - * Execute the string query against elasticsearch and return result as {@link List} - * - * @param query - * @param clazz - * @param - * @return - */ - List queryForList(StringQuery query, Class clazz); - - /** - * Execute the search query against elasticsearch and return result as {@link List} - * - * @param query - * @param clazz - * @param - * @return - */ - List queryForList(SearchQuery query, Class clazz); - - /** - * Execute the multi search query against elasticsearch and return result as {@link List} - * - * @param queries - * @param clazz - * @param - * @return - */ - default List> queryForList(List queries, Class clazz) { - return queryForPage(queries, clazz).stream().map(Page::getContent).collect(Collectors.toList()); - } - - /** - * Execute the multi search query against elasticsearch and return result as {@link List} - * - * @param queries - * @param classes - * @return - */ - default List> queryForList(List queries, List> classes) { - return queryForPage(queries, classes).stream().map(Page::getContent).collect(Collectors.toList()); - } - - /** - * Execute the query against elasticsearch and return ids - * - * @param query - * @return - */ - List queryForIds(SearchQuery query); - - /** - * return number of elements found by given query - * - * @param query - * @param clazz - * @return - */ - long count(CriteriaQuery query, Class clazz); - - /** - * return number of elements found by given query - * - * @param query - * @return - */ - long count(CriteriaQuery query); - - /** - * return number of elements found by given query - * - * @param query - * @param clazz - * @return - */ - long count(SearchQuery query, Class clazz); - - /** - * return number of elements found by given query - * - * @param query - * @return - */ - long count(SearchQuery query); - - /** - * Execute a multiGet against elasticsearch for the given ids - * - * @param searchQuery - * @param clazz - * @return - */ - LinkedList multiGet(SearchQuery searchQuery, Class clazz); - - /** - * Execute a multiGet against elasticsearch for the given ids with MultiGetResultMapper - * - * @param searchQuery - * @param clazz - * @param multiGetResultMapper - * @return - */ - LinkedList multiGet(SearchQuery searchQuery, Class clazz, MultiGetResultMapper multiGetResultMapper); - - /** - * Index an object. Will do save or update - * - * @param query - * @return returns the document id - */ - String index(IndexQuery query); - - /** - * Partial update of the document - * - * @param updateQuery - * @return - */ - UpdateResponse update(UpdateQuery updateQuery); - - /** - * Bulk index all objects. Will do save or update - * - * @param queries - */ - void bulkIndex(List queries); - - /** - * Bulk update all objects. Will do update - * - * @param queries - */ - void bulkUpdate(List queries); - - /** - * Delete the one object with provided id - * - * @param indexName - * @param type - * @param id - * @return documentId of the document deleted - */ - String delete(String indexName, String type, String id); - - - /** - * Delete all records matching the criteria - * - * @param clazz - * @param criteriaQuery - */ - void delete(CriteriaQuery criteriaQuery, Class clazz); - /** - * Delete the one object with provided id - * - * @param clazz - * @param id - * @return documentId of the document deleted - */ - String delete(Class clazz, String id); - - /** - * Delete all records matching the query - * - * @param clazz - * @param query - */ - void delete(DeleteQuery query, Class clazz); - - /** - * Delete all records matching the query - * - * @param query - */ - void delete(DeleteQuery query); - - /** - * Deletes an index for given entity - * - * @param clazz - * @param - * @return - */ - boolean deleteIndex(Class clazz); - - /** - * Deletes an index for given indexName - * - * @param indexName - * @return - */ - boolean deleteIndex(String indexName); - - /** - * check if index is exists - * - * @param clazz - * @param - * @return - */ - boolean indexExists(Class clazz); - - /** - * check if index is exists for given IndexName - * - * @param indexName - * @return - */ - boolean indexExists(String indexName); - - /** - * check if type is exists in an index - * - * @param index - * @param type - * @return - */ - boolean typeExists(String index, String type); - - /** - * refresh the index - * - * @param indexName - * - */ - void refresh(String indexName); - - /** - * refresh the index - * - * @param clazz - * - */ - void refresh(Class clazz); - - /** - * Returns scrolled page for given query - * - * @param query The search query. - * @param scrollTimeInMillis The time in millisecond for scroll feature - * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. - * @param clazz The class of entity to retrieve. - * @return The scan id for input query. - */ - Page startScroll(long scrollTimeInMillis, SearchQuery query, Class clazz); - - /** - * Returns scrolled page for given query - * - * @param query The search query. - * @param scrollTimeInMillis The time in millisecond for scroll feature - * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. - * @param mapper Custom impl to map result to entities - * @return The scan id for input query. - */ - Page startScroll(long scrollTimeInMillis, SearchQuery query, Class clazz, SearchResultMapper mapper); - - /** - * Returns scrolled page for given query - * - * @param criteriaQuery The search query. - * @param scrollTimeInMillis The time in millisecond for scroll feature - * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. - * @param clazz The class of entity to retrieve. - * @return The scan id for input query. - */ - Page startScroll(long scrollTimeInMillis, CriteriaQuery criteriaQuery, Class clazz); - - /** - * Returns scrolled page for given query - * - * @param criteriaQuery The search query. - * @param scrollTimeInMillis The time in millisecond for scroll feature - * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. - * @param mapper Custom impl to map result to entities - * @return The scan id for input query. - */ - Page startScroll(long scrollTimeInMillis, CriteriaQuery criteriaQuery, Class clazz, SearchResultMapper mapper); - - - Page continueScroll(@Nullable String scrollId, long scrollTimeInMillis, Class clazz); - Page continueScroll(@Nullable String scrollId, long scrollTimeInMillis, Class clazz, SearchResultMapper mapper); - /** - * Clears the search contexts associated with specified scroll ids. - * - * @param scrollId - * - */ - void clearScroll(String scrollId); - - /** - * more like this query to search for documents that are "like" a specific document. - * - * @param query - * @param clazz - * @param - * @return - */ - Page moreLikeThis(MoreLikeThisQuery query, Class clazz); - - /** - * adding new alias - * - * @param query - * @return - */ - Boolean addAlias(AliasQuery query); - - /** - * removing previously created alias - * - * @param query - * @return - */ - Boolean removeAlias(AliasQuery query); - - /** - * get all the alias pointing to specified index - * - * @param indexName - * @return - */ - List queryForAlias(String indexName); - - - T query(SearchQuery query, ResultsExtractor resultsExtractor); - - - ElasticsearchPersistentEntity getPersistentEntityFor(Class clazz); -} +/* + * Copyright 2013-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.core; + +import org.elasticsearch.action.update.UpdateResponse; +import org.elasticsearch.cluster.metadata.AliasMetaData; +import org.elasticsearch.common.Nullable; +import org.springframework.data.domain.Page; +import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; +import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; +import org.springframework.data.elasticsearch.core.query.*; +import org.springframework.data.util.CloseableIterator; + +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * ElasticsearchOperations + * + * @author Rizwan Idrees + * @author Mohsin Husen + * @author Kevin Leturc + * @author Zetang Zeng + */ +public interface ElasticsearchOperations { + + /** + * @return Converter in use + */ + ElasticsearchConverter getElasticsearchConverter(); + + /** + * Create an index for a class + * + * @param clazz + * @param + */ + boolean createIndex(Class clazz); + + /** + * Create an index for given indexName + * + * @param indexName + */ + boolean createIndex(String indexName); + + /** + * Create an index for given indexName and Settings + * + * @param indexName + * @param settings + */ + boolean createIndex(String indexName, Object settings); + + /** + * Create an index for given class and Settings + * + * @param clazz + * @param settings + */ + boolean createIndex(Class clazz, Object settings); + + /** + * Create mapping for a class + * + * @param clazz + * @param + */ + boolean putMapping(Class clazz); + + /** + * Create mapping for a given indexName and type + * + * @param indexName + * @param type + * @param mappings + */ + boolean putMapping(String indexName, String type, Object mappings); + + /** + * Create mapping for a class + * + * @param clazz + * @param mappings + */ + boolean putMapping(Class clazz, Object mappings); + + + /** + * Get mapping for a class + * + * @param clazz + * @param + */ + Map getMapping(Class clazz); + + /** + * Get mapping for a given indexName and type + * + * @param indexName + * @param type + */ + Map getMapping(String indexName, String type); + + /** + * Get settings for a given indexName + * + * @param indexName + */ + Map getSetting(String indexName); + + /** + * Get settings for a given class + * + * @param clazz + */ + Map getSetting(Class clazz); + + + /** + * Execute the query against elasticsearch and return the first returned object + * + * @param query + * @param clazz + * @return the first matching object + */ + T queryForObject(GetQuery query, Class clazz); + + /** + * Execute the query against elasticsearch and return the first returned object using custom mapper + * + * @param query + * @param clazz + * @param mapper + * @return the first matching object + */ + T queryForObject(GetQuery query, Class clazz, GetResultMapper mapper); + + /** + * Execute the query against elasticsearch and return the first returned object + * + * @param query + * @param clazz + * @return the first matching object + */ + T queryForObject(CriteriaQuery query, Class clazz); + + /** + * Execute the query against elasticsearch and return the first returned object + * + * @param query + * @param clazz + * @return the first matching object + */ + T queryForObject(StringQuery query, Class clazz); + + /** + * Execute the query against elasticsearch and return result as {@link Page} + * + * @param query + * @param clazz + * @return + */ + Page queryForPage(SearchQuery query, Class clazz); + + /** + * Execute the query against elasticsearch and return result as {@link Page} using custom mapper + * + * @param query + * @param clazz + * @return + */ + Page queryForPage(SearchQuery query, Class clazz, SearchResultMapper mapper); + + /** + * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} + * + * @param queries + * @param clazz + * @return + */ + List> queryForPage(List queries, Class clazz); + + /** + * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} using custom mapper + * + * @param queries + * @param clazz + * @return + */ + List> queryForPage(List queries, Class clazz, SearchResultMapper mapper); + + /** + * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} + * + * @param queries + * @param classes + * @return + */ + List> queryForPage(List queries, List> classes); + + /** + * Execute the multi-search against elasticsearch and return result as {@link List} of {@link Page} using custom mapper + * + * @param queries + * @param classes + * @return + */ + List> queryForPage(List queries, List> classes, SearchResultMapper mapper); + + /** + * Execute the query against elasticsearch and return result as {@link Page} + * + * @param query + * @param clazz + * @return + */ + Page queryForPage(CriteriaQuery query, Class clazz); + + /** + * Execute the query against elasticsearch and return result as {@link Page} + * + * @param query + * @param clazz + * @return + */ + Page queryForPage(StringQuery query, Class clazz); + + /** + * Execute the query against elasticsearch and return result as {@link Page} using custom mapper + * + * @param query + * @param clazz + * @return + */ + Page queryForPage(StringQuery query, Class clazz, SearchResultMapper mapper); + + /** + * Executes the given {@link CriteriaQuery} against elasticsearch and return result as {@link CloseableIterator}. + *

+ * Returns a {@link CloseableIterator} that wraps an Elasticsearch scroll context that needs to be closed in case of error. + * + * @param element return type + * @param query + * @param clazz + * @return + * @since 1.3 + */ + CloseableIterator stream(CriteriaQuery query, Class clazz); + + /** + * Executes the given {@link SearchQuery} against elasticsearch and return result as {@link CloseableIterator}. + *

+ * Returns a {@link CloseableIterator} that wraps an Elasticsearch scroll context that needs to be closed in case of error. + * + * @param element return type + * @param query + * @param clazz + * @return + * @since 1.3 + */ + CloseableIterator stream(SearchQuery query, Class clazz); + + /** + * Executes the given {@link SearchQuery} against elasticsearch and return result as {@link CloseableIterator} using custom mapper. + *

+ * Returns a {@link CloseableIterator} that wraps an Elasticsearch scroll context that needs to be closed in case of error. + * + * @param element return type + * @param query + * @param clazz + * @param mapper + * @return + * @since 1.3 + */ + CloseableIterator stream(SearchQuery query, Class clazz, SearchResultMapper mapper); + + /** + * Execute the criteria query against elasticsearch and return result as {@link List} + * + * @param query + * @param clazz + * @param + * @return + */ + List queryForList(CriteriaQuery query, Class clazz); + + /** + * Execute the string query against elasticsearch and return result as {@link List} + * + * @param query + * @param clazz + * @param + * @return + */ + List queryForList(StringQuery query, Class clazz); + + /** + * Execute the search query against elasticsearch and return result as {@link List} + * + * @param query + * @param clazz + * @param + * @return + */ + List queryForList(SearchQuery query, Class clazz); + + /** + * Execute the multi search query against elasticsearch and return result as {@link List} + * + * @param queries + * @param clazz + * @param + * @return + */ + default List> queryForList(List queries, Class clazz) { + return queryForPage(queries, clazz).stream().map(Page::getContent).collect(Collectors.toList()); + } + + /** + * Execute the multi search query against elasticsearch and return result as {@link List} + * + * @param queries + * @param classes + * @return + */ + default List> queryForList(List queries, List> classes) { + return queryForPage(queries, classes).stream().map(Page::getContent).collect(Collectors.toList()); + } + + /** + * Execute the query against elasticsearch and return ids + * + * @param query + * @return + */ + List queryForIds(SearchQuery query); + + /** + * return number of elements found by given query + * + * @param query + * @param clazz + * @return + */ + long count(CriteriaQuery query, Class clazz); + + /** + * return number of elements found by given query + * + * @param query + * @return + */ + long count(CriteriaQuery query); + + /** + * return number of elements found by given query + * + * @param query + * @param clazz + * @return + */ + long count(SearchQuery query, Class clazz); + + /** + * return number of elements found by given query + * + * @param query + * @return + */ + long count(SearchQuery query); + + /** + * Execute a multiGet against elasticsearch for the given ids + * + * @param searchQuery + * @param clazz + * @return + */ + LinkedList multiGet(SearchQuery searchQuery, Class clazz); + + /** + * Execute a multiGet against elasticsearch for the given ids with MultiGetResultMapper + * + * @param searchQuery + * @param clazz + * @param multiGetResultMapper + * @return + */ + LinkedList multiGet(SearchQuery searchQuery, Class clazz, MultiGetResultMapper multiGetResultMapper); + + /** + * Index an object. Will do save or update + * + * @param query + * @return returns the document id + */ + String index(IndexQuery query); + + /** + * Partial update of the document + * + * @param updateQuery + * @return + */ + UpdateResponse update(UpdateQuery updateQuery); + + /** + * Bulk index all objects. Will do save or update + * + * @param queries + */ + void bulkIndex(List queries); + + /** + * Bulk update all objects. Will do update + * + * @param queries + */ + void bulkUpdate(List queries); + + /** + * Delete the one object with provided id + * + * @param indexName + * @param type + * @param id + * @return documentId of the document deleted + */ + String delete(String indexName, String type, String id); + + + /** + * Delete all records matching the criteria + * + * @param clazz + * @param criteriaQuery + */ + void delete(CriteriaQuery criteriaQuery, Class clazz); + /** + * Delete the one object with provided id + * + * @param clazz + * @param id + * @return documentId of the document deleted + */ + String delete(Class clazz, String id); + + /** + * Delete all records matching the query + * + * @param clazz + * @param query + */ + void delete(DeleteQuery query, Class clazz); + + /** + * Delete all records matching the query + * + * @param query + */ + void delete(DeleteQuery query); + + /** + * Deletes an index for given entity + * + * @param clazz + * @param + * @return + */ + boolean deleteIndex(Class clazz); + + /** + * Deletes an index for given indexName + * + * @param indexName + * @return + */ + boolean deleteIndex(String indexName); + + /** + * check if index is exists + * + * @param clazz + * @param + * @return + */ + boolean indexExists(Class clazz); + + /** + * check if index is exists for given IndexName + * + * @param indexName + * @return + */ + boolean indexExists(String indexName); + + /** + * check if type is exists in an index + * + * @param index + * @param type + * @return + */ + boolean typeExists(String index, String type); + + /** + * refresh the index + * + * @param indexName + * + */ + void refresh(String indexName); + + /** + * refresh the index + * + * @param clazz + * + */ + void refresh(Class clazz); + + /** + * Returns scrolled page for given query + * + * @param query The search query. + * @param scrollTimeInMillis The time in millisecond for scroll feature + * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. + * @param clazz The class of entity to retrieve. + * @return The scan id for input query. + */ + Page startScroll(long scrollTimeInMillis, SearchQuery query, Class clazz); + + /** + * Returns scrolled page for given query + * + * @param query The search query. + * @param scrollTimeInMillis The time in millisecond for scroll feature + * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. + * @param mapper Custom impl to map result to entities + * @return The scan id for input query. + */ + Page startScroll(long scrollTimeInMillis, SearchQuery query, Class clazz, SearchResultMapper mapper); + + /** + * Returns scrolled page for given query + * + * @param criteriaQuery The search query. + * @param scrollTimeInMillis The time in millisecond for scroll feature + * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. + * @param clazz The class of entity to retrieve. + * @return The scan id for input query. + */ + Page startScroll(long scrollTimeInMillis, CriteriaQuery criteriaQuery, Class clazz); + + /** + * Returns scrolled page for given query + * + * @param criteriaQuery The search query. + * @param scrollTimeInMillis The time in millisecond for scroll feature + * {@link org.elasticsearch.action.search.SearchRequestBuilder#setScroll(org.elasticsearch.common.unit.TimeValue)}. + * @param mapper Custom impl to map result to entities + * @return The scan id for input query. + */ + Page startScroll(long scrollTimeInMillis, CriteriaQuery criteriaQuery, Class clazz, SearchResultMapper mapper); + + + Page continueScroll(@Nullable String scrollId, long scrollTimeInMillis, Class clazz); + Page continueScroll(@Nullable String scrollId, long scrollTimeInMillis, Class clazz, SearchResultMapper mapper); + /** + * Clears the search contexts associated with specified scroll ids. + * + * @param scrollId + * + */ + void clearScroll(String scrollId); + + /** + * more like this query to search for documents that are "like" a specific document. + * + * @param query + * @param clazz + * @param + * @return + */ + Page moreLikeThis(MoreLikeThisQuery query, Class clazz); + + /** + * adding new alias + * + * @param query + * @return + */ + Boolean addAlias(AliasQuery query); + + /** + * removing previously created alias + * + * @param query + * @return + */ + Boolean removeAlias(AliasQuery query); + + /** + * get all the alias pointing to specified index + * + * @param indexName + * @return + */ + List queryForAlias(String indexName); + + + T query(SearchQuery query, ResultsExtractor resultsExtractor); + + + ElasticsearchPersistentEntity getPersistentEntityFor(Class clazz); +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplate.java b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplate.java index a53f67200..5884eb474 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplate.java b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplate.java index dd4eb381c..b146d6f4c 100755 --- a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/EntityMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/EntityMapper.java index d3d5ac914..3bddc64b9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/EntityMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/EntityMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java index 420b2eb30..075efc291 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/EsClient.java b/src/main/java/org/springframework/data/elasticsearch/core/EsClient.java index d5d253df5..5bd2d273d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/EsClient.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/EsClient.java @@ -1,26 +1,26 @@ -/* - * Copyright 2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.core; - -/** - * EsClient interface. Specify what client an ElasticSearchTemplate will return from getClient(). - * - * @author Don Wellington - * @param - */ -public interface EsClient { - C getClient(); -} +/* + * Copyright 2018-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.core; + +/** + * EsClient interface. Specify what client an ElasticSearchTemplate will return from getClient(). + * + * @author Don Wellington + * @param + */ +public interface EsClient { + C getClient(); +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/FacetedPage.java b/src/main/java/org/springframework/data/elasticsearch/core/FacetedPage.java index d1fad4756..f9ef1573e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/FacetedPage.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/FacetedPage.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/FacetedPageImpl.java b/src/main/java/org/springframework/data/elasticsearch/core/FacetedPageImpl.java index a3de48b47..3f2ed38f5 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/FacetedPageImpl.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/FacetedPageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/GetResultMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/GetResultMapper.java index 58fb05838..eaa0c0406 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/GetResultMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/GetResultMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/MappingBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/MappingBuilder.java index 7d059d570..b8474dfb3 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/MappingBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/MappingBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/MultiGetResultMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/MultiGetResultMapper.java index c5169ed7e..584e982a7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/MultiGetResultMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/MultiGetResultMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java index 538247420..0f42cd284 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java index 3719df22e..e20a735cc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ResultsExtractor.java b/src/main/java/org/springframework/data/elasticsearch/core/ResultsExtractor.java index 658566751..89d6602dc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ResultsExtractor.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ResultsExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ResultsMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/ResultsMapper.java index 07a148114..25dccf6ca 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ResultsMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ResultsMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ScoredPage.java b/src/main/java/org/springframework/data/elasticsearch/core/ScoredPage.java index aa8d28f8e..8197451fe 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ScoredPage.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ScoredPage.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchResultMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchResultMapper.java index 4e63f53fd..ebda7aaed 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/SearchResultMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchResultMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/aggregation/impl/AggregatedPageImpl.java b/src/main/java/org/springframework/data/elasticsearch/core/aggregation/impl/AggregatedPageImpl.java index caf8b8456..faaa350f0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/aggregation/impl/AggregatedPageImpl.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/aggregation/impl/AggregatedPageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/client/support/AliasData.java b/src/main/java/org/springframework/data/elasticsearch/core/client/support/AliasData.java index e16e00475..972987d0f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/client/support/AliasData.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/client/support/AliasData.java @@ -1,34 +1,34 @@ -/* - * Copyright 2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.core.client.support; - -import lombok.Data; -import lombok.Getter; - -import org.elasticsearch.cluster.metadata.AliasMetaData; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown=true) -@Data -public class AliasData { - String filter = null; - String routing = null; - String search_routing = null; - String index_routing= null; -} +/* + * Copyright 2018-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.core.client.support; + +import lombok.Data; +import lombok.Getter; + +import org.elasticsearch.cluster.metadata.AliasMetaData; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown=true) +@Data +public class AliasData { + String filter = null; + String routing = null; + String search_routing = null; + String index_routing= null; +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/DateTimeConverters.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/DateTimeConverters.java index ce81d6d39..455bd4cd0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/convert/DateTimeConverters.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/DateTimeConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java index c649585b1..422e4a8a7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java index d591f808b..4594300cd 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java index 496e5bcf8..9cb7eaf3f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetRequest.java index 2d0cbcd66..174a13aad 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,4 +47,4 @@ public abstract class AbstractFacetRequest implements FacetRequest { public boolean applyQueryFilter() { return applyQueryFilter; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetResult.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetResult.java index 0dd050dc5..4045da4a7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetResult.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/AbstractFacetResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetRequest.java index 8827d719e..9643cc611 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetResult.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetResult.java index 84cd55930..238a8109f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetResult.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetType.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetType.java index 4a6914e0a..dd296df53 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetType.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/FacetType.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequest.java index eeae24238..b6cce7f8f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,4 +69,4 @@ public class HistogramFacetRequest extends AbstractFacetRequest { return dateHistogramBuilder; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequestBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequestBuilder.java index 0c339cc29..7060ea24c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequestBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/HistogramFacetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,4 +55,4 @@ public class HistogramFacetRequestBuilder { result.setApplyQueryFilter(true); return this; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/NativeFacetRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/NativeFacetRequest.java index efba14a0c..b78acaa05 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/NativeFacetRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/NativeFacetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequest.java index d8d5e5b16..a5d5e23a4 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequestBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequestBuilder.java index 63b8ce916..09a30673a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequestBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/RangeFacetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,4 +82,4 @@ public class RangeFacetRequestBuilder { public FacetRequest build() { return result; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequest.java index d514becef..e66accd52 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,4 +49,4 @@ public class StatisticalFacetRequest extends AbstractFacetRequest { Assert.isTrue(!StringUtils.isEmpty(field) && fields == null, "Please select field or fields on which to build the facets !!!"); return AggregationBuilders.extendedStats(getName()).field(field); } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequestBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequestBuilder.java index 8baa91027..67aa09c40 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequestBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/StatisticalFacetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,4 +49,4 @@ public class StatisticalFacetRequestBuilder { public FacetRequest build() { return result; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetOrder.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetOrder.java index 064c40247..501f3c19d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetOrder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetOrder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequest.java index 19bef1480..d42cf7a08 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequestBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequestBuilder.java index 343db81aa..a6b7beb1d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequestBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/request/TermFacetRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,4 +85,4 @@ public class TermFacetRequestBuilder { public FacetRequest build() { return result; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/HistogramResult.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/HistogramResult.java index 1114158a4..e5e4197a3 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/HistogramResult.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/HistogramResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/IntervalUnit.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/IntervalUnit.java index b439a881e..9212fa4ae 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/IntervalUnit.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/IntervalUnit.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Range.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Range.java index 166e97e58..0a1cbf1fe 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Range.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Range.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/RangeResult.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/RangeResult.java index db2b2e2cb..97ea4ba81 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/RangeResult.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/RangeResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/StatisticalResult.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/StatisticalResult.java index 28f188686..d5ad314fc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/StatisticalResult.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/StatisticalResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Term.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Term.java index 6bc87bfd4..ed2312f61 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Term.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/Term.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/TermResult.java b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/TermResult.java index 12653abba..313e62e25 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/facet/result/TermResult.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/facet/result/TermResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java index 82ac41ca3..ea59e3985 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java index bbc862a9a..f53bb9363 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java index 6d07c3b1c..d0e1d0db5 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java index fb38c8eb5..0dd8ca02d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java index 1de14ef94..2ebb8bf9e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java index cbefb7450..39a2fd479 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java index d9ab47f9f..4ae6dc1cf 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/AbstractQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/AbstractQuery.java index b8bcfd52b..ea76497b2 100755 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/AbstractQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/AbstractQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/AliasBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/AliasBuilder.java index d139cf5e0..f4dd696e9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/AliasBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/AliasBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/AliasQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/AliasQuery.java index 4b65c72ee..1a3be8ec7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/AliasQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/AliasQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java b/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java index 8da40560b..d20b28b1a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.java index 00b5cb159..cda1a9dc8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/DeleteQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/DeleteQuery.java index be2cae43b..3e787a7b2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/DeleteQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/DeleteQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilter.java b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilter.java index 75e94f673..e8e87a843 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilter.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilterBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilterBuilder.java index fe288985f..7e71c392f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilterBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilterBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/Field.java b/src/main/java/org/springframework/data/elasticsearch/core/query/Field.java index 33c097da6..8abb380fa 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/Field.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/Field.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/GetQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/GetQuery.java index 322ccaf67..68157cd46 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/GetQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/GetQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexBoost.java b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexBoost.java index fd2e0c3a4..a1b529ec9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexBoost.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexBoost.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQuery.java index 69a0b9119..8981d4178 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQueryBuilder.java index 1e82a2a6b..13559789e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQueryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/MoreLikeThisQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/MoreLikeThisQuery.java index 610e3171c..88c3abeb4 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/MoreLikeThisQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/MoreLikeThisQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQuery.java index a54b80111..b500f9707 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilder.java index 4326fb441..ed799f10d 100755 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/Query.java b/src/main/java/org/springframework/data/elasticsearch/core/query/Query.java index 27d2aeae7..173edf94d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/Query.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/Query.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/SearchQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SearchQuery.java index 2e6487760..58c514a40 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SearchQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SearchQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/SimpleField.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SimpleField.java index c4bf75960..cded72c00 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SimpleField.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SimpleField.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,4 +38,4 @@ public class SimpleField implements Field { public String toString() { return this.name; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/SourceFilter.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SourceFilter.java index 7b232db59..d8da44dde 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SourceFilter.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SourceFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/StringQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/StringQuery.java index 5ad650750..ed0872779 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/StringQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/StringQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.java index e6e79bd8e..8044ae11e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQueryBuilder.java index f68ac21bf..aa89b71aa 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQueryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchCrudRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchCrudRepository.java index 19f70fdda..70a5d475d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchCrudRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchCrudRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchRepository.java index 1fd9ab55a..e6da8ac03 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.java b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.java index 770dff2e8..ec255989c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.java b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.java index aaf37dbe2..ac819716d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoriesRegistrar.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoriesRegistrar.java index 1ff41a654..49bdd39ce 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoriesRegistrar.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoriesRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoryConfigExtension.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoryConfigExtension.java index ea6baebd4..824f20a9a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoryConfigExtension.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoryConfigExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableElasticsearchRepositories.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableElasticsearchRepositories.java index 9974401bc..651d05ec7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableElasticsearchRepositories.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableElasticsearchRepositories.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractElasticsearchRepositoryQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractElasticsearchRepositoryQuery.java index 5f9a9b54c..ca95b93e2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractElasticsearchRepositoryQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractElasticsearchRepositoryQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchPartQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchPartQuery.java index b4123d94d..bef93f43f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchPartQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchPartQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethod.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethod.java index 0aa6ba0d1..22a973751 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethod.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQuery.java index c7555ae84..8dcbfb2cf 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/query/parser/ElasticsearchQueryCreator.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/parser/ElasticsearchQueryCreator.java index 65616df87..5f6191df8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/parser/ElasticsearchQueryCreator.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/parser/ElasticsearchQueryCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java index e51de0e15..2b9dda998 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformation.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformation.java index c30ee73df..8b19dc98f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformation.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreator.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreator.java index 6bdc78b24..22899b0f5 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreator.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImpl.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImpl.java index 46421e0ed..d91a354af 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImpl.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactory.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactory.java index ddc5861af..0c705042e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactory.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryBean.java index 991c263b6..515c7766d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/MappingElasticsearchEntityInformation.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/MappingElasticsearchEntityInformation.java index b1e82b08b..bde63ca39 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/MappingElasticsearchEntityInformation.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/MappingElasticsearchEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java index 1e3eb5064..75a802e2e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/resources/notice.txt b/src/main/resources/notice.txt index 5922c578b..da988b6ad 100644 --- a/src/main/resources/notice.txt +++ b/src/main/resources/notice.txt @@ -1,5 +1,5 @@ Spring Data Elasticsearch 3.2 M1 -Copyright (c) [2013-2016] Pivotal Software, Inc. +Copyright (c) [2013-2019] Pivotal Software, Inc. This product is licensed to you under the Apache License, Version 2.0 (the "License"). You may not use this product except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersion.java b/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersion.java index 6675e6027..81664125a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersion.java +++ b/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersion.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersionRule.java b/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersionRule.java index 19c6f179e..8e1ce09f3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersionRule.java +++ b/src/test/java/org/springframework/data/elasticsearch/ElasticsearchVersionRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/InnerObjectTests.java b/src/test/java/org/springframework/data/elasticsearch/InnerObjectTests.java index 024059eeb..bd1b4c6ef 100644 --- a/src/test/java/org/springframework/data/elasticsearch/InnerObjectTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/InnerObjectTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/NestedObjectTests.java b/src/test/java/org/springframework/data/elasticsearch/NestedObjectTests.java index 066178c84..0c41ba768 100644 --- a/src/test/java/org/springframework/data/elasticsearch/NestedObjectTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/NestedObjectTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/NonDocumentEntityTests.java b/src/test/java/org/springframework/data/elasticsearch/NonDocumentEntityTests.java index e1ce1bdf5..12d1e52f3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/NonDocumentEntityTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/NonDocumentEntityTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/SpELEntityTests.java b/src/test/java/org/springframework/data/elasticsearch/SpELEntityTests.java index 7968b0c55..25fb2ddc3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/SpELEntityTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/SpELEntityTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/TestUtils.java b/src/test/java/org/springframework/data/elasticsearch/TestUtils.java index d8db1e716..7f61eb099 100644 --- a/src/test/java/org/springframework/data/elasticsearch/TestUtils.java +++ b/src/test/java/org/springframework/data/elasticsearch/TestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/Utils.java b/src/test/java/org/springframework/data/elasticsearch/Utils.java index a11a2a3d6..cab46a82a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/Utils.java +++ b/src/test/java/org/springframework/data/elasticsearch/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/builder/SampleInheritedEntityBuilder.java b/src/test/java/org/springframework/data/elasticsearch/builder/SampleInheritedEntityBuilder.java index e36672ffc..68cae4733 100644 --- a/src/test/java/org/springframework/data/elasticsearch/builder/SampleInheritedEntityBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/builder/SampleInheritedEntityBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.java index 58ef16304..97ca27637 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/ClusterNodesUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/ClusterNodesUnitTests.java index 6159516c5..877c5a279 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/ClusterNodesUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/ClusterNodesUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.java index 5b2ae5cb3..47268005b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProviderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProviderUnitTests.java index 86bb568e0..ead3c390a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProviderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/reactive/DefaultWebClientProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProviderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProviderUnitTests.java index 6662b5aef..d7ce5b32c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProviderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/reactive/MultiNodeHostProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientTests.java b/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientTests.java index 83fdb4d9d..13bbc5be0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientUnitTests.java index 803ee24cc..0e1334d2e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveElasticsearchClientUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveMockClientTestsUtils.java b/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveMockClientTestsUtils.java index 2cc6b9bd5..7dce1a63e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveMockClientTestsUtils.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/reactive/ReactiveMockClientTestsUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProviderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProviderUnitTests.java index 8532ed770..a10515eef 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProviderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/reactive/SingleNodeHostProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.java index 45bc18dd8..e245edc56 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandlerTests.java b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandlerTests.java index 9c948d7fd..4485fef1e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandlerTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandlerTests.java @@ -1,63 +1,63 @@ -/* - * Copyright 2013-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.config; - -import static org.hamcrest.CoreMatchers.*; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.*; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.data.elasticsearch.client.RestClientFactoryBean; -import org.springframework.data.elasticsearch.client.TransportClientFactoryBean; -import org.springframework.data.elasticsearch.repositories.sample.SampleElasticsearchRepository; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -/** - * @author Rizwan Idrees - * @author Mohsin Husen - * @author Don Wellington - */ - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("namespace.xml") -public class ElasticsearchNamespaceHandlerTests { - - @Autowired - private ApplicationContext context; - - @Test - public void shouldCreateTransportClient() { - assertThat(context.getBean(TransportClientFactoryBean.class), is(notNullValue())); - assertThat(context.getBean(TransportClientFactoryBean.class), is(instanceOf(TransportClientFactoryBean.class))); - } - - @Test - public void shouldCreateRepository() { - assertThat(context.getBean(TransportClientFactoryBean.class), is(notNullValue())); - assertThat(context.getBean(SampleElasticsearchRepository.class), - is(instanceOf(SampleElasticsearchRepository.class))); - } - - @Test - public void shouldCreateRestClient() { - assertThat(context.getBean(RestClientFactoryBean.class), is(notNullValue())); - assertThat(context.getBean(RestClientFactoryBean.class), is(instanceOf(RestClientFactoryBean.class))); - } -} +/* + * Copyright 2013-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.config; + +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.data.elasticsearch.client.RestClientFactoryBean; +import org.springframework.data.elasticsearch.client.TransportClientFactoryBean; +import org.springframework.data.elasticsearch.repositories.sample.SampleElasticsearchRepository; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +/** + * @author Rizwan Idrees + * @author Mohsin Husen + * @author Don Wellington + */ + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("namespace.xml") +public class ElasticsearchNamespaceHandlerTests { + + @Autowired + private ApplicationContext context; + + @Test + public void shouldCreateTransportClient() { + assertThat(context.getBean(TransportClientFactoryBean.class), is(notNullValue())); + assertThat(context.getBean(TransportClientFactoryBean.class), is(instanceOf(TransportClientFactoryBean.class))); + } + + @Test + public void shouldCreateRepository() { + assertThat(context.getBean(TransportClientFactoryBean.class), is(notNullValue())); + assertThat(context.getBean(SampleElasticsearchRepository.class), + is(instanceOf(SampleElasticsearchRepository.class))); + } + + @Test + public void shouldCreateRestClient() { + assertThat(context.getBean(RestClientFactoryBean.class), is(notNullValue())); + assertThat(context.getBean(RestClientFactoryBean.class), is(instanceOf(RestClientFactoryBean.class))); + } +} diff --git a/src/test/java/org/springframework/data/elasticsearch/config/EnableNestedElasticsearchRepositoriesTests.java b/src/test/java/org/springframework/data/elasticsearch/config/EnableNestedElasticsearchRepositoriesTests.java index d611e8891..840238ea2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/EnableNestedElasticsearchRepositoriesTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/EnableNestedElasticsearchRepositoriesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/AliasTests.java b/src/test/java/org/springframework/data/elasticsearch/core/AliasTests.java index d866ddee8..f59788c18 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/AliasTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/AliasTests.java @@ -1,5 +1,5 @@ /* -* Copyright 2014-2017 the original author or authors. +* Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/CustomEntityMapper.java b/src/test/java/org/springframework/data/elasticsearch/core/CustomEntityMapper.java index 45c108cf1..4cd6390ba 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/CustomEntityMapper.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/CustomEntityMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/CustomResultMapper.java b/src/test/java/org/springframework/data/elasticsearch/core/CustomResultMapper.java index 5b86cdfe7..5417843b6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/CustomResultMapper.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/CustomResultMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/DefaultEntityMapperTests.java b/src/test/java/org/springframework/data/elasticsearch/core/DefaultEntityMapperTests.java index b07cb1eb4..bf2484247 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/DefaultEntityMapperTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/DefaultEntityMapperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/DefaultResultMapperTests.java b/src/test/java/org/springframework/data/elasticsearch/core/DefaultResultMapperTests.java index 38ba2f7b3..6f7cce3a2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/DefaultResultMapperTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/DefaultResultMapperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateTests.java index 6bd7fbedb..8d8abe506 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCustomMapperTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCustomMapperTests.java index dc2692637..65d2a0d60 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCustomMapperTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCustomMapperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateParentChildTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateParentChildTests.java index 71d0eab52..5354280fd 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateParentChildTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateParentChildTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateTests.java index d3a1b13b5..58ef688b2 100755 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/LogEntityTests.java b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityTests.java index ae110ad38..4c76a9361 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/LogEntityTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/MappingBuilderTests.java b/src/test/java/org/springframework/data/elasticsearch/core/MappingBuilderTests.java index c9311270c..2d410dd86 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/MappingBuilderTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/MappingBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateTests.java index 580bf8a7d..5cd3f073f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java index 86ba07a47..e4cae19d6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTests.java index 1262e201f..620430010 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregatedPageImplTest.java b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregatedPageImplTest.java index 9c9d12045..e66513d70 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregatedPageImplTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregatedPageImplTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/ElasticsearchTemplateAggregationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/ElasticsearchTemplateAggregationTests.java index 6cace5395..86bd3c624 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/ElasticsearchTemplateAggregationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/ElasticsearchTemplateAggregationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/completion/AnnotatedCompletionEntityBuilder.java b/src/test/java/org/springframework/data/elasticsearch/core/completion/AnnotatedCompletionEntityBuilder.java index ed6217149..348542f8e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/completion/AnnotatedCompletionEntityBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/completion/AnnotatedCompletionEntityBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityAnnotatedBuilder.java b/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityAnnotatedBuilder.java index f075c32cf..b9ec41746 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityAnnotatedBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityAnnotatedBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityBuilder.java b/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityBuilder.java index 9d0db0951..584f01ed0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionEntityBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/completion/ElasticsearchTemplateCompletionTests.java b/src/test/java/org/springframework/data/elasticsearch/core/completion/ElasticsearchTemplateCompletionTests.java index b83d52b52..326db56d4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/completion/ElasticsearchTemplateCompletionTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/completion/ElasticsearchTemplateCompletionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/convert/DateTimeConvertersTests.java b/src/test/java/org/springframework/data/elasticsearch/core/convert/DateTimeConvertersTests.java index 5c53b3e1e..f7cdf82f4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/convert/DateTimeConvertersTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/convert/DateTimeConvertersTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterTests.java b/src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterTests.java index f0f76988e..a304c4245 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntity.java b/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntity.java index 5a64c1ebe..1181f5266 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntityBuilder.java b/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntityBuilder.java index 65d00f72a..53896fac7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntityBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/facet/ArticleEntityBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/facet/ElasticsearchTemplateFacetTests.java b/src/test/java/org/springframework/data/elasticsearch/core/facet/ElasticsearchTemplateFacetTests.java index c398e979b..24e2c8405 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/facet/ElasticsearchTemplateFacetTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/facet/ElasticsearchTemplateFacetTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntity.java b/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntity.java index fe5845692..82afddaba 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntityBuilder.java b/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntityBuilder.java index 65032e4dc..dde6c0bcb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntityBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/facet/LogEntityBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntity.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntity.java index 82be3b62e..0cdd50574 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntityBuilder.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntityBuilder.java index 209e5e5a2..d38776f8a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntityBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/AuthorMarkerEntityBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/ElasticsearchTemplateGeoTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/ElasticsearchTemplateGeoTests.java index 97c860258..94332dcac 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/ElasticsearchTemplateGeoTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/ElasticsearchTemplateGeoTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/LocationMarkerEntity.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/LocationMarkerEntity.java index 2d53a3123..3bf8bafd1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/LocationMarkerEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/LocationMarkerEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.java index 72a0e3bed..7e1143bba 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2018 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java index d79274926..5ef149919 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryTests.java index 319973d34..cff106843 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/AbstractInheritedEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/AbstractInheritedEntity.java index a11d33a8e..8407e5893 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/AbstractInheritedEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/AbstractInheritedEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/Author.java b/src/test/java/org/springframework/data/elasticsearch/entities/Author.java index 5507385e5..bbecfa16c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/Author.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/Author.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/Book.java b/src/test/java/org/springframework/data/elasticsearch/entities/Book.java index 43d4ab20d..263049cef 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/Book.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/Book.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/Car.java b/src/test/java/org/springframework/data/elasticsearch/entities/Car.java index 9a8d82cec..466dc45ec 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/Car.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/Car.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/CopyToEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/CopyToEntity.java index d11551ec8..21c7af317 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/CopyToEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/CopyToEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/DoubleIDEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/DoubleIDEntity.java index 09b477ace..c78d77d9e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/DoubleIDEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/DoubleIDEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/DynamicSettingAndMappingEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/DynamicSettingAndMappingEntity.java index 6778eb543..6139c060e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/DynamicSettingAndMappingEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/DynamicSettingAndMappingEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/FieldDynamicMappingEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/FieldDynamicMappingEntity.java index 53400b420..5a97b72a2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/FieldDynamicMappingEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/FieldDynamicMappingEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/GirlFriend.java b/src/test/java/org/springframework/data/elasticsearch/entities/GirlFriend.java index 9613678ca..a2ac1bb97 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/GirlFriend.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/GirlFriend.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/Group.java b/src/test/java/org/springframework/data/elasticsearch/entities/Group.java index 148048e8a..2e1bc6d48 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/Group.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/Group.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity1.java b/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity1.java index ea16d0722..aaeccbca7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity1.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity1.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity2.java b/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity2.java index 9b4eea1ba..34497db40 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity2.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/HetroEntity2.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/IntegerIDEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/IntegerIDEntity.java index 4dabee8f1..f1faabc7b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/IntegerIDEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/IntegerIDEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/MinimalEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/MinimalEntity.java index ab4884d14..4a34b14f2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/MinimalEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/MinimalEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/NonDocumentEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/NonDocumentEntity.java index 7391fb8fb..5cd5ccf0c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/NonDocumentEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/NonDocumentEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/NormalizerEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/NormalizerEntity.java index 9cf75c074..322730230 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/NormalizerEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/NormalizerEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/ParentEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/ParentEntity.java index e02e2b384..d54aaa959 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/ParentEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/ParentEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/Person.java b/src/test/java/org/springframework/data/elasticsearch/entities/Person.java index 6bfa325dd..b39f4cc47 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/Person.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/Person.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/PersonMultipleLevelNested.java b/src/test/java/org/springframework/data/elasticsearch/entities/PersonMultipleLevelNested.java index c37b88e6f..7d7ee13a2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/PersonMultipleLevelNested.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/PersonMultipleLevelNested.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/Product.java b/src/test/java/org/springframework/data/elasticsearch/entities/Product.java index 352a4038e..219332df8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/Product.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/Product.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntity.java index 344735f06..2c5042d8f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntityUUIDKeyed.java b/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntityUUIDKeyed.java index d88f909b9..fd6c4ce16 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntityUUIDKeyed.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SampleEntityUUIDKeyed.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SampleInheritedEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/SampleInheritedEntity.java index 08400dede..f351da615 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SampleInheritedEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SampleInheritedEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SampleMappingEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/SampleMappingEntity.java index d66245664..b50aa1e2e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SampleMappingEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SampleMappingEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SampleTransientEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/SampleTransientEntity.java index 7dc73908c..495c90e04 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SampleTransientEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SampleTransientEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SimpleRecursiveEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/SimpleRecursiveEntity.java index e0f9d314e..94202b165 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SimpleRecursiveEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SimpleRecursiveEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SpELEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/SpELEntity.java index b423727ad..b03e38425 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SpELEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SpELEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/StockPrice.java b/src/test/java/org/springframework/data/elasticsearch/entities/StockPrice.java index b1ce59267..5ea740641 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/StockPrice.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/StockPrice.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/SynonymEntity.java b/src/test/java/org/springframework/data/elasticsearch/entities/SynonymEntity.java index 684d29c51..cb8ced45b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/SynonymEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/SynonymEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/entities/User.java b/src/test/java/org/springframework/data/elasticsearch/entities/User.java index 9d3ba3868..c35e3f088 100644 --- a/src/test/java/org/springframework/data/elasticsearch/entities/User.java +++ b/src/test/java/org/springframework/data/elasticsearch/entities/User.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepository.java b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepository.java index 41f39be1c..9b00e08f1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepositoryTests.java index d9ff3aba7..afd8a98db 100644 --- a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableElasticsearchRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableEntity.java b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableEntity.java index f066c3ecf..3e159a5ae 100644 --- a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryBaseTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryBaseTests.java index 76d4b9611..078201146 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryBaseTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryBaseTests.java @@ -1,1202 +1,1202 @@ -/* - * Copyright 2013-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.repositories; - -import static org.apache.commons.lang.RandomStringUtils.*; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.stream.Stream; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.data.domain.Sort; -import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; -import org.springframework.data.elasticsearch.core.geo.GeoPoint; -import org.springframework.data.elasticsearch.entities.SampleEntity; -import org.springframework.data.elasticsearch.repositories.custom.SampleCustomMethodRepository; -import org.springframework.data.geo.Box; -import org.springframework.data.geo.Distance; -import org.springframework.data.geo.Metrics; -import org.springframework.data.geo.Point; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -/** - * @author Rizwan Idrees - * @author Mohsin Husen - * @author Franck Marchand - * @author Kevin Leturc - * @author Christoph Strobl - * @author Don Wellington - */ - -public abstract class CustomMethodRepositoryBaseTests { - - @Autowired private SampleCustomMethodRepository repository; - - @Test - public void shouldExecuteCustomMethod() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("some message"); - repository.save(sampleEntity); - // when - Page page = repository.findByType("test", new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(greaterThanOrEqualTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodForNot() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("some"); - sampleEntity.setMessage("some message"); - repository.save(sampleEntity); - // when - Page page = repository.findByTypeNot("test", new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithQuery() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - String searchTerm = "customQuery"; - sampleEntity.setMessage(searchTerm); - repository.save(sampleEntity); - // when - Page page = repository.findByMessage(searchTerm.toLowerCase(), new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(greaterThanOrEqualTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithLessThan() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(9); - sampleEntity.setMessage("some message"); - repository.save(sampleEntity); - - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setRate(20); - sampleEntity2.setMessage("some message"); - repository.save(sampleEntity2); - - // when - Page page = repository.findByRateLessThan(10, new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithBefore() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("some message"); - repository.save(sampleEntity); - - // when - Page page = repository.findByRateBefore(10, new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithAfter() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("some message"); - repository.save(sampleEntity); - - // when - Page page = repository.findByRateAfter(10, new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithLike() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // when - Page page = repository.findByMessageLike("fo", new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodForStartingWith() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // when - Page page = repository.findByMessageStartingWith("fo", new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodForEndingWith() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // when - Page page = repository.findByMessageEndingWith("o", new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodForContains() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // when - Page page = repository.findByMessageContaining("fo", new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodForIn() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - repository.save(sampleEntity2); - - List ids = Arrays.asList(documentId, documentId2); - - // when - Page page = repository.findByIdIn(ids, new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(2L))); - } - - @Test - public void shouldExecuteCustomMethodForNotIn() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - repository.save(sampleEntity2); - - List ids = Arrays.asList(documentId); - - // when - Page page = repository.findByIdNotIn(ids, new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - assertThat(page.getContent().get(0).getId(), is(documentId2)); - } - - @Test - public void shouldExecuteCustomMethodForTrue() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - sampleEntity.setAvailable(true); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - sampleEntity2.setAvailable(false); - repository.save(sampleEntity2); - // when - Page page = repository.findByAvailableTrue(new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodForFalse() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - sampleEntity.setAvailable(true); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - sampleEntity2.setAvailable(false); - repository.save(sampleEntity2); - // when - Page page = repository.findByAvailableFalse(new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodForOrderBy() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("abc"); - sampleEntity.setMessage("test"); - sampleEntity.setAvailable(true); - repository.save(sampleEntity); - - // document 2 - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("xyz"); - sampleEntity2.setMessage("bar"); - sampleEntity2.setAvailable(false); - repository.save(sampleEntity2); - - // document 3 - String documentId3 = randomNumeric(5); - SampleEntity sampleEntity3 = new SampleEntity(); - sampleEntity3.setId(documentId3); - sampleEntity3.setType("def"); - sampleEntity3.setMessage("foo"); - sampleEntity3.setAvailable(false); - repository.save(sampleEntity3); - - // when - Page page = repository.findByMessageOrderByTypeAsc("foo", new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithBooleanParameter() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - sampleEntity.setAvailable(true); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - sampleEntity2.setAvailable(false); - repository.save(sampleEntity2); - // when - Page page = repository.findByAvailable(false, new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldReturnPageableResultsWithQueryAnnotationExpectedPageSize() { - // given - for (int i = 0; i < 30; i++) { - String documentId = String.valueOf(i); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setMessage("message"); - sampleEntity.setVersion(System.currentTimeMillis()); - repository.save(sampleEntity); - } - // when - Page pageResult = repository.findByMessage("message", new PageRequest(0, 23)); - // then - assertThat(pageResult.getTotalElements(), is(equalTo(30L))); - assertThat(pageResult.getContent().size(), is(equalTo(23))); - } - - @Test - public void shouldReturnPageableResultsWithGivenSortingOrder() { - // given - String documentId = random(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setMessage("abc"); - sampleEntity.setVersion(System.currentTimeMillis()); - repository.save(sampleEntity); - - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setMessage("abd"); - sampleEntity.setVersion(System.currentTimeMillis()); - repository.save(sampleEntity2); - - String documentId3 = randomNumeric(5); - SampleEntity sampleEntity3 = new SampleEntity(); - sampleEntity3.setId(documentId3); - sampleEntity3.setMessage("abe"); - sampleEntity.setVersion(System.currentTimeMillis()); - repository.save(sampleEntity3); - // when - Page pageResult = repository.findByMessageContaining("a", - new PageRequest(0, 23, new Sort(new Sort.Order(Sort.Direction.DESC, "message")))); - // then - assertThat(pageResult.getContent().isEmpty(), is(false)); - assertThat(pageResult.getContent().get(0).getMessage(), is(sampleEntity3.getMessage())); - } - - @Test - public void shouldReturnListForMessage() { - // given - String documentId = random(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setMessage("abc"); - sampleEntity.setVersion(System.currentTimeMillis()); - repository.save(sampleEntity); - - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setMessage("abd"); - sampleEntity.setVersion(System.currentTimeMillis()); - repository.save(sampleEntity2); - - String documentId3 = randomNumeric(5); - SampleEntity sampleEntity3 = new SampleEntity(); - sampleEntity3.setId(documentId3); - sampleEntity3.setMessage("abe"); - sampleEntity.setVersion(System.currentTimeMillis()); - repository.save(sampleEntity3); - // when - List sampleEntities = repository.findByMessage("abc"); - // then - assertThat(sampleEntities.isEmpty(), is(false)); - assertThat(sampleEntities.size(), is(1)); - } - - @Test - public void shouldExecuteCustomMethodWithGeoPoint() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - // when - Page page = repository.findByLocation(new GeoPoint(45.7806d, 3.0875d), new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithGeoPointAndString() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(48.7806d, 3.0875d)); - - repository.save(sampleEntity); - - // when - Page page = repository.findByLocationAndMessage(new GeoPoint(45.7806d, 3.0875d), "foo", - new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithWithinGeoPoint() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - // when - Page page = repository.findByLocationWithin(new GeoPoint(45.7806d, 3.0875d), "2km", - new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithWithinPoint() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - // when - Page page = repository.findByLocationWithin(new Point(45.7806d, 3.0875d), - new Distance(2, Metrics.KILOMETERS), new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithNearBox() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test2"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("foo"); - sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); - - repository.save(sampleEntity2); - - // when - Page pageAll = repository.findAll(new PageRequest(0, 10)); - // then - assertThat(pageAll, is(notNullValue())); - assertThat(pageAll.getTotalElements(), is(equalTo(2L))); - - // when - Page page = repository.findByLocationNear(new Box(new Point(46d, 3d), new Point(45d, 4d)), - new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - @Test - public void shouldExecuteCustomMethodWithNearPointAndDistance() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - // when - Page page = repository.findByLocationNear(new Point(45.7806d, 3.0875d), - new Distance(2, Metrics.KILOMETERS), new PageRequest(0, 10)); - // then - assertThat(page, is(notNullValue())); - assertThat(page.getTotalElements(), is(equalTo(1L))); - } - - /* - DATAES-165 - */ - @Test - public void shouldAllowReturningJava8StreamInCustomQuery() { - // given - List entities = createSampleEntities("abc", 30); - repository.saveAll(entities); - - // when - Stream stream = repository.findByType("abc"); - // then - assertThat(stream, is(notNullValue())); - assertThat(stream.count(), is(equalTo(30L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethod() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("some message"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test2"); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByType("test"); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForNot() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("some"); - sampleEntity.setMessage("some message"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByTypeNot("test"); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithBooleanParameter() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - sampleEntity.setAvailable(true); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - sampleEntity2.setAvailable(false); - repository.save(sampleEntity2); - // when - long count = repository.countByAvailable(false); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithLessThan() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(9); - sampleEntity.setMessage("some message"); - repository.save(sampleEntity); - - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setRate(20); - sampleEntity2.setMessage("some message"); - repository.save(sampleEntity2); - - // when - long count = repository.countByRateLessThan(10); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithBefore() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("some message"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(20); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByRateBefore(10); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithAfter() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("some message"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(0); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByRateAfter(10); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithLike() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByMessageLike("fo"); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForStartingWith() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByMessageStartingWith("fo"); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForEndingWith() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByMessageEndingWith("o"); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForContains() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("some message"); - - repository.save(sampleEntity2); - - // when - long count = repository.countByMessageContaining("fo"); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForIn() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - repository.save(sampleEntity2); - - List ids = Arrays.asList(documentId, documentId2); - - // when - long count = repository.countByIdIn(ids); - // then - assertThat(count, is(equalTo(2L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForNotIn() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - repository.save(sampleEntity2); - - List ids = Arrays.asList(documentId); - - // when - long count = repository.countByIdNotIn(ids); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForTrue() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - sampleEntity.setAvailable(true); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - sampleEntity2.setAvailable(false); - repository.save(sampleEntity2); - // when - long count = repository.countByAvailableTrue(); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodForFalse() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setMessage("foo"); - sampleEntity.setAvailable(true); - repository.save(sampleEntity); - - // given - String documentId2 = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId2); - sampleEntity2.setType("test"); - sampleEntity2.setMessage("bar"); - sampleEntity2.setAvailable(false); - repository.save(sampleEntity2); - // when - long count = repository.countByAvailableFalse(); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithWithinGeoPoint() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("foo"); - sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); - - repository.save(sampleEntity2); - - // when - long count = repository.countByLocationWithin(new GeoPoint(45.7806d, 3.0875d), "2km"); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithWithinPoint() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("foo"); - sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); - - repository.save(sampleEntity2); - - // when - long count = repository.countByLocationWithin(new Point(45.7806d, 3.0875d), new Distance(2, Metrics.KILOMETERS)); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithNearBox() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test2"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("foo"); - sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); - - repository.save(sampleEntity2); - - // when - long count = repository.countByLocationNear(new Box(new Point(46d, 3d), new Point(45d, 4d))); - // then - assertThat(count, is(equalTo(1L))); - } - - /* - DATAES-106 - */ - @Test - public void shouldCountCustomMethodWithNearPointAndDistance() { - // given - String documentId = randomNumeric(5); - SampleEntity sampleEntity = new SampleEntity(); - sampleEntity.setId(documentId); - sampleEntity.setType("test"); - sampleEntity.setRate(10); - sampleEntity.setMessage("foo"); - sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); - - repository.save(sampleEntity); - - documentId = randomNumeric(5); - SampleEntity sampleEntity2 = new SampleEntity(); - sampleEntity2.setId(documentId); - sampleEntity2.setType("test"); - sampleEntity2.setRate(10); - sampleEntity2.setMessage("foo"); - sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); - - repository.save(sampleEntity2); - - // when - long count = repository.countByLocationNear(new Point(45.7806d, 3.0875d), new Distance(2, Metrics.KILOMETERS)); - // then - assertThat(count, is(equalTo(1L))); - } - - private List createSampleEntities(String type, int numberOfEntities) { - List entities = new ArrayList<>(); - for (int i = 0; i < numberOfEntities; i++) { - SampleEntity entity = new SampleEntity(); - entity.setId(randomNumeric(numberOfEntities)); - entity.setAvailable(true); - entity.setMessage("Message"); - entity.setType(type); - entities.add(entity); - } - return entities; - } -} +/* + * Copyright 2013-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.repositories; + +import static org.apache.commons.lang.RandomStringUtils.*; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Stream; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Sort; +import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; +import org.springframework.data.elasticsearch.core.geo.GeoPoint; +import org.springframework.data.elasticsearch.entities.SampleEntity; +import org.springframework.data.elasticsearch.repositories.custom.SampleCustomMethodRepository; +import org.springframework.data.geo.Box; +import org.springframework.data.geo.Distance; +import org.springframework.data.geo.Metrics; +import org.springframework.data.geo.Point; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +/** + * @author Rizwan Idrees + * @author Mohsin Husen + * @author Franck Marchand + * @author Kevin Leturc + * @author Christoph Strobl + * @author Don Wellington + */ + +public abstract class CustomMethodRepositoryBaseTests { + + @Autowired private SampleCustomMethodRepository repository; + + @Test + public void shouldExecuteCustomMethod() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("some message"); + repository.save(sampleEntity); + // when + Page page = repository.findByType("test", new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(greaterThanOrEqualTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodForNot() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("some"); + sampleEntity.setMessage("some message"); + repository.save(sampleEntity); + // when + Page page = repository.findByTypeNot("test", new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithQuery() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + String searchTerm = "customQuery"; + sampleEntity.setMessage(searchTerm); + repository.save(sampleEntity); + // when + Page page = repository.findByMessage(searchTerm.toLowerCase(), new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(greaterThanOrEqualTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithLessThan() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(9); + sampleEntity.setMessage("some message"); + repository.save(sampleEntity); + + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setRate(20); + sampleEntity2.setMessage("some message"); + repository.save(sampleEntity2); + + // when + Page page = repository.findByRateLessThan(10, new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithBefore() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("some message"); + repository.save(sampleEntity); + + // when + Page page = repository.findByRateBefore(10, new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithAfter() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("some message"); + repository.save(sampleEntity); + + // when + Page page = repository.findByRateAfter(10, new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithLike() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // when + Page page = repository.findByMessageLike("fo", new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodForStartingWith() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // when + Page page = repository.findByMessageStartingWith("fo", new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodForEndingWith() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // when + Page page = repository.findByMessageEndingWith("o", new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodForContains() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // when + Page page = repository.findByMessageContaining("fo", new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodForIn() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + repository.save(sampleEntity2); + + List ids = Arrays.asList(documentId, documentId2); + + // when + Page page = repository.findByIdIn(ids, new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(2L))); + } + + @Test + public void shouldExecuteCustomMethodForNotIn() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + repository.save(sampleEntity2); + + List ids = Arrays.asList(documentId); + + // when + Page page = repository.findByIdNotIn(ids, new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + assertThat(page.getContent().get(0).getId(), is(documentId2)); + } + + @Test + public void shouldExecuteCustomMethodForTrue() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + sampleEntity.setAvailable(true); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + sampleEntity2.setAvailable(false); + repository.save(sampleEntity2); + // when + Page page = repository.findByAvailableTrue(new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodForFalse() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + sampleEntity.setAvailable(true); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + sampleEntity2.setAvailable(false); + repository.save(sampleEntity2); + // when + Page page = repository.findByAvailableFalse(new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodForOrderBy() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("abc"); + sampleEntity.setMessage("test"); + sampleEntity.setAvailable(true); + repository.save(sampleEntity); + + // document 2 + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("xyz"); + sampleEntity2.setMessage("bar"); + sampleEntity2.setAvailable(false); + repository.save(sampleEntity2); + + // document 3 + String documentId3 = randomNumeric(5); + SampleEntity sampleEntity3 = new SampleEntity(); + sampleEntity3.setId(documentId3); + sampleEntity3.setType("def"); + sampleEntity3.setMessage("foo"); + sampleEntity3.setAvailable(false); + repository.save(sampleEntity3); + + // when + Page page = repository.findByMessageOrderByTypeAsc("foo", new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithBooleanParameter() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + sampleEntity.setAvailable(true); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + sampleEntity2.setAvailable(false); + repository.save(sampleEntity2); + // when + Page page = repository.findByAvailable(false, new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldReturnPageableResultsWithQueryAnnotationExpectedPageSize() { + // given + for (int i = 0; i < 30; i++) { + String documentId = String.valueOf(i); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setMessage("message"); + sampleEntity.setVersion(System.currentTimeMillis()); + repository.save(sampleEntity); + } + // when + Page pageResult = repository.findByMessage("message", new PageRequest(0, 23)); + // then + assertThat(pageResult.getTotalElements(), is(equalTo(30L))); + assertThat(pageResult.getContent().size(), is(equalTo(23))); + } + + @Test + public void shouldReturnPageableResultsWithGivenSortingOrder() { + // given + String documentId = random(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setMessage("abc"); + sampleEntity.setVersion(System.currentTimeMillis()); + repository.save(sampleEntity); + + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setMessage("abd"); + sampleEntity.setVersion(System.currentTimeMillis()); + repository.save(sampleEntity2); + + String documentId3 = randomNumeric(5); + SampleEntity sampleEntity3 = new SampleEntity(); + sampleEntity3.setId(documentId3); + sampleEntity3.setMessage("abe"); + sampleEntity.setVersion(System.currentTimeMillis()); + repository.save(sampleEntity3); + // when + Page pageResult = repository.findByMessageContaining("a", + new PageRequest(0, 23, new Sort(new Sort.Order(Sort.Direction.DESC, "message")))); + // then + assertThat(pageResult.getContent().isEmpty(), is(false)); + assertThat(pageResult.getContent().get(0).getMessage(), is(sampleEntity3.getMessage())); + } + + @Test + public void shouldReturnListForMessage() { + // given + String documentId = random(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setMessage("abc"); + sampleEntity.setVersion(System.currentTimeMillis()); + repository.save(sampleEntity); + + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setMessage("abd"); + sampleEntity.setVersion(System.currentTimeMillis()); + repository.save(sampleEntity2); + + String documentId3 = randomNumeric(5); + SampleEntity sampleEntity3 = new SampleEntity(); + sampleEntity3.setId(documentId3); + sampleEntity3.setMessage("abe"); + sampleEntity.setVersion(System.currentTimeMillis()); + repository.save(sampleEntity3); + // when + List sampleEntities = repository.findByMessage("abc"); + // then + assertThat(sampleEntities.isEmpty(), is(false)); + assertThat(sampleEntities.size(), is(1)); + } + + @Test + public void shouldExecuteCustomMethodWithGeoPoint() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + // when + Page page = repository.findByLocation(new GeoPoint(45.7806d, 3.0875d), new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithGeoPointAndString() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(48.7806d, 3.0875d)); + + repository.save(sampleEntity); + + // when + Page page = repository.findByLocationAndMessage(new GeoPoint(45.7806d, 3.0875d), "foo", + new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithWithinGeoPoint() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + // when + Page page = repository.findByLocationWithin(new GeoPoint(45.7806d, 3.0875d), "2km", + new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithWithinPoint() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + // when + Page page = repository.findByLocationWithin(new Point(45.7806d, 3.0875d), + new Distance(2, Metrics.KILOMETERS), new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithNearBox() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test2"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("foo"); + sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); + + repository.save(sampleEntity2); + + // when + Page pageAll = repository.findAll(new PageRequest(0, 10)); + // then + assertThat(pageAll, is(notNullValue())); + assertThat(pageAll.getTotalElements(), is(equalTo(2L))); + + // when + Page page = repository.findByLocationNear(new Box(new Point(46d, 3d), new Point(45d, 4d)), + new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + @Test + public void shouldExecuteCustomMethodWithNearPointAndDistance() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + // when + Page page = repository.findByLocationNear(new Point(45.7806d, 3.0875d), + new Distance(2, Metrics.KILOMETERS), new PageRequest(0, 10)); + // then + assertThat(page, is(notNullValue())); + assertThat(page.getTotalElements(), is(equalTo(1L))); + } + + /* + DATAES-165 + */ + @Test + public void shouldAllowReturningJava8StreamInCustomQuery() { + // given + List entities = createSampleEntities("abc", 30); + repository.saveAll(entities); + + // when + Stream stream = repository.findByType("abc"); + // then + assertThat(stream, is(notNullValue())); + assertThat(stream.count(), is(equalTo(30L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethod() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("some message"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test2"); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByType("test"); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForNot() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("some"); + sampleEntity.setMessage("some message"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByTypeNot("test"); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithBooleanParameter() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + sampleEntity.setAvailable(true); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + sampleEntity2.setAvailable(false); + repository.save(sampleEntity2); + // when + long count = repository.countByAvailable(false); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithLessThan() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(9); + sampleEntity.setMessage("some message"); + repository.save(sampleEntity); + + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setRate(20); + sampleEntity2.setMessage("some message"); + repository.save(sampleEntity2); + + // when + long count = repository.countByRateLessThan(10); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithBefore() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("some message"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(20); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByRateBefore(10); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithAfter() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("some message"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(0); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByRateAfter(10); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithLike() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByMessageLike("fo"); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForStartingWith() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByMessageStartingWith("fo"); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForEndingWith() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByMessageEndingWith("o"); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForContains() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("some message"); + + repository.save(sampleEntity2); + + // when + long count = repository.countByMessageContaining("fo"); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForIn() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + repository.save(sampleEntity2); + + List ids = Arrays.asList(documentId, documentId2); + + // when + long count = repository.countByIdIn(ids); + // then + assertThat(count, is(equalTo(2L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForNotIn() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + repository.save(sampleEntity2); + + List ids = Arrays.asList(documentId); + + // when + long count = repository.countByIdNotIn(ids); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForTrue() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + sampleEntity.setAvailable(true); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + sampleEntity2.setAvailable(false); + repository.save(sampleEntity2); + // when + long count = repository.countByAvailableTrue(); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodForFalse() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setMessage("foo"); + sampleEntity.setAvailable(true); + repository.save(sampleEntity); + + // given + String documentId2 = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId2); + sampleEntity2.setType("test"); + sampleEntity2.setMessage("bar"); + sampleEntity2.setAvailable(false); + repository.save(sampleEntity2); + // when + long count = repository.countByAvailableFalse(); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithWithinGeoPoint() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("foo"); + sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); + + repository.save(sampleEntity2); + + // when + long count = repository.countByLocationWithin(new GeoPoint(45.7806d, 3.0875d), "2km"); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithWithinPoint() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("foo"); + sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); + + repository.save(sampleEntity2); + + // when + long count = repository.countByLocationWithin(new Point(45.7806d, 3.0875d), new Distance(2, Metrics.KILOMETERS)); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithNearBox() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test2"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("foo"); + sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); + + repository.save(sampleEntity2); + + // when + long count = repository.countByLocationNear(new Box(new Point(46d, 3d), new Point(45d, 4d))); + // then + assertThat(count, is(equalTo(1L))); + } + + /* + DATAES-106 + */ + @Test + public void shouldCountCustomMethodWithNearPointAndDistance() { + // given + String documentId = randomNumeric(5); + SampleEntity sampleEntity = new SampleEntity(); + sampleEntity.setId(documentId); + sampleEntity.setType("test"); + sampleEntity.setRate(10); + sampleEntity.setMessage("foo"); + sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d)); + + repository.save(sampleEntity); + + documentId = randomNumeric(5); + SampleEntity sampleEntity2 = new SampleEntity(); + sampleEntity2.setId(documentId); + sampleEntity2.setType("test"); + sampleEntity2.setRate(10); + sampleEntity2.setMessage("foo"); + sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d)); + + repository.save(sampleEntity2); + + // when + long count = repository.countByLocationNear(new Point(45.7806d, 3.0875d), new Distance(2, Metrics.KILOMETERS)); + // then + assertThat(count, is(equalTo(1L))); + } + + private List createSampleEntities(String type, int numberOfEntities) { + List entities = new ArrayList<>(); + for (int i = 0; i < numberOfEntities; i++) { + SampleEntity entity = new SampleEntity(); + entity.setId(randomNumeric(numberOfEntities)); + entity.setAvailable(true); + entity.setMessage("Message"); + entity.setType(type); + entities.add(entity); + } + return entities; + } +} diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryRestTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryRestTests.java index 5c3de1026..4403bad1b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryRestTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryRestTests.java @@ -1,42 +1,42 @@ -/* - * Copyright 2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */package org.springframework.data.elasticsearch.repositories; - -import org.junit.Before; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; -import org.springframework.data.elasticsearch.entities.SampleEntity; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; - -/** - * - * @author Don Wellington - * - */ -@RunWith(SpringRunner.class) -@ContextConfiguration("classpath:custom-method-repository-rest-test.xml") -public class CustomMethodRepositoryRestTests extends CustomMethodRepositoryBaseTests { - @Autowired private ElasticsearchRestTemplate elasticsearchTemplate; - - @Before - public void before() { - elasticsearchTemplate.deleteIndex(SampleEntity.class); - elasticsearchTemplate.createIndex(SampleEntity.class); - elasticsearchTemplate.putMapping(SampleEntity.class); - elasticsearchTemplate.refresh(SampleEntity.class); - } -} +/* + * Copyright 2018-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */package org.springframework.data.elasticsearch.repositories; + +import org.junit.Before; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; +import org.springframework.data.elasticsearch.entities.SampleEntity; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +/** + * + * @author Don Wellington + * + */ +@RunWith(SpringRunner.class) +@ContextConfiguration("classpath:custom-method-repository-rest-test.xml") +public class CustomMethodRepositoryRestTests extends CustomMethodRepositoryBaseTests { + @Autowired private ElasticsearchRestTemplate elasticsearchTemplate; + + @Before + public void before() { + elasticsearchTemplate.deleteIndex(SampleEntity.class); + elasticsearchTemplate.createIndex(SampleEntity.class); + elasticsearchTemplate.putMapping(SampleEntity.class); + elasticsearchTemplate.refresh(SampleEntity.class); + } +} diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryTests.java index 42a1ff426..dadad052d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/CustomMethodRepositoryTests.java @@ -1,43 +1,43 @@ -/* - * Copyright 2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.repositories; - -import org.junit.Before; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; -import org.springframework.data.elasticsearch.entities.SampleEntity; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; - -/** - * - * @author Don Wellington - * - */ -@RunWith(SpringRunner.class) -@ContextConfiguration("classpath:custom-method-repository-test.xml") -public class CustomMethodRepositoryTests extends CustomMethodRepositoryBaseTests { - @Autowired private ElasticsearchTemplate elasticsearchTemplate; - - @Before - public void before() { - elasticsearchTemplate.deleteIndex(SampleEntity.class); - elasticsearchTemplate.createIndex(SampleEntity.class); - elasticsearchTemplate.putMapping(SampleEntity.class); - elasticsearchTemplate.refresh(SampleEntity.class); - } -} +/* + * Copyright 2018-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.elasticsearch.repositories; + +import org.junit.Before; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; +import org.springframework.data.elasticsearch.entities.SampleEntity; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +/** + * + * @author Don Wellington + * + */ +@RunWith(SpringRunner.class) +@ContextConfiguration("classpath:custom-method-repository-test.xml") +public class CustomMethodRepositoryTests extends CustomMethodRepositoryBaseTests { + @Autowired private ElasticsearchTemplate elasticsearchTemplate; + + @Before + public void before() { + elasticsearchTemplate.deleteIndex(SampleEntity.class); + elasticsearchTemplate.createIndex(SampleEntity.class); + elasticsearchTemplate.putMapping(SampleEntity.class); + elasticsearchTemplate.refresh(SampleEntity.class); + } +} diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/book/SampleElasticSearchBookRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/book/SampleElasticSearchBookRepository.java index eb5b6f810..63844fbaa 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/book/SampleElasticSearchBookRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/book/SampleElasticSearchBookRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.java index d7c6108c2..c6ba54f9e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.java index 72b997078..c2ca68006 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.java index afb5eb646..7e7fcee2f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchTemplateProducer.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchTemplateProducer.java index a2dc536cc..58fa37355 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchTemplateProducer.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchTemplateProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java index 04e2b10f7..f328ae41f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java index a0c320e89..3e81d45b8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java index 47aca7976..54688f809 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.java index 0d9c67b7b..21576ccbc 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.java index 8c8058203..c730c7661 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.java index a2ae819c9..dfa5b81ef 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/custom/SampleCustomMethodRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/custom/SampleCustomMethodRepository.java index 47ebfe703..2e9f5aee6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/custom/SampleCustomMethodRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/custom/SampleCustomMethodRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepository.java index 2fca7ddbd..df0dcf377 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/geo/SpringDataGeoRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/SpringDataGeoRepositoryTests.java index cf6ac116b..9f7cfaa09 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/geo/SpringDataGeoRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/SpringDataGeoRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepository.java index e871674eb..b1c4add39 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/nondocument/NonDocumentEntityRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/nondocument/NonDocumentEntityRepository.java index 998e3786c..7ab0e8610 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/nondocument/NonDocumentEntityRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/nondocument/NonDocumentEntityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleElasticsearchRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleElasticsearchRepository.java index 420a7b581..777ad98a2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleElasticsearchRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleElasticsearchRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleUUIDKeyedElasticsearchRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleUUIDKeyedElasticsearchRepository.java index cafa84406..387ecf270 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleUUIDKeyedElasticsearchRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/sample/SampleUUIDKeyedElasticsearchRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepository.java index 778627642..29f482882 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepositoryTests.java index 0afbbe7cf..6dcb58af2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/DynamicSettingAndMappingEntityRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepository.java index 27a3939dd..8a4123f2a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepositoryTests.java index 36b8162ec..261b08174 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/FieldDynamicMappingEntityRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELRepository.java index 69d6cb9ef..43424b929 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepository.java index 8be19e09e..54bce822b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryTests.java index 18bbc2091..6430a98f3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryManualWiringTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryManualWiringTests.java index 30d8d48ec..3a653543d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryManualWiringTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryManualWiringTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryTests.java index d1abb74d3..bdc5d45a6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexCustomMethodRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepository.java b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepository.java index 2e4d2df0c..88ef57bf8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryCustom.java b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryCustom.java index 4c7f47a80..becb69721 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryCustom.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiring.java b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiring.java index 9bbe8ae68..7b8b7e04c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiring.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiring.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiringImpl.java b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiringImpl.java index 5ac910472..2a0e0de14 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiringImpl.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/complex/ComplexElasticsearchRepositoryManualWiringImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/DoubleIDRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/DoubleIDRepositoryTests.java index ee18d4ac1..23ca5a288 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/DoubleIDRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/DoubleIDRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.java index f35fc634f..f1ea413e0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryTests.java index c4f2fb0a6..9a0b8cc40 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/IntegerIDRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/IntegerIDRepositoryTests.java index 8b59b4899..bb6b87c36 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/IntegerIDRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/IntegerIDRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/QueryKeywordsTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/QueryKeywordsTests.java index 25eeb7c78..0367b791e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/QueryKeywordsTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/QueryKeywordsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 the original author or authors. + * Copyright 2016-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepositoryTests.java index 4741711f5..1162455e9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/UUIDElasticsearchRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/UUIDElasticsearchRepositoryTests.java index a2c077d77..3d526be11 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/UUIDElasticsearchRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/UUIDElasticsearchRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.