public interface BytecodeEnhancementMetadata
Encapsulates bytecode enhancement information about a particular entity.
Modifier and Type | Method and Description |
---|---|
LazyAttributeLoadingInterceptor |
extractInterceptor(Object entity)
Extract the field interceptor instance from the enhanced entity.
|
String |
getEntityName()
The name of the entity to which this metadata applies.
|
LazyAttributesMetadata |
getLazyAttributesMetadata() |
boolean |
hasUnFetchedAttributes(Object entity) |
LazyAttributeLoadingInterceptor |
injectInterceptor(Object entity,
SharedSessionContractImplementor session)
Build and inject an interceptor instance into the enhanced entity.
|
boolean |
isAttributeLoaded(Object entity,
String attributeName) |
boolean |
isEnhancedForLazyLoading()
Has the entity class been bytecode enhanced for lazy loading?
|
String getEntityName()
The name of the entity to which this metadata applies.
boolean isEnhancedForLazyLoading()
Has the entity class been bytecode enhanced for lazy loading?
true
indicates the entity class is enhanced for Hibernate use
in lazy loading; false
indicates it is notLazyAttributesMetadata getLazyAttributesMetadata()
LazyAttributeLoadingInterceptor injectInterceptor(Object entity, SharedSessionContractImplementor session) throws NotInstrumentedException
Build and inject an interceptor instance into the enhanced entity.
entity
- The entity into which built interceptor should be injectedsession
- The session to which the entity instance belongs.NotInstrumentedException
- Thrown if isEnhancedForLazyLoading()
returns false
LazyAttributeLoadingInterceptor extractInterceptor(Object entity) throws NotInstrumentedException
Extract the field interceptor instance from the enhanced entity.
entity
- The entity from which to extract the interceptorNotInstrumentedException
- Thrown if isEnhancedForLazyLoading()
returns false
boolean hasUnFetchedAttributes(Object entity)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.