Remove deprecated code.

Original pull request #1869
This commit is contained in:
Jens Schauder
2024-08-29 14:02:01 +02:00
parent c8b9697c51
commit 848ffee253
38 changed files with 11 additions and 1589 deletions

View File

@@ -43,7 +43,6 @@ import org.springframework.data.r2dbc.dialect.DialectResolver;
import org.springframework.data.r2dbc.dialect.R2dbcDialect;
import org.springframework.data.r2dbc.mapping.R2dbcMappingContext;
import org.springframework.data.relational.RelationalManagedTypes;
import org.springframework.data.relational.core.conversion.BasicRelationalConverter;
import org.springframework.data.relational.core.mapping.DefaultNamingStrategy;
import org.springframework.data.relational.core.mapping.NamingStrategy;
import org.springframework.data.relational.core.mapping.Table;

View File

@@ -432,15 +432,6 @@ public interface StatementMapper {
return this.table;
}
/**
* @return
* @deprecated since 1.1, use {@link #getSelectList()} instead.
*/
@Deprecated
public List<String> getProjectedFields() {
return Collections.unmodifiableList(this.projectedFields);
}
public List<Expression> getSelectList() {
return Collections.unmodifiableList(selectList);
}

View File

@@ -33,7 +33,6 @@ import org.springframework.data.r2dbc.dialect.R2dbcDialect;
import org.springframework.data.relational.core.dialect.Escaper;
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
import org.springframework.data.relational.core.query.Criteria;
import org.springframework.data.relational.core.query.CriteriaDefinition;
import org.springframework.data.relational.core.query.CriteriaDefinition.Comparator;
import org.springframework.data.relational.core.query.ValueFunction;
@@ -97,35 +96,6 @@ public class QueryMapper {
return identifier.toSql(this.dialect.getIdentifierProcessing());
}
/**
* Map the {@link Sort} object to apply field name mapping using {@link Class the type to read}.
*
* @param sort must not be {@literal null}.
* @param entity related {@link RelationalPersistentEntity}, can be {@literal null}.
* @return
* @deprecated without replacement.
*/
@Deprecated(since = "3.2", forRemoval = true)
public Sort getMappedObject(Sort sort, @Nullable RelationalPersistentEntity<?> entity) {
if (entity == null) {
return sort;
}
List<Sort.Order> mappedOrder = new ArrayList<>();
for (Sort.Order order : sort) {
SqlSort.validate(order);
Field field = createPropertyField(entity, SqlIdentifier.unquoted(order.getProperty()), this.mappingContext);
mappedOrder.add(
Sort.Order.by(toSql(field.getMappedColumnName())).with(order.getNullHandling()).with(order.getDirection()));
}
return Sort.by(mappedOrder);
}
/**
* Map the {@link Sort} object to apply field name mapping using {@link Class the type to read}.
*
@@ -229,35 +199,6 @@ public class QueryMapper {
return new BoundCondition(bindings, mapped);
}
/**
* Map a {@link Criteria} object into {@link Condition} and consider value/{@code NULL} {@link Bindings}.
*
* @param markers bind markers object, must not be {@literal null}.
* @param criteria criteria definition to map, must not be {@literal null}.
* @param table must not be {@literal null}.
* @param entity related {@link RelationalPersistentEntity}, can be {@literal null}.
* @return the mapped {@link BoundCondition}.
* @deprecated since 1.1.
*/
@Deprecated
public BoundCondition getMappedObject(BindMarkers markers, Criteria criteria, Table table,
@Nullable RelationalPersistentEntity<?> entity) {
Assert.notNull(markers, "BindMarkers must not be null");
Assert.notNull(criteria, "Criteria must not be null");
Assert.notNull(table, "Table must not be null");
MutableBindings bindings = new MutableBindings(markers);
if (criteria.isEmpty()) {
throw new IllegalArgumentException("Cannot map empty Criteria");
}
Condition mapped = unroll(criteria, table, entity, bindings);
return new BoundCondition(bindings, mapped);
}
private Condition unroll(CriteriaDefinition criteria, Table table, @Nullable RelationalPersistentEntity<?> entity,
MutableBindings bindings) {