Remove deprecated EntityInstantiator in convert package in favor of instantiators in mapping.model.

See #2466
This commit is contained in:
Mark Paluch
2021-09-20 13:44:15 +02:00
committed by Jens Schauder
parent 582319a5fe
commit aecdf5001a
11 changed files with 64 additions and 390 deletions

View File

@@ -74,7 +74,7 @@ class ClassGeneratingEntityInstantiator implements EntityInstantiator {
/*
* (non-Javadoc)
* @see org.springframework.data.convert.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
* @see org.springframework.data.mapping.model.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
*/
@Override
public <T, E extends PersistentEntity<? extends T, P>, P extends PersistentProperty<P>> T createInstance(E entity,
@@ -238,7 +238,7 @@ class ClassGeneratingEntityInstantiator implements EntityInstantiator {
/*
* (non-Javadoc)
* @see org.springframework.data.convert.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
* @see org.springframework.data.mapping.model.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
*/
@Override
@SuppressWarnings("unchecked")

View File

@@ -1,40 +0,0 @@
/*
* Copyright 2020-2021 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
*
* https://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.mapping.model;
/**
* Factory to expose the new package-protected {@link EntityInstantiator} implementations for the legacy types. To be
* removed in 2.4.
*
* @author Oliver Drotbohm
* @since 2.3
* @deprecated since 2.3 as it's only a bridge from the legacy types towards the new, package-protected implementation.
*/
@Deprecated
public class InternalEntityInstantiatorFactory {
public static EntityInstantiator getClassGeneratingEntityInstantiator() {
return new ClassGeneratingEntityInstantiator();
}
public static EntityInstantiator getKotlinClassGeneratingEntityInstantiator() {
return new KotlinClassGeneratingEntityInstantiator();
}
public static EntityInstantiator getReflectionEntityInstantiator() {
return ReflectionEntityInstantiator.INSTANCE;
}
}

View File

@@ -44,7 +44,7 @@ class KotlinClassGeneratingEntityInstantiator extends ClassGeneratingEntityInsta
/*
* (non-Javadoc)
* @see org.springframework.data.convert.ClassGeneratingEntityInstantiator#doCreateEntityInstantiator(org.springframework.data.mapping.PersistentEntity)
* @see org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator#doCreateEntityInstantiator(org.springframework.data.mapping.PersistentEntity)
*/
@Override
protected EntityInstantiator doCreateEntityInstantiator(PersistentEntity<?, ?> entity) {
@@ -192,7 +192,7 @@ class KotlinClassGeneratingEntityInstantiator extends ClassGeneratingEntityInsta
/*
* (non-Javadoc)
* @see org.springframework.data.convert.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
* @see org.springframework.data.mapping.model.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
*/
@Override
@SuppressWarnings("unchecked")