Top Description Fields Constructors Methods
org.hibernate.bytecode.internal

public Class BytecodeEnhancementMetadataNonPojoImpl

extends Object
implements BytecodeEnhancementMetadata
Class Inheritance
All Implemented Interfaces
org.hibernate.bytecode.spi.BytecodeEnhancementMetadata
Imports
org.hibernate.bytecode.enhance.spi.interceptor.BytecodeLazyAttributeInterceptor, .LazyAttributeLoadingInterceptor, .LazyAttributesMetadata, org.hibernate.bytecode.spi.BytecodeEnhancementMetadata, .NotInstrumentedException, org.hibernate.engine.spi.EntityKey, .PersistentAttributeInterceptable, .PersistentAttributeInterceptor, .SharedSessionContractImplementor, org.checkerframework.checker.nullness.qual.Nullable

BytecodeEnhancementMetadata implementation for non-POJO models, mainly org.hibernate.metamodel.RepresentationMode#MAP
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final LazyAttributesMetadata

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PersistentAttributeInterceptable
createEnhancedProxy(EntityKey keyToLoad, boolean addEmptyEntry, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.createEnhancedProxy.

Create an "enhancement as proxy" instance for the given entity
public @Nullable LazyAttributeLoadingInterceptor
extractInterceptor(Object
The entity from which to extract the interceptor
entity
)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractInterceptor.

Deprecated as a consequence of LazyAttributeLoadingInterceptor being deprecated.
Extract the field interceptor instance from the enhanced entity.
public @Nullable BytecodeLazyAttributeInterceptor
public String
getEntityName()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getEntityName.

The name of the entity to which this metadata applies.
public LazyAttributesMetadata
public boolean
public void
public LazyAttributeLoadingInterceptor
injectInterceptor(Object
The entity into which built interceptor should be injected
entity
,
Object identifier, SharedSessionContractImplementor
The session to which the entity instance belongs.
session
)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Deprecated as a consequence of LazyAttributeLoadingInterceptor being deprecated.
Build and inject an interceptor instance into the enhanced entity.
public void
public boolean
public boolean
isEnhancedForLazyLoading()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isEnhancedForLazyLoading.

Has the entity class been bytecode enhanced for lazy loading?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entityNameback to summary
private final String entityName
errorMsgback to summary
private final String errorMsg
lazyAttributesMetadataback to summary
private final LazyAttributesMetadata lazyAttributesMetadata

Constructor Detail

BytecodeEnhancementMetadataNonPojoImplback to summary
public BytecodeEnhancementMetadataNonPojoImpl(String entityName)

Method Detail

createEnhancedProxyback to summary
public PersistentAttributeInterceptable createEnhancedProxy(EntityKey keyToLoad, boolean addEmptyEntry, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.createEnhancedProxy.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.createEnhancedProxy.

Create an "enhancement as proxy" instance for the given entity

Annotations
@Override
extractInterceptorback to summary
public @Nullable LazyAttributeLoadingInterceptor extractInterceptor(Object entity) throws NotInstrumentedException

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractInterceptor.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractInterceptor.

Deprecated

as a consequence of LazyAttributeLoadingInterceptor being deprecated. See corresponding docs for further information.

Extract the field interceptor instance from the enhanced entity.

Parameters
entity:Object

The entity from which to extract the interceptor

Returns:@Nullable LazyAttributeLoadingInterceptor

The extracted interceptor

Annotations
@Override
Exceptions
NotInstrumentedException:
Thrown if isEnhancedForLazyLoading() returns false
extractLazyInterceptorback to summary
public @Nullable BytecodeLazyAttributeInterceptor extractLazyInterceptor(Object entity) throws NotInstrumentedException

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractLazyInterceptor.

Deprecated

as a consequence of BytecodeLazyAttributeInterceptor being deprecated. See corresponding docs for further information.

Annotations
@Override
getEntityNameback to summary
public String getEntityName()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getEntityName.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getEntityName.

The name of the entity to which this metadata applies.

Returns:String

The entity name

Annotations
@Override
getLazyAttributesMetadataback to summary
public LazyAttributesMetadata getLazyAttributesMetadata()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getLazyAttributesMetadata.

Annotations
@Override
hasUnFetchedAttributesback to summary
public boolean hasUnFetchedAttributes(Object entity)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.hasUnFetchedAttributes.

Annotations
@Override
injectEnhancedEntityAsProxyInterceptorback to summary
public void injectEnhancedEntityAsProxyInterceptor(Object entity, EntityKey entityKey, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectEnhancedEntityAsProxyInterceptor.

Annotations
@Override
injectInterceptorback to summary
public LazyAttributeLoadingInterceptor injectInterceptor(Object entity, Object identifier, SharedSessionContractImplementor session) throws NotInstrumentedException

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Deprecated

as a consequence of LazyAttributeLoadingInterceptor being deprecated. See corresponding docs for further information.

Build and inject an interceptor instance into the enhanced entity.

Parameters
entity:Object

The entity into which built interceptor should be injected

session:SharedSessionContractImplementor

The session to which the entity instance belongs.

Returns:LazyAttributeLoadingInterceptor

The built and injected interceptor

Annotations
@Override
Exceptions
NotInstrumentedException:
Thrown if isEnhancedForLazyLoading() returns false
injectInterceptorback to summary
public void injectInterceptor(Object entity, PersistentAttributeInterceptor interceptor, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Deprecated

as a consequence of PersistentAttributeInterceptor being deprecated. See corresponding docs for further information.

Annotations
@Override
isAttributeLoadedback to summary
public boolean isAttributeLoaded(Object entity, String attributeName)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isAttributeLoaded.

Annotations
@Override
isEnhancedForLazyLoadingback to summary
public boolean isEnhancedForLazyLoading()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isEnhancedForLazyLoading.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isEnhancedForLazyLoading.

Has the entity class been bytecode enhanced for lazy loading?

Returns:boolean

true indicates the entity class is enhanced for Hibernate use in lazy loading; false indicates it is not

Annotations
@Override