接口 BytecodeEnhancementMetadata
-
public interface BytecodeEnhancementMetadataEncapsulates bytecode enhancement information about a particular entity.- 作者:
- Steve Ebersole
-
-
方法概要
-
-
-
方法详细资料
-
getEntityName
String getEntityName()
The name of the entity to which this metadata applies.- 返回:
- The entity name
-
isEnhancedForLazyLoading
boolean isEnhancedForLazyLoading()
Has the entity class been bytecode enhanced for lazy loading?- 返回:
trueindicates the entity class is enhanced for Hibernate use in lazy loading;falseindicates it is not
-
getLazyAttributesMetadata
LazyAttributesMetadata getLazyAttributesMetadata()
-
createEnhancedProxy
PersistentAttributeInterceptable createEnhancedProxy(EntityKey keyToLoad, boolean addEmptyEntry, SharedSessionContractImplementor session)
Create an "enhancement as proxy" instance for the given entity
-
injectInterceptor
LazyAttributeLoadingInterceptor injectInterceptor(Object entity, Object identifier, SharedSessionContractImplementor session) throws NotInstrumentedException
Build and inject an interceptor instance into the enhanced entity.- 参数:
entity- The entity into which built interceptor should be injectedidentifier-session- The session to which the entity instance belongs.- 返回:
- The built and injected interceptor
- 抛出:
NotInstrumentedException- Thrown ifisEnhancedForLazyLoading()returnsfalse
-
injectInterceptor
void injectInterceptor(Object entity, PersistentAttributeInterceptor interceptor, SharedSessionContractImplementor session)
-
injectEnhancedEntityAsProxyInterceptor
void injectEnhancedEntityAsProxyInterceptor(Object entity, EntityKey entityKey, SharedSessionContractImplementor session)
-
extractInterceptor
LazyAttributeLoadingInterceptor extractInterceptor(Object entity) throws NotInstrumentedException
Extract the field interceptor instance from the enhanced entity.- 参数:
entity- The entity from which to extract the interceptor- 返回:
- The extracted interceptor
- 抛出:
NotInstrumentedException- Thrown ifisEnhancedForLazyLoading()returnsfalse
-
extractLazyInterceptor
BytecodeLazyAttributeInterceptor extractLazyInterceptor(Object entity) throws NotInstrumentedException
-
hasUnFetchedAttributes
boolean hasUnFetchedAttributes(Object entity)
-
-