/** * Whether or not this class can be lazy (ie intercepted) */ public boolean isInstrumented() { return bytecodeEnhancementMetadata.isEnhancedForLazyLoading(); }
public boolean isInstrumented() { return entityMetamodel.getBytecodeEnhancementMetadata().isEnhancedForLazyLoading(); }
@Override public boolean hasProxy() { return entityMetamodel.isLazy() && !entityMetamodel.getBytecodeEnhancementMetadata().isEnhancedForLazyLoading(); }
public boolean hasProxy() { // skip proxy instantiation if entity is bytecode enhanced return entityMetamodel.isLazy() && !entityMetamodel.getBytecodeEnhancementMetadata().isEnhancedForLazyLoading(); }
protected boolean shouldGetAllProperties(Object entity) { if ( !getEntityMetamodel().getBytecodeEnhancementMetadata().isEnhancedForLazyLoading() ) { return true; } return !getEntityMetamodel().getBytecodeEnhancementMetadata().hasUnFetchedAttributes( entity ); }
protected Map<String,String> generateLazySelectStringsByFetchGroup() { final BytecodeEnhancementMetadata enhancementMetadata = entityMetamodel.getBytecodeEnhancementMetadata(); if ( !enhancementMetadata.isEnhancedForLazyLoading() || !enhancementMetadata.getLazyAttributesMetadata().hasLazyAttributes() ) { return Collections.emptyMap();
this.proxyInterface = mappedEntity.getProxyInterface(); this.lifecycleImplementor = Lifecycle.class.isAssignableFrom( mappedClass ); this.isBytecodeEnhanced = entityMetamodel.getBytecodeEnhancementMetadata().isEnhancedForLazyLoading();
public void afterReassociate(Object entity, SharedSessionContractImplementor session) { if ( getEntityMetamodel().getBytecodeEnhancementMetadata().isEnhancedForLazyLoading() ) { LazyAttributeLoadingInterceptor interceptor = getEntityMetamodel().getBytecodeEnhancementMetadata().extractInterceptor( entity ); if ( interceptor == null ) { getEntityMetamodel().getBytecodeEnhancementMetadata().injectInterceptor( entity, session ); } else { interceptor.setSession( session ); } } handleNaturalIdReattachment( entity, session ); }
i, prop, bytecodeEnhancementMetadata.isEnhancedForLazyLoading() ); i, prop, bytecodeEnhancementMetadata.isEnhancedForLazyLoading() ); boolean lazy = prop.isLazy() && bytecodeEnhancementMetadata.isEnhancedForLazyLoading(); if ( lazy ) { hasLazy = true; || ( getBytecodeEnhancementMetadata().isEnhancedForLazyLoading() && getBytecodeEnhancementMetadata().getLazyAttributesMetadata().getFetchGroupNames().size() > 1 ); dynamicInsert = persistentClass.useDynamicInsert();
if ( entityMetamodel.isLazy() && !entityMetamodel.getBytecodeEnhancementMetadata().isEnhancedForLazyLoading() ) { proxyFactory = buildProxyFactory( mappingInfo, idGetter, idSetter ); if ( proxyFactory == null ) {
if ( bytecodeEnhancementMetadata.isEnhancedForLazyLoading() ) {
final boolean isBytecodeEnhanced = persister.getOwnerEntityPersister().getInstrumentationMetadata().isEnhancedForLazyLoading(); if ( isBytecodeEnhanced && !collection.wasInitialized() ) {
final EntityTypeDescriptor container = (EntityTypeDescriptor) runtimeModelContainer; if ( !container.hasProxy() && !container.getBytecodeEnhancementMetadata() .isEnhancedForLazyLoading() ) { return FetchTiming.IMMEDIATE;
@Override public void resolveInstance(RowProcessingState rowProcessingState) { fkValue = fkValueAssembler.assemble( rowProcessingState ); // todo (6.0) : technically the entity could be managed or cached already. who/what handles that? // todo (6.0) : could also be getting loaded elsewhere (LoadingEntityEntry) if ( fkValue == null ) { // todo (6.0) : check this is the correct behaviour entityInstance = null; } else { if ( fetchedNavigable.getEntityDescriptor().hasProxy() ) { entityInstance = fetchedNavigable.getEntityDescriptor().createProxy( fkValue, rowProcessingState.getSession() ); } else if ( fetchedNavigable.getEntityDescriptor() .getBytecodeEnhancementMetadata() .isEnhancedForLazyLoading() ) { entityInstance = fetchedNavigable.getEntityDescriptor().instantiate( fkValue, rowProcessingState.getSession() ); } notifyParentResolutionListeners( entityInstance ); } }
this.hasProxy = bootMapping.hasProxy() && !bytecodeEnhancementMetadata.isEnhancedForLazyLoading(); proxyInterface = bootMapping.getProxyInterface();
final boolean isBytecodeEnhanced = ownerEntityDescriptor.getBytecodeEnhancementMetadata().isEnhancedForLazyLoading(); if ( isBytecodeEnhanced && !collection.wasInitialized() ) {