Skip to content

Commit 2b6f7b2

Browse files
schaudermp911de
authored andcommitted
DATAJDBC-480 - Removed various deprecated symbols.
Removal of public API that was deprecated in version 1.1 or older. Original pull request: #204.
1 parent 10b4ea0 commit 2b6f7b2

28 files changed

+62
-807
lines changed

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

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

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

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

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

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

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

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

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

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

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@
1717

1818
import java.util.ArrayList;
1919
import java.util.List;
20-
import java.util.Map;
2120
import java.util.function.Consumer;
2221
import java.util.function.Function;
2322

2423
import org.springframework.data.domain.Pageable;
2524
import org.springframework.data.domain.Sort;
2625
import org.springframework.data.mapping.PersistentPropertyPath;
2726
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
28-
import org.springframework.data.relational.core.sql.SqlIdentifier;
2927
import org.springframework.data.relational.domain.Identifier;
3028

3129
/**
@@ -46,15 +44,6 @@ public CascadingDataAccessStrategy(List<DataAccessStrategy> strategies) {
4644
this.strategies = new ArrayList<>(strategies);
4745
}
4846

49-
/*
50-
* (non-Javadoc)
51-
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, java.util.Map)
52-
*/
53-
@Override
54-
public <T> Object insert(T instance, Class<T> domainType, Map<SqlIdentifier, Object> additionalParameters) {
55-
return collect(das -> das.insert(instance, domainType, additionalParameters));
56-
}
57-
5847
/*
5948
* (non-Javadoc)
6049
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, org.springframework.data.jdbc.core.ParentKeys)
@@ -173,15 +162,6 @@ public Iterable<Object> findAllByPath(Identifier identifier,
173162
return collect(das -> das.findAllByPath(identifier, path));
174163
}
175164

176-
/*
177-
* (non-Javadoc)
178-
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAllByProperty(java.lang.Object, org.springframework.data.relational.core.mapping.RelationalPersistentProperty)
179-
*/
180-
@Override
181-
public <T> Iterable<T> findAllByProperty(Object rootId, RelationalPersistentProperty property) {
182-
return collect(das -> das.findAllByProperty(rootId, property));
183-
}
184-
185165
/*
186166
* (non-Javadoc)
187167
* @see org.springframework.data.jdbc.core.DataAccessStrategy#existsById(java.lang.Object, java.lang.Class)

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

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.springframework.data.jdbc.core.JdbcAggregateOperations;
2424
import org.springframework.data.mapping.PersistentPropertyPath;
2525
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
26-
import org.springframework.data.relational.core.sql.SqlIdentifier;
2726
import org.springframework.data.relational.domain.Identifier;
2827
import org.springframework.lang.Nullable;
2928

@@ -38,21 +37,6 @@
3837
*/
3938
public interface DataAccessStrategy extends RelationResolver {
4039

41-
/**
42-
* Inserts a the data of a single entity. Referenced entities don't get handled.
43-
*
44-
* @param instance the instance to be stored. Must not be {@code null}.
45-
* @param domainType the type of the instance. Must not be {@code null}.
46-
* @param additionalParameters name-value pairs of additional parameters. Especially ids of parent entities that need
47-
* to get referenced are contained in this map. Must not be {@code null}.
48-
* @param <T> the type of the instance.
49-
* @return the id generated by the database if any.
50-
* @deprecated since 1.1, use {@link #insert(Object, Class, Identifier)} instead.
51-
*/
52-
@Deprecated
53-
@Nullable
54-
<T> Object insert(T instance, Class<T> domainType, Map<SqlIdentifier, Object> additionalParameters);
55-
5640
/**
5741
* Inserts a the data of a single entity. Referenced entities don't get handled.
5842
*
@@ -66,9 +50,7 @@ public interface DataAccessStrategy extends RelationResolver {
6650
* @since 1.1
6751
*/
6852
@Nullable
69-
default <T> Object insert(T instance, Class<T> domainType, Identifier identifier) {
70-
return insert(instance, domainType, identifier.toMap());
71-
}
53+
<T> Object insert(T instance, Class<T> domainType, Identifier identifier);
7254

7355
/**
7456
* Updates the data of a single entity in the database. Referenced entities don't get handled.
@@ -192,22 +174,8 @@ default <T> Object insert(T instance, Class<T> domainType, Identifier identifier
192174
* @see org.springframework.data.jdbc.core.RelationResolver#findAllByPath(org.springframework.data.relational.domain.Identifier, org.springframework.data.mapping.PersistentPropertyPath)
193175
*/
194176
@Override
195-
default Iterable<Object> findAllByPath(Identifier identifier,
196-
PersistentPropertyPath<? extends RelationalPersistentProperty> path) {
197-
198-
Object rootId = identifier.toMap().get(path.getRequiredLeafProperty().getReverseColumnName());
199-
return findAllByProperty(rootId, path.getRequiredLeafProperty());
200-
}
201-
202-
/**
203-
* Finds all entities reachable via {@literal property} from the instance identified by {@literal rootId}.
204-
*
205-
* @param rootId Id of the root object on which the {@literal propertyPath} is based.
206-
* @param property Leading from the root object to the entities to be found.
207-
* @deprecated Use #findAllByPath instead.
208-
*/
209-
@Deprecated
210-
<T> Iterable<T> findAllByProperty(Object rootId, RelationalPersistentProperty property);
177+
Iterable<Object> findAllByPath(Identifier identifier,
178+
PersistentPropertyPath<? extends RelationalPersistentProperty> path);
211179

212180
/**
213181
* returns if a row with the given id exists for the given type.

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,6 @@ public DefaultDataAccessStrategy(SqlGeneratorSource sqlGeneratorSource, Relation
9595
this.operations = operations;
9696
}
9797

98-
/*
99-
* (non-Javadoc)
100-
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, java.util.Map)
101-
*/
102-
@Override
103-
@Nullable
104-
public <T> Object insert(T instance, Class<T> domainType, Map<SqlIdentifier, Object> additionalParameters) {
105-
return insert(instance, domainType, Identifier.from(additionalParameters));
106-
}
107-
10898
/*
10999
* (non-Javadoc)
110100
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, java.util.Map)
@@ -346,21 +336,6 @@ private SqlParameterSource createParameterSource(Identifier identifier, Identifi
346336
return parameterSource;
347337
}
348338

349-
/*
350-
* (non-Javadoc)
351-
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAllByProperty(java.lang.Object, org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty)
352-
*/
353-
@Override
354-
@SuppressWarnings("unchecked")
355-
public Iterable<Object> findAllByProperty(Object rootId, RelationalPersistentProperty property) {
356-
357-
Assert.notNull(rootId, "rootId must not be null.");
358-
359-
Class<?> rootType = property.getOwner().getType();
360-
return findAllByPath(Identifier.of(property.getReverseColumnName(), rootId, rootType),
361-
context.getPersistentPropertyPath(property.getName(), rootType));
362-
}
363-
364339
/*
365340
* (non-Javadoc)
366341
* @see org.springframework.data.jdbc.core.DataAccessStrategy#existsById(java.lang.Object, java.lang.Class)

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

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

18-
import java.util.Map;
19-
2018
import org.springframework.data.domain.Pageable;
2119
import org.springframework.data.domain.Sort;
2220
import org.springframework.data.mapping.PersistentPropertyPath;
2321
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
24-
import org.springframework.data.relational.core.sql.SqlIdentifier;
2522
import org.springframework.data.relational.domain.Identifier;
2623
import org.springframework.util.Assert;
2724

@@ -38,15 +35,6 @@ public class DelegatingDataAccessStrategy implements DataAccessStrategy {
3835

3936
private DataAccessStrategy delegate;
4037

41-
/*
42-
* (non-Javadoc)
43-
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, java.util.Map)
44-
*/
45-
@Override
46-
public <T> Object insert(T instance, Class<T> domainType, Map<SqlIdentifier, Object> additionalParameters) {
47-
return delegate.insert(instance, domainType, additionalParameters);
48-
}
49-
5038
/*
5139
* (non-Javadoc)
5240
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, org.springframework.data.jdbc.core.ParentKeys)
@@ -169,18 +157,6 @@ public Iterable<Object> findAllByPath(Identifier identifier,
169157
return delegate.findAllByPath(identifier, path);
170158
}
171159

172-
/*
173-
* (non-Javadoc)
174-
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAllByProperty(java.lang.Object, org.springframework.data.relational.core.mapping.RelationalPersistentProperty)
175-
*/
176-
@Override
177-
public <T> Iterable<T> findAllByProperty(Object rootId, RelationalPersistentProperty property) {
178-
179-
Assert.notNull(delegate, "Delegate is null");
180-
181-
return delegate.findAllByProperty(rootId, property);
182-
}
183-
184160
/*
185161
* (non-Javadoc)
186162
* @see org.springframework.data.jdbc.core.DataAccessStrategy#existsById(java.lang.Object, java.lang.Class)

0 commit comments

Comments
 (0)