Skip to content

Commit eaf01a3

Browse files
committed
HHH-19536 Flattening hierarchy of BytecodeLazyAttributeInterceptor: delete intermediate abstract class AbstractLazyLoadInterceptor
1 parent 9e1c6a3 commit eaf01a3

File tree

3 files changed

+6
-27
lines changed

3 files changed

+6
-27
lines changed

hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/AbstractLazyLoadInterceptor.java

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

hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/EnhancementAsProxyLazinessInterceptor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* @author Steve Ebersole
2727
*/
28-
public class EnhancementAsProxyLazinessInterceptor extends AbstractLazyLoadInterceptor {
28+
public class EnhancementAsProxyLazinessInterceptor extends AbstractInterceptor implements BytecodeLazyAttributeInterceptor {
2929
private final Set<String> identifierAttributeNames;
3030
private final CompositeType nonAggregatedCidMapper;
3131

@@ -45,7 +45,7 @@ public EnhancementAsProxyLazinessInterceptor(
4545
CompositeType nonAggregatedCidMapper,
4646
EntityKey entityKey,
4747
SharedSessionContractImplementor session) {
48-
super( entityName, session );
48+
super( entityName );
4949

5050
this.identifierAttributeNames = identifierAttributeNames;
5151
assert identifierAttributeNames != null;
@@ -54,6 +54,7 @@ public EnhancementAsProxyLazinessInterceptor(
5454
assert nonAggregatedCidMapper != null || identifierAttributeNames.size() == 1;
5555

5656
this.entityKey = entityKey;
57+
setSession( session );
5758

5859
final EntityPersister entityPersister =
5960
session.getFactory().getMappingMetamodel()

hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/LazyAttributeLoadingInterceptor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @author Luis Barreiro
2828
* @author Steve Ebersole
2929
*/
30-
public class LazyAttributeLoadingInterceptor extends AbstractLazyLoadInterceptor {
30+
public class LazyAttributeLoadingInterceptor extends AbstractInterceptor implements BytecodeLazyAttributeInterceptor {
3131
private final Object identifier;
3232

3333
//N.B. this Set needs to be treated as immutable
@@ -40,9 +40,10 @@ public LazyAttributeLoadingInterceptor(
4040
Object identifier,
4141
Set<String> lazyFields,
4242
SharedSessionContractImplementor session) {
43-
super( entityName, session );
43+
super( entityName );
4444
this.identifier = identifier;
4545
this.lazyFields = lazyFields;
46+
setSession( session );
4647
}
4748

4849
@Override

0 commit comments

Comments
 (0)