Skip to content

Commit 848ffee

Browse files
committed
Remove deprecated code.
Original pull request #1869
1 parent c8b9697 commit 848ffee

File tree

38 files changed

+11
-1589
lines changed

38 files changed

+11
-1589
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateOperations.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -265,22 +265,6 @@ public interface JdbcAggregateOperations {
265265
*/
266266
<T> void delete(T aggregateRoot);
267267

268-
/**
269-
* Delete an aggregate identified by its aggregate root.
270-
*
271-
* @param aggregateRoot to delete. Must not be {@code null}.
272-
* @param domainType the type of the aggregate root. Must not be {@code null}.
273-
* @param <T> the type of the aggregate root.
274-
* @throws org.springframework.dao.OptimisticLockingFailureException when {@literal T} has a version attribute and the
275-
* version attribute of the provided entity does not match the version attribute in the database, or when
276-
* there is no aggregate root with matching id. In other cases a NOOP delete is silently ignored.
277-
* @deprecated since 3.0 use {@link #delete(Object)} instead
278-
*/
279-
@Deprecated(since = "3.0")
280-
default <T> void delete(T aggregateRoot, Class<T> domainType) {
281-
delete(aggregateRoot);
282-
}
283-
284268
/**
285269
* Delete all aggregates of a given type.
286270
*
@@ -295,21 +279,4 @@ default <T> void delete(T aggregateRoot, Class<T> domainType) {
295279
* @param <T> the type of the aggregate roots.
296280
*/
297281
<T> void deleteAll(Iterable<? extends T> aggregateRoots);
298-
299-
/**
300-
* Delete all aggregates identified by their aggregate roots.
301-
*
302-
* @param aggregateRoots to delete. Must not be {@code null}.
303-
* @param domainType type of the aggregate roots to be deleted. Must not be {@code null}.
304-
* @param <T> the type of the aggregate roots.
305-
* @throws org.springframework.dao.OptimisticLockingFailureException when {@literal T} has a version attribute and for
306-
* at least on entity the version attribute of the entity does not match the version attribute in the
307-
* database, or when there is no aggregate root with matching id. In other cases a NOOP delete is silently
308-
* ignored.
309-
* @deprecated since 3.0 use {@link #deleteAll(Iterable)} instead.
310-
*/
311-
@Deprecated(since = "3.0")
312-
default <T> void deleteAll(Iterable<? extends T> aggregateRoots, Class<T> domainType) {
313-
deleteAll(aggregateRoots);
314-
}
315282
}

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/BasicJdbcConverter.java

Lines changed: 0 additions & 77 deletions
This file was deleted.

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/BatchJdbcOperations.java

Lines changed: 0 additions & 79 deletions
This file was deleted.

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/EntityRowMapper.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.sql.SQLException;
2020

2121
import org.springframework.data.relational.core.mapping.AggregatePath;
22-
import org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension;
2322
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
2423
import org.springframework.data.relational.domain.RowDocument;
2524
import org.springframework.jdbc.core.RowMapper;
@@ -43,19 +42,6 @@ public class EntityRowMapper<T> implements RowMapper<T> {
4342
private final JdbcConverter converter;
4443
private final @Nullable Identifier identifier;
4544

46-
/**
47-
* @deprecated use {@link EntityRowMapper#EntityRowMapper(AggregatePath, JdbcConverter, Identifier)} instead
48-
*/
49-
@Deprecated(since = "3.2", forRemoval = true)
50-
@SuppressWarnings("unchecked")
51-
public EntityRowMapper(PersistentPropertyPathExtension path, JdbcConverter converter, Identifier identifier) {
52-
53-
this.entity = (RelationalPersistentEntity<T>) path.getLeafEntity();
54-
this.path = path.getAggregatePath();
55-
this.converter = converter;
56-
this.identifier = identifier;
57-
}
58-
5945
@SuppressWarnings("unchecked")
6046
public EntityRowMapper(AggregatePath path, JdbcConverter converter, Identifier identifier) {
6147

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/InsertStrategyFactory.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ public InsertStrategyFactory(NamedParameterJdbcOperations jdbcOperations, Dialec
4141
this.dialect = dialect;
4242
}
4343

44-
/**
45-
* Constructor with additional {@link BatchJdbcOperations} constructor.
46-
*
47-
* @deprecated since 3.2, use
48-
* {@link InsertStrategyFactory#InsertStrategyFactory(NamedParameterJdbcOperations, Dialect)} instead.
49-
*/
50-
@Deprecated(since = "3.2")
51-
public InsertStrategyFactory(NamedParameterJdbcOperations namedParameterJdbcOperations,
52-
BatchJdbcOperations batchJdbcOperations, Dialect dialect) {
53-
this(namedParameterJdbcOperations, dialect);
54-
}
55-
5644
/**
5745
* @param idValueSource the {@link IdValueSource} for the insert.
5846
* @param idColumn the identifier for the id, if an id is expected to be generated. May be {@code null}.

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/JdbcConverter.java

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

18-
import java.sql.ResultSet;
19-
import java.sql.SQLException;
2018
import java.sql.SQLType;
2119

2220
import org.springframework.data.jdbc.core.mapping.JdbcValue;
2321
import org.springframework.data.relational.core.conversion.RelationalConverter;
24-
import org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension;
2522
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
26-
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
2723
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
2824
import org.springframework.data.relational.domain.RowDocument;
2925
import org.springframework.data.util.TypeInformation;
@@ -65,48 +61,6 @@ default JdbcValue writeJdbcValue(@Nullable Object value, Class<?> type, SQLType
6561
*/
6662
JdbcValue writeJdbcValue(@Nullable Object value, TypeInformation<?> type, SQLType sqlType);
6763

68-
/**
69-
* Read the current row from {@link ResultSet} to an {@link RelationalPersistentEntity#getType() entity}.
70-
*
71-
* @param entity the persistent entity type.
72-
* @param resultSet the {@link ResultSet} to read from.
73-
* @param key primary key.
74-
* @param <T>
75-
* @return
76-
* @deprecated since 3.2, use {@link #readAndResolve(Class, RowDocument, Identifier)} instead.
77-
*/
78-
@Deprecated(since = "3.2")
79-
default <T> T mapRow(RelationalPersistentEntity<T> entity, ResultSet resultSet, Object key) {
80-
try {
81-
return readAndResolve(entity.getType(), RowDocumentResultSetExtractor.toRowDocument(resultSet));
82-
} catch (SQLException e) {
83-
throw new RuntimeException(e);
84-
}
85-
}
86-
87-
/**
88-
* Read the current row from {@link ResultSet} to an {@link PersistentPropertyPathExtension#getActualType() entity}.
89-
*
90-
* @param path path to the owning property.
91-
* @param resultSet the {@link ResultSet} to read from.
92-
* @param identifier entity identifier.
93-
* @param key primary key.
94-
* @param <T>
95-
* @return
96-
* @deprecated use {@link #readAndResolve(Class, RowDocument, Identifier)} instead.
97-
*/
98-
@SuppressWarnings("unchecked")
99-
@Deprecated(since = "3.2", forRemoval = true)
100-
default <T> T mapRow(PersistentPropertyPathExtension path, ResultSet resultSet, Identifier identifier, Object key) {
101-
102-
try {
103-
return (T) readAndResolve(path.getRequiredLeafEntity().getTypeInformation(),
104-
RowDocumentResultSetExtractor.toRowDocument(resultSet), identifier);
105-
} catch (SQLException e) {
106-
throw new RuntimeException(e);
107-
}
108-
};
109-
11064
/**
11165
* Read a {@link RowDocument} into the requested {@link Class aggregate type} and resolve references by looking these
11266
* up from {@link RelationResolver}.

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/JdbcIdentifierBuilder.java

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package org.springframework.data.jdbc.core.convert;
1717

1818
import org.springframework.data.relational.core.mapping.AggregatePath;
19-
import org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension;
2019
import org.springframework.lang.Nullable;
2120
import org.springframework.util.Assert;
2221

@@ -38,17 +37,6 @@ public static JdbcIdentifierBuilder empty() {
3837
return new JdbcIdentifierBuilder(Identifier.empty());
3938
}
4039

41-
/**
42-
* Creates ParentKeys with backreference for the given path and value of the parents id.
43-
*
44-
* @deprecated Use {@link #forBackReferences(JdbcConverter, AggregatePath, Object)} instead.
45-
*/
46-
@Deprecated(since = "3.2", forRemoval = true)
47-
public static JdbcIdentifierBuilder forBackReferences(JdbcConverter converter, PersistentPropertyPathExtension path,
48-
@Nullable Object value) {
49-
return forBackReferences(converter, path.getAggregatePath(), value);
50-
}
51-
5240
/**
5341
* Creates ParentKeys with backreference for the given path and value of the parents id.
5442
*/
@@ -64,20 +52,6 @@ public static JdbcIdentifierBuilder forBackReferences(JdbcConverter converter, A
6452
return new JdbcIdentifierBuilder(identifier);
6553
}
6654

67-
/**
68-
* Adds a qualifier to the identifier to build. A qualifier is a map key or a list index.
69-
*
70-
* @param path path to the map that gets qualified by {@code value}. Must not be {@literal null}.
71-
* @param value map key or list index qualifying the map identified by {@code path}. Must not be {@literal null}.
72-
* @return this builder. Guaranteed to be not {@literal null}.
73-
*/
74-
@Deprecated
75-
public JdbcIdentifierBuilder withQualifier(PersistentPropertyPathExtension path, Object value) {
76-
77-
return withQualifier(path.getAggregatePath(), value);
78-
}
79-
80-
8155
/**
8256
* Adds a qualifier to the identifier to build. A qualifier is a map key or a list index.
8357
*
@@ -90,7 +64,8 @@ public JdbcIdentifierBuilder withQualifier(AggregatePath path, Object value) {
9064
Assert.notNull(path, "Path must not be null");
9165
Assert.notNull(value, "Value must not be null");
9266

93-
identifier = identifier.withPart(path.getTableInfo().qualifierColumnInfo().name(), value, path.getTableInfo().qualifierColumnType());
67+
identifier = identifier.withPart(path.getTableInfo().qualifierColumnInfo().name(), value,
68+
path.getTableInfo().qualifierColumnType());
9469

9570
return this;
9671
}

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/QueryMapper.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,6 @@ public class QueryMapper {
6161
private final JdbcConverter converter;
6262
private final MappingContext<? extends RelationalPersistentEntity<?>, RelationalPersistentProperty> mappingContext;
6363

64-
/**
65-
* Creates a new {@link QueryMapper} with the given {@link JdbcConverter}.
66-
*
67-
* @param dialect must not be {@literal null}.
68-
* @param converter must not be {@literal null}.
69-
* @deprecated use {@link QueryMapper(JdbcConverter)} instead.
70-
*/
71-
@Deprecated(since="3.2")
72-
public QueryMapper(Dialect dialect, JdbcConverter converter) {
73-
74-
Assert.notNull(dialect, "Dialect must not be null");
75-
Assert.notNull(converter, "JdbcConverter must not be null");
76-
77-
this.converter = converter;
78-
this.mappingContext = converter.getMappingContext();
79-
}
80-
8164
/**
8265
* Creates a new {@link QueryMapper} with the given {@link JdbcConverter}.
8366
*

0 commit comments

Comments
 (0)