47
47
import org .springframework .data .elasticsearch .core .query .Query ;
48
48
import org .springframework .data .elasticsearch .core .query .SeqNoPrimaryTerm ;
49
49
import org .springframework .data .elasticsearch .core .query .SourceFilter ;
50
+ import org .springframework .data .mapping .InstanceCreatorMetadata ;
50
51
import org .springframework .data .mapping .MappingException ;
52
+ import org .springframework .data .mapping .Parameter ;
51
53
import org .springframework .data .mapping .PersistentPropertyAccessor ;
52
- import org .springframework .data .mapping .PreferredConstructor ;
53
54
import org .springframework .data .mapping .SimplePropertyHandler ;
54
55
import org .springframework .data .mapping .context .MappingContext ;
55
56
import org .springframework .data .mapping .model .*;
@@ -307,11 +308,10 @@ private <R> R readEntity(ElasticsearchPersistentEntity<?> entity, Map<String, Ob
307
308
SpELExpressionEvaluator evaluator = new DefaultSpELExpressionEvaluator (source , spELContext );
308
309
MapValueAccessor accessor = new MapValueAccessor (source );
309
310
310
- PreferredConstructor <?, ElasticsearchPersistentProperty > persistenceConstructor = entity
311
- .getPersistenceConstructor ();
311
+ InstanceCreatorMetadata <?> creatorMetadata = entity .getInstanceCreatorMetadata ();
312
312
313
- ParameterValueProvider <ElasticsearchPersistentProperty > propertyValueProvider = persistenceConstructor != null
314
- && persistenceConstructor .hasParameters () ? getParameterProvider (entity , accessor , evaluator )
313
+ ParameterValueProvider <ElasticsearchPersistentProperty > propertyValueProvider = creatorMetadata != null
314
+ && creatorMetadata .hasParameters () ? getParameterProvider (entity , accessor , evaluator )
315
315
: NoOpParameterValueProvider .INSTANCE ;
316
316
317
317
EntityInstantiator instantiator = instantiators .getInstantiatorFor (targetEntity );
@@ -649,8 +649,7 @@ public ConverterAwareSpELExpressionParameterValueProvider(SpELExpressionEvaluato
649
649
* @see org.springframework.data.mapping.model.SpELExpressionParameterValueProvider#potentiallyConvertSpelValue(java.lang.Object, org.springframework.data.mapping.PreferredConstructor.Parameter)
650
650
*/
651
651
@ Override
652
- protected <T > T potentiallyConvertSpelValue (Object object ,
653
- PreferredConstructor .Parameter <T , ElasticsearchPersistentProperty > parameter ) {
652
+ protected <T > T potentiallyConvertSpelValue (Object object , Parameter <T , ElasticsearchPersistentProperty > parameter ) {
654
653
return readValue (object , parameter .getType ());
655
654
}
656
655
}
@@ -660,7 +659,7 @@ enum NoOpParameterValueProvider implements ParameterValueProvider<ElasticsearchP
660
659
INSTANCE ;
661
660
662
661
@ Override
663
- public <T > T getParameterValue (PreferredConstructor . Parameter <T , ElasticsearchPersistentProperty > parameter ) {
662
+ public <T > T getParameterValue (Parameter <T , ElasticsearchPersistentProperty > parameter ) {
664
663
return null ;
665
664
}
666
665
}
0 commit comments