Skip to content

Commit 37f2b32

Browse files
committed
Move Commons PropertyPath and TypeInformation types to core package.
See spring-projects/spring-data-commons#3393
1 parent 8297617 commit 37f2b32

24 files changed

+59
-60
lines changed

src/main/java/org/springframework/data/couchbase/core/convert/AbstractCouchbaseConverter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
package org.springframework.data.couchbase.core.convert;
1818

1919
import java.util.Collection;
20-
import java.util.Collections;
2120

2221
import org.springframework.beans.factory.InitializingBean;
2322
import org.springframework.core.convert.ConversionService;
2423
import org.springframework.core.convert.TypeDescriptor;
2524
import org.springframework.core.convert.support.GenericConversionService;
2625
import org.springframework.data.convert.CustomConversions;
26+
import org.springframework.data.core.TypeInformation;
2727
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
2828
import org.springframework.data.couchbase.core.mapping.CouchbaseList;
2929
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
3030
import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
3131
import org.springframework.data.mapping.model.EntityInstantiators;
32-
import org.springframework.data.util.TypeInformation;
3332

3433
/**
3534
* An abstract {@link CouchbaseConverter} that provides the basics for the {@link MappingCouchbaseConverter}.

src/main/java/org/springframework/data/couchbase/core/convert/CouchbaseConversionContext.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
*/
1616
package org.springframework.data.couchbase.core.convert;
1717

18+
import org.jspecify.annotations.Nullable;
19+
1820
import org.springframework.data.convert.ValueConversionContext;
21+
import org.springframework.data.core.TypeInformation;
1922
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
2023
import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
21-
import org.springframework.data.util.TypeInformation;
22-
import org.jspecify.annotations.Nullable;
2324

2425
/**
2526
* {@link ValueConversionContext} that allows to delegate read/write to an underlying {@link CouchbaseConverter}.

src/main/java/org/springframework/data/couchbase/core/convert/CouchbaseConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
import org.springframework.data.convert.CustomConversions;
2020
import org.springframework.data.convert.EntityConverter;
2121
import org.springframework.data.convert.EntityReader;
22+
import org.springframework.data.core.TypeInformation;
2223
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
2324
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity;
2425
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
2526
import org.springframework.data.mapping.Alias;
2627
import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
27-
import org.springframework.data.util.TypeInformation;
2828

2929
/**
3030
* Marker interface for the converter, identifying the types to and from that can be converted.
@@ -78,7 +78,7 @@ Object convertForWriteIfNeeded(final CouchbasePersistentProperty source,
7878

7979
/**
8080
* return the conversions
81-
*
81+
*
8282
* @return conversions
8383
*/
8484
CustomConversions getConversions();

src/main/java/org/springframework/data/couchbase/core/convert/CouchbaseTypeMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
package org.springframework.data.couchbase.core.convert;
1818

1919
import org.springframework.data.convert.TypeMapper;
20+
import org.springframework.data.core.TypeInformation;
2021
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
2122
import org.springframework.data.mapping.Alias;
22-
import org.springframework.data.util.TypeInformation;
2323

2424
/**
2525
* Marker interface for the TypeMapper.

src/main/java/org/springframework/data/couchbase/core/convert/DefaultCouchbaseTypeMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121
import org.springframework.data.convert.DefaultTypeMapper;
2222
import org.springframework.data.convert.TypeAliasAccessor;
23+
import org.springframework.data.core.TypeInformation;
2324
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
2425
import org.springframework.data.mapping.Alias;
2526
import org.springframework.data.mapping.context.MappingContext;
26-
import org.springframework.data.util.TypeInformation;
2727

2828
/**
2929
* The Couchbase Type Mapper.

src/main/java/org/springframework/data/couchbase/core/convert/MappingCouchbaseConverter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
import java.util.TreeMap;
3131
import java.util.UUID;
3232

33+
import org.jspecify.annotations.Nullable;
34+
3335
import org.springframework.beans.factory.BeanClassLoaderAware;
3436
import org.springframework.context.ApplicationContext;
3537
import org.springframework.context.ApplicationContextAware;
@@ -43,6 +45,7 @@
4345
import org.springframework.core.env.StandardEnvironment;
4446
import org.springframework.data.convert.CustomConversions;
4547
import org.springframework.data.convert.PropertyValueConverter;
48+
import org.springframework.data.core.TypeInformation;
4649
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
4750
import org.springframework.data.couchbase.core.mapping.CouchbaseList;
4851
import org.springframework.data.couchbase.core.mapping.CouchbaseMappingContext;
@@ -74,9 +77,7 @@
7477
import org.springframework.data.mapping.model.SpELContext;
7578
import org.springframework.data.mapping.model.ValueExpressionEvaluator;
7679
import org.springframework.data.mapping.model.ValueExpressionParameterValueProvider;
77-
import org.springframework.data.util.TypeInformation;
7880
import org.springframework.expression.spel.standard.SpelExpressionParser;
79-
import org.jspecify.annotations.Nullable;
8081
import org.springframework.util.Assert;
8182
import org.springframework.util.CollectionUtils;
8283

src/main/java/org/springframework/data/couchbase/core/convert/TypeAwareTypeInformationMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import org.springframework.data.annotation.TypeAlias;
1919
import org.springframework.data.convert.SimpleTypeInformationMapper;
20+
import org.springframework.data.core.TypeInformation;
2021
import org.springframework.data.mapping.Alias;
21-
import org.springframework.data.util.TypeInformation;
2222

2323
/**
2424
* TypeAwareTypeInformationMapper - leverages @TypeAlias

src/main/java/org/springframework/data/couchbase/core/convert/join/N1qlJoinResolver.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616

1717
package org.springframework.data.couchbase.core.convert.join;
1818

19-
import static org.springframework.data.couchbase.core.query.N1QLExpression.i;
20-
import static org.springframework.data.couchbase.core.query.N1QLExpression.x;
21-
import static org.springframework.data.couchbase.core.support.TemplateUtils.SELECT_CAS;
22-
import static org.springframework.data.couchbase.core.support.TemplateUtils.SELECT_ID;
19+
import static org.springframework.data.couchbase.core.query.N1QLExpression.*;
20+
import static org.springframework.data.couchbase.core.support.TemplateUtils.*;
2321

2422
import java.lang.reflect.AnnotatedElement;
2523
import java.lang.reflect.InvocationHandler;
@@ -28,6 +26,8 @@
2826

2927
import org.slf4j.Logger;
3028
import org.slf4j.LoggerFactory;
29+
30+
import org.springframework.data.core.TypeInformation;
3131
import org.springframework.data.couchbase.core.ReactiveCouchbaseTemplate;
3232
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity;
3333
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
@@ -43,7 +43,6 @@
4343
import org.springframework.data.couchbase.repository.query.StringBasedN1qlQueryParser;
4444
import org.springframework.data.mapping.PropertyHandler;
4545
import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
46-
import org.springframework.data.util.TypeInformation;
4746
import org.springframework.util.Assert;
4847

4948
import com.couchbase.client.core.io.CollectionIdentifier;
@@ -180,7 +179,7 @@ public KeySpaceInfo(String collection, N1QLExpression keyspace) {
180179

181180
/**
182181
* from CouchbaseQueryMethod.getCollection()
183-
*
182+
*
184183
* @param targetClass
185184
* @return
186185
*/
@@ -193,7 +192,7 @@ static String getCollection(Class<?> targetClass) {
193192

194193
/**
195194
* from CouchbaseQueryMethod.getScope()
196-
*
195+
*
197196
* @param targetClass
198197
* @return
199198
*/

src/main/java/org/springframework/data/couchbase/core/index/CouchbasePersistentEntityIndexResolver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@
1515
*/
1616
package org.springframework.data.couchbase.core.index;
1717

18-
import static org.springframework.data.couchbase.core.query.N1QLExpression.i;
19-
import static org.springframework.data.couchbase.core.query.N1QLExpression.s;
18+
import static org.springframework.data.couchbase.core.query.N1QLExpression.*;
2019

2120
import java.util.ArrayList;
2221
import java.util.Arrays;
2322
import java.util.List;
2423
import java.util.stream.Collectors;
2524

25+
import org.jspecify.annotations.Nullable;
26+
27+
import org.springframework.data.core.TypeInformation;
2628
import org.springframework.data.couchbase.core.CouchbaseOperations;
2729
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity;
2830
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
@@ -31,8 +33,6 @@
3133
import org.springframework.data.mapping.Alias;
3234
import org.springframework.data.mapping.PropertyHandler;
3335
import org.springframework.data.mapping.context.MappingContext;
34-
import org.springframework.data.util.TypeInformation;
35-
import org.jspecify.annotations.Nullable;
3636
import org.springframework.util.Assert;
3737
import org.springframework.util.StringUtils;
3838

src/main/java/org/springframework/data/couchbase/core/index/QueryIndexResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616
package org.springframework.data.couchbase.core.index;
1717

18+
import org.springframework.data.core.TypeInformation;
1819
import org.springframework.data.couchbase.core.CouchbaseOperations;
1920
import org.springframework.data.couchbase.core.mapping.CouchbaseMappingContext;
2021
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity;
2122
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
2223
import org.springframework.data.mapping.context.MappingContext;
23-
import org.springframework.data.util.TypeInformation;
2424
import org.springframework.util.Assert;
2525

2626
/**

0 commit comments

Comments
 (0)