23
23
import org .hibernate .boot .spi .MetadataImplementor ;
24
24
import org .hibernate .cache .spi .CacheImplementor ;
25
25
import org .hibernate .graph .RootGraph ;
26
- import org .hibernate .graph .spi .RootGraphImplementor ;
27
26
import org .hibernate .internal .CoreLogging ;
28
27
import org .hibernate .internal .CoreMessageLogger ;
29
28
import org .hibernate .internal .util .collections .ArrayHelper ;
37
36
import org .hibernate .metamodel .mapping .MappingModelExpressible ;
38
37
import org .hibernate .metamodel .mapping .internal .MappingModelCreationProcess ;
39
38
import org .hibernate .metamodel .model .domain .BasicDomainType ;
40
- import org .hibernate .metamodel .model .domain .DomainType ;
41
39
import org .hibernate .metamodel .model .domain .EmbeddableDomainType ;
42
40
import org .hibernate .metamodel .model .domain .EntityDomainType ;
43
41
import org .hibernate .metamodel .model .domain .JpaMetamodel ;
@@ -565,12 +563,12 @@ public CollectionPersister findCollectionDescriptor(String role) {
565
563
}
566
564
567
565
@ Override
568
- public < T > void addNamedEntityGraph (String graphName , RootGraphImplementor < T > entityGraph ) {
566
+ public void addNamedEntityGraph (String graphName , RootGraph <? > entityGraph ) {
569
567
jpaMetamodel .addNamedEntityGraph ( graphName , entityGraph );
570
568
}
571
569
572
570
@ Override
573
- public < T > RootGraphImplementor < T > findEntityGraphByName (String name ) {
571
+ public RootGraph <? > findEntityGraphByName (String name ) {
574
572
return jpaMetamodel .findEntityGraphByName ( name );
575
573
}
576
574
@@ -580,7 +578,7 @@ public <T> Map<String, EntityGraph<? extends T>> getNamedEntityGraphs(Class<T> e
580
578
}
581
579
582
580
@ Override
583
- public <T > List <RootGraphImplementor <? super T >> findEntityGraphsByJavaType (Class <T > entityClass ) {
581
+ public <T > List <RootGraph <? super T >> findEntityGraphsByJavaType (Class <T > entityClass ) {
584
582
return jpaMetamodel .findEntityGraphsByJavaType ( entityClass );
585
583
}
586
584
@@ -639,8 +637,8 @@ public MappingModelExpressible<?> resolveMappingExpressible(
639
637
SqmExpressible <?> sqmExpressible ,
640
638
Function <NavigablePath , TableGroup > tableGroupLocator ) {
641
639
if ( sqmExpressible instanceof SqmPath <?> sqmPath ) {
642
- final DomainType <?> sqmPathType = sqmPath .getResolvedModel ().getPathType ();
643
- if ( sqmPathType instanceof MappingModelExpressible <?> mappingExpressible ) {
640
+ if ( sqmPath .getResolvedModel ().getPathType ()
641
+ instanceof MappingModelExpressible <?> mappingExpressible ) {
644
642
return mappingExpressible ;
645
643
}
646
644
final NavigablePath navigablePath = sqmPath .getNavigablePath ();
@@ -656,7 +654,8 @@ else if ( sqmExpressible instanceof BasicType<?> basicType ) {
656
654
}
657
655
658
656
else if ( sqmExpressible instanceof BasicDomainType <?> ) {
659
- return getTypeConfiguration ().getBasicTypeForJavaType ( sqmExpressible .getRelationalJavaType ().getJavaType () );
657
+ return getTypeConfiguration ()
658
+ .getBasicTypeForJavaType ( sqmExpressible .getRelationalJavaType ().getJavaType () );
660
659
}
661
660
662
661
else if ( sqmExpressible instanceof BasicSqmPathSource <?>
@@ -714,7 +713,9 @@ else if ( sqmExpressible instanceof TupleType<?> tupleType ) {
714
713
715
714
@ Override
716
715
public <T > BindableType <T > resolveQueryParameterType (Class <T > javaClass ) {
717
- final BasicType <T > basicType = getTypeConfiguration ().getBasicTypeForJavaType ( javaClass );
716
+ final TypeConfiguration typeConfiguration = getTypeConfiguration ();
717
+
718
+ final BasicType <T > basicType = typeConfiguration .getBasicTypeForJavaType ( javaClass );
718
719
// For enums, we simply don't know the exact mapping if there is no basic type registered
719
720
if ( basicType != null || javaClass .isEnum () ) {
720
721
return basicType ;
@@ -725,22 +726,22 @@ public <T> BindableType<T> resolveQueryParameterType(Class<T> javaClass) {
725
726
return (BindableType <T >) managedType ;
726
727
}
727
728
728
- final JavaTypeRegistry javaTypeRegistry = getTypeConfiguration () .getJavaTypeRegistry ();
729
+ final JavaTypeRegistry javaTypeRegistry = typeConfiguration .getJavaTypeRegistry ();
729
730
final JavaType <T > javaType = javaTypeRegistry .findDescriptor ( javaClass );
730
731
if ( javaType != null ) {
731
732
final JdbcType recommendedJdbcType =
732
- javaType .getRecommendedJdbcType ( getTypeConfiguration () .getCurrentBaseSqlTypeIndicators () );
733
+ javaType .getRecommendedJdbcType ( typeConfiguration .getCurrentBaseSqlTypeIndicators () );
733
734
if ( recommendedJdbcType != null ) {
734
- return getTypeConfiguration () .getBasicTypeRegistry ().resolve ( javaType , recommendedJdbcType );
735
+ return typeConfiguration .getBasicTypeRegistry ().resolve ( javaType , recommendedJdbcType );
735
736
}
736
737
}
737
738
738
739
if ( javaClass .isArray () && javaTypeRegistry .findDescriptor ( javaClass .getComponentType () ) != null ) {
739
740
final JavaType <T > resolvedJavaType = javaTypeRegistry .resolveDescriptor ( javaClass );
740
741
final JdbcType recommendedJdbcType =
741
- resolvedJavaType .getRecommendedJdbcType ( getTypeConfiguration () .getCurrentBaseSqlTypeIndicators () );
742
+ resolvedJavaType .getRecommendedJdbcType ( typeConfiguration .getCurrentBaseSqlTypeIndicators () );
742
743
if ( recommendedJdbcType != null ) {
743
- return getTypeConfiguration () .getBasicTypeRegistry ().resolve ( resolvedJavaType , recommendedJdbcType );
744
+ return typeConfiguration .getBasicTypeRegistry ().resolve ( resolvedJavaType , recommendedJdbcType );
744
745
}
745
746
}
746
747
0 commit comments