From 00ffc4a68ea8570f4a4c6e1d17defdb370c86e6f Mon Sep 17 00:00:00 2001 From: "mohsin.husen" Date: Fri, 7 Feb 2014 20:32:50 +0000 Subject: [PATCH] DATAES-46 - Remove unused imports & class --- .../elasticsearch/core/GetResultMapper.java | 3 +-- .../facet/request/HistogramFacetRequest.java | 2 +- .../facet/request/NativeFacetRequest.java | 5 +--- .../core/query/NativeSearchQueryBuilder.java | 1 - .../AbstractElasticsearchRepository.java | 1 - .../data/elasticsearch/ParentEntity.java | 2 +- .../elasticsearch/SampleEntityBuilder.java | 21 ++++++++++++++--- .../elasticsearch/SimpleRecursiveEntity.java | 16 +++++++++++++ .../data/elasticsearch/StockPrice.java | 19 +++++++++++++++ .../data/elasticsearch/StockPriceBuilder.java | 22 ++++++++++++++---- .../core/CustomEntityMapper.java | 16 +++++++++++++ .../core/CustomResultMapper.java | 16 +++++++++++++ .../core/DefaultEntityMapperTests.java | 16 +++++++++++++ .../core/DefaultResultMapperTests.java | 18 +++++++++++++-- .../core/MappingBuilderTests.java | 23 +++++++++++++++---- .../SimpleElasticsearchDateMappingTest.java | 16 +++++++++++++ .../core/convert/DateTimeConvertersTests.java | 2 -- .../core/geo/AuthorMarkerEntity.java | 4 ++-- .../core/geo/AuthorMarkerEntityBuilder.java | 7 +++++- .../core/query/CriteriaQueryTests.java | 5 +--- .../ComplexCustomMethodRepositoryTests.java | 10 ++------ .../ComplexElasticsearchRepositoryCustom.java | 16 +++++++++++++ .../repositories/DoubleIDRepository.java | 7 +++++- .../repositories/IntegerIDRepository.java | 7 +++++- .../SampleElasticSearchBookRepository.java | 4 +--- ...asticsearchRepositoryManualWiringImpl.java | 17 +++++++++++++- 26 files changed, 228 insertions(+), 48 deletions(-) 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 99ecde10e..cc150e15e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/GetResultMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/GetResultMapper.java @@ -16,11 +16,10 @@ package org.springframework.data.elasticsearch.core; import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.springframework.data.domain.Pageable; /** * @author Artur Konczak + * @author Mohsin Husen */ public interface GetResultMapper { 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 7e5bb08e4..b76f6c182 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 @@ -16,7 +16,6 @@ package org.springframework.data.elasticsearch.core.facet.request; import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.math.NumberUtils; import org.elasticsearch.search.facet.FacetBuilder; import org.elasticsearch.search.facet.FacetBuilders; import org.elasticsearch.search.facet.histogram.HistogramFacetBuilder; @@ -27,6 +26,7 @@ import java.util.concurrent.TimeUnit; /** * @author Artur Konczak + * @author Mohsin Husen */ public class HistogramFacetRequest extends AbstractFacetRequest { 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 caa08ea80..98c401157 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 @@ -15,15 +15,12 @@ */ package org.springframework.data.elasticsearch.core.facet.request; -import org.elasticsearch.search.facet.FacetBuilder; -import org.elasticsearch.search.facet.terms.TermsFacetBuilder; -import org.springframework.data.elasticsearch.core.facet.FacetRequest; - import org.elasticsearch.search.facet.FacetBuilder; import org.springframework.data.elasticsearch.core.facet.FacetRequest; /** * @author Artur Konczak + * @author Mohsin Husen */ public class NativeFacetRequest implements FacetRequest { 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 7f885e0dd..90f1d9f17 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilder.java @@ -16,7 +16,6 @@ package org.springframework.data.elasticsearch.core.query; import org.apache.commons.collections.CollectionUtils; -import org.elasticsearch.common.cache.CacheBuilder; import org.elasticsearch.index.query.FilterBuilder; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.search.highlight.HighlightBuilder; 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 bbe036d0e..44774ec09 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 @@ -34,7 +34,6 @@ import java.util.List; import static org.elasticsearch.index.query.QueryBuilders.inQuery; import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.springframework.data.elasticsearch.core.query.Query.DEFAULT_PAGE; /** * Elasticsearch specific repository implementation. Likely to be used as target within diff --git a/src/test/java/org/springframework/data/elasticsearch/ParentEntity.java b/src/test/java/org/springframework/data/elasticsearch/ParentEntity.java index 5c13c4019..24658d389 100644 --- a/src/test/java/org/springframework/data/elasticsearch/ParentEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/ParentEntity.java @@ -17,12 +17,12 @@ package org.springframework.data.elasticsearch; import org.springframework.core.style.ToStringCreator; import org.springframework.data.annotation.Id; -import org.springframework.data.annotation.PersistenceConstructor; import org.springframework.data.elasticsearch.annotations.*; /** * ParentEntity * * @author Philipp Jardas + * @author Mohsin Husen */ @Document(indexName = ParentEntity.INDEX, type = ParentEntity.PARENT_TYPE, indexStoreType = "memory", shards = 1, replicas = 0, refreshInterval = "-1") public class ParentEntity { diff --git a/src/test/java/org/springframework/data/elasticsearch/SampleEntityBuilder.java b/src/test/java/org/springframework/data/elasticsearch/SampleEntityBuilder.java index a3d50f6dc..cce779050 100644 --- a/src/test/java/org/springframework/data/elasticsearch/SampleEntityBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/SampleEntityBuilder.java @@ -1,11 +1,26 @@ +/* + * Copyright 2013-2014 the original author 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; import org.springframework.data.elasticsearch.core.query.IndexQuery; /** - * User: dead - * Date: 23/01/14 - * Time: 18:25 + * @author Rizwan Idrees + * @author Mohsin Husen + * @author Artur Konczak */ public class SampleEntityBuilder { diff --git a/src/test/java/org/springframework/data/elasticsearch/SimpleRecursiveEntity.java b/src/test/java/org/springframework/data/elasticsearch/SimpleRecursiveEntity.java index 8166d14a9..aa2083e3d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/SimpleRecursiveEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/SimpleRecursiveEntity.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013-2014 the original author 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; import org.springframework.data.annotation.Id; @@ -7,6 +22,7 @@ import org.springframework.data.elasticsearch.annotations.FieldType; /** * @author Stuart Stevenson + * @author Mohsin Husen */ @Document(indexName = "circular-objects", type = "circular-object" , indexStoreType = "memory", shards = 1, replicas = 0, refreshInterval = "-1") public class SimpleRecursiveEntity { diff --git a/src/test/java/org/springframework/data/elasticsearch/StockPrice.java b/src/test/java/org/springframework/data/elasticsearch/StockPrice.java index b4197876d..0d319305c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/StockPrice.java +++ b/src/test/java/org/springframework/data/elasticsearch/StockPrice.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013-2014 the original author 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; import org.springframework.data.annotation.Id; @@ -7,6 +22,10 @@ import org.springframework.data.elasticsearch.annotations.FieldType; import java.math.BigDecimal; +/** + * @author Artur Konczak + * @author Mohsin Husen + */ @Document(indexName = "stock", type = "price", indexStoreType = "memory", shards = 1, replicas = 0, refreshInterval = "-1") public class StockPrice { diff --git a/src/test/java/org/springframework/data/elasticsearch/StockPriceBuilder.java b/src/test/java/org/springframework/data/elasticsearch/StockPriceBuilder.java index 50d1dff97..8a1b6c526 100644 --- a/src/test/java/org/springframework/data/elasticsearch/StockPriceBuilder.java +++ b/src/test/java/org/springframework/data/elasticsearch/StockPriceBuilder.java @@ -1,15 +1,27 @@ +/* + * Copyright 2013-2014 the original author 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; -import org.springframework.data.elasticsearch.core.facet.ArticleEntity; -import org.springframework.data.elasticsearch.core.geo.AuthorMarkerEntity; import org.springframework.data.elasticsearch.core.query.IndexQuery; import java.math.BigDecimal; /** - * User: dead - * Date: 09/12/13 - * Time: 17:48 + * @author Artur Konczak + * @author Mohsin Husen */ public class StockPriceBuilder { 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 c51c75f11..b90eb3e48 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/CustomEntityMapper.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/CustomEntityMapper.java @@ -1,9 +1,25 @@ +/* + * Copyright 2013-2014 the original author 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 java.io.IOException; /** * @author Artur Konczak + * @author Mohsin Husen */ public class CustomEntityMapper implements EntityMapper { 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 dc531b577..1d8d0b9b7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/CustomResultMapper.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/CustomResultMapper.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013-2014 the original author 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.get.GetResponse; @@ -6,6 +21,7 @@ import org.springframework.data.domain.Pageable; /** * @author Artur Konczak + * @author Mohsin Husen */ public class CustomResultMapper implements ResultsMapper{ 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 69e04482e..2014a6a60 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/DefaultEntityMapperTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/DefaultEntityMapperTests.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013-2014 the original author 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.junit.Before; @@ -12,6 +27,7 @@ import static org.junit.Assert.assertThat; /** * @author Artur Konczak + * @author Mohsin Husen */ public class DefaultEntityMapperTests { 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 5f3a29d6e..f345f37c1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/DefaultResultMapperTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/DefaultResultMapperTests.java @@ -1,9 +1,23 @@ +/* + * Copyright 2013-2014 the original author 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.apache.commons.collections.iterators.ArrayIterator; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.index.get.GetField; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHitField; import org.elasticsearch.search.SearchHits; @@ -11,7 +25,6 @@ import org.elasticsearch.search.internal.InternalSearchHitField; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; -import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.springframework.data.elasticsearch.Car; @@ -27,6 +40,7 @@ import static org.mockito.Mockito.when; /** * @author Artur Konczak + * @author Mohsin Husen */ public class DefaultResultMapperTests { 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 ba4b13d58..5ec35c25b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/MappingBuilderTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/MappingBuilderTests.java @@ -1,14 +1,26 @@ +/* + * Copyright 2013-2014 the original author 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.common.xcontent.XContentBuilder; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.elasticsearch.SampleTransientEntity; -import org.springframework.data.elasticsearch.SimpleRecursiveEntity; -import org.springframework.data.elasticsearch.StockPrice; -import org.springframework.data.elasticsearch.StockPriceBuilder; -import org.springframework.data.elasticsearch.MinimalEntity; +import org.springframework.data.elasticsearch.*; import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder; import org.springframework.data.elasticsearch.core.query.SearchQuery; import org.springframework.test.context.ContextConfiguration; @@ -25,6 +37,7 @@ import static org.junit.Assert.assertThat; /** * @author Stuart Stevenson * @author Jakub Vavrik + * @author Mohsin Husen */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:elasticsearch-template-test.xml") diff --git a/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTest.java b/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTest.java index e7182526a..5c7e5eda2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SimpleElasticsearchDateMappingTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013-2014 the original author 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.common.xcontent.XContentBuilder; @@ -10,6 +25,7 @@ import java.io.IOException; /** * @author Jakub Vavrik + * @author Mohsin Husen */ public class SimpleElasticsearchDateMappingTest { private static final String EXPECTED_MAPPING = "{\"mapping\":{\"properties\":{\"message\":{\"store\":true," + 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 d332cd931..f2c136636 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 @@ -20,8 +20,6 @@ import org.joda.time.DateTimeZone; import org.joda.time.LocalDateTime; import org.junit.Assert; import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.Calendar; import java.util.TimeZone; 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 007e04955..0ab35ac0d 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 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ package org.springframework.data.elasticsearch.core.geo; import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Document; -import org.springframework.data.elasticsearch.core.geo.GeoPoint; /** * @author Franck Marchand + * @author Mohsin Husen */ @Document(indexName = "test-geo-index", type = "geo-class-point-type", indexStoreType = "memory", shards = 1, replicas = 0, refreshInterval = "-1") public class AuthorMarkerEntity { 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 294b6fd8c..637e1a79d 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 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,11 @@ package org.springframework.data.elasticsearch.core.geo; import org.springframework.data.elasticsearch.core.query.IndexQuery; +/** + * @author Franck Marchand + * @author Mohsin Husen + */ + public class AuthorMarkerEntityBuilder { private AuthorMarkerEntity result; 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 e7c71a34a..4502a0f14 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 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,6 @@ */ package org.springframework.data.elasticsearch.core.query; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -33,7 +31,6 @@ import java.util.ArrayList; import java.util.List; import static org.apache.commons.lang.RandomStringUtils.randomNumeric; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexCustomMethodRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexCustomMethodRepositoryTests.java index 0e9058a0f..4848de80c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexCustomMethodRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexCustomMethodRepositoryTests.java @@ -19,25 +19,19 @@ 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.SampleEntity; import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import javax.annotation.Resource; -import java.util.Arrays; -import java.util.List; -import static org.apache.commons.lang.RandomStringUtils.random; -import static org.apache.commons.lang.RandomStringUtils.randomNumeric; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; /** * @author Artur Konczak + * @author Mohsin Husen */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:complex-custom-method-repository-test.xml") diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexElasticsearchRepositoryCustom.java b/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexElasticsearchRepositoryCustom.java index b1adbff9f..d8fe7572f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexElasticsearchRepositoryCustom.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/ComplexElasticsearchRepositoryCustom.java @@ -1,7 +1,23 @@ +/* + * Copyright 2014 the original author 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; /** * @author Artur Konczak + * @author Mohsin Husen */ public interface ComplexElasticsearchRepositoryCustom { diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/DoubleIDRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/DoubleIDRepository.java index d6a296823..fdaedaa42 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/DoubleIDRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/DoubleIDRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,11 @@ package org.springframework.data.elasticsearch.repositories; import org.springframework.data.elasticsearch.DoubleIDEntity; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; +/** + * @author Ryan Henszey + * @author Mohsin Husen + */ + public interface DoubleIDRepository extends ElasticsearchRepository { } diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/IntegerIDRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/IntegerIDRepository.java index 2d675af5e..a2a4a1113 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/IntegerIDRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/IntegerIDRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,11 @@ package org.springframework.data.elasticsearch.repositories; import org.springframework.data.elasticsearch.IntegerIDEntity; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; +/** + * @author Ryan Henszey + * @author Mohsin Husen + */ + public interface IntegerIDRepository extends ElasticsearchRepository { } diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/SampleElasticSearchBookRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/SampleElasticSearchBookRepository.java index c590fcd8f..6bb10dda3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/SampleElasticSearchBookRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/SampleElasticSearchBookRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,6 @@ package org.springframework.data.elasticsearch.repositories; import org.springframework.data.elasticsearch.Book; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; -import java.util.List; - /** * @author Rizwan Idrees * @author Mohsin Husen diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/impl/ComplexElasticsearchRepositoryManualWiringImpl.java b/src/test/java/org/springframework/data/elasticsearch/repositories/impl/ComplexElasticsearchRepositoryManualWiringImpl.java index 47aad47e0..23f5f9bb7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/impl/ComplexElasticsearchRepositoryManualWiringImpl.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/impl/ComplexElasticsearchRepositoryManualWiringImpl.java @@ -1,11 +1,26 @@ +/* + * Copyright 2014 the original author 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.impl; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; import org.springframework.data.elasticsearch.repositories.ComplexElasticsearchRepositoryCustom; /** * @author Artur Konczak + * @author Mohsin Husen */ public class ComplexElasticsearchRepositoryManualWiringImpl implements ComplexElasticsearchRepositoryCustom {