public interface BytecodeEnhancementMetadata
Modifier and Type | Method and Description |
---|---|
PersistentAttributeInterceptable |
createEnhancedProxy(EntityKey keyToLoad,
boolean addEmptyEntry,
SharedSessionContractImplementor session)
Create an "enhancement as proxy" instance for the given entity
|
LazyAttributeLoadingInterceptor |
extractInterceptor(java.lang.Object entity)
Extract the field interceptor instance from the enhanced entity.
|
BytecodeLazyAttributeInterceptor |
extractLazyInterceptor(java.lang.Object entity) |
java.lang.String |
getEntityName()
The name of the entity to which this metadata applies.
|
LazyAttributesMetadata |
getLazyAttributesMetadata() |
boolean |
hasUnFetchedAttributes(java.lang.Object entity) |
void |
injectEnhancedEntityAsProxyInterceptor(java.lang.Object entity,
EntityKey entityKey,
SharedSessionContractImplementor session) |
LazyAttributeLoadingInterceptor |
injectInterceptor(java.lang.Object entity,
java.lang.Object identifier,
SharedSessionContractImplementor session)
Build and inject an interceptor instance into the enhanced entity.
|
void |
injectInterceptor(java.lang.Object entity,
PersistentAttributeInterceptor interceptor,
SharedSessionContractImplementor session) |
boolean |
isAttributeLoaded(java.lang.Object entity,
java.lang.String attributeName) |
boolean |
isEnhancedForLazyLoading()
Has the entity class been bytecode enhanced for lazy loading?
|
java.lang.String getEntityName()
boolean isEnhancedForLazyLoading()
true
indicates the entity class is enhanced for Hibernate use
in lazy loading; false
indicates it is notLazyAttributesMetadata getLazyAttributesMetadata()
PersistentAttributeInterceptable createEnhancedProxy(EntityKey keyToLoad, boolean addEmptyEntry, SharedSessionContractImplementor session)
LazyAttributeLoadingInterceptor injectInterceptor(java.lang.Object entity, java.lang.Object identifier, SharedSessionContractImplementor session) throws NotInstrumentedException
entity
- The entity into which built interceptor should be injectedidentifier
- session
- The session to which the entity instance belongs.NotInstrumentedException
- Thrown if isEnhancedForLazyLoading()
returns false
void injectInterceptor(java.lang.Object entity, PersistentAttributeInterceptor interceptor, SharedSessionContractImplementor session)
void injectEnhancedEntityAsProxyInterceptor(java.lang.Object entity, EntityKey entityKey, SharedSessionContractImplementor session)
LazyAttributeLoadingInterceptor extractInterceptor(java.lang.Object entity) throws NotInstrumentedException
entity
- The entity from which to extract the interceptorNotInstrumentedException
- Thrown if isEnhancedForLazyLoading()
returns false
BytecodeLazyAttributeInterceptor extractLazyInterceptor(java.lang.Object entity) throws NotInstrumentedException
NotInstrumentedException
boolean hasUnFetchedAttributes(java.lang.Object entity)
boolean isAttributeLoaded(java.lang.Object entity, java.lang.String attributeName)
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.