public final class BytecodeEnhancementMetadataPojoImpl extends Object implements BytecodeEnhancementMetadata
| Modifier | Constructor and Description |
|---|---|
protected |
BytecodeEnhancementMetadataPojoImpl(String entityName,
Class entityClass,
Set<String> identifierAttributeNames,
CompositeType nonAggregatedCidMapper,
boolean enhancedForLazyLoading,
LazyAttributesMetadata lazyAttributesMetadata) |
| Modifier and Type | Method and Description |
|---|---|
PersistentAttributeInterceptable |
createEnhancedProxy(EntityKey entityKey,
boolean addEmptyEntry,
SharedSessionContractImplementor session)
Create an "enhancement as proxy" instance for the given entity
|
LazyAttributeLoadingInterceptor |
extractInterceptor(Object entity)
Extract the field interceptor instance from the enhanced entity.
|
BytecodeLazyAttributeInterceptor |
extractLazyInterceptor(Object entity) |
static BytecodeEnhancementMetadata |
from(PersistentClass persistentClass,
Set<String> identifierAttributeNames,
CompositeType nonAggregatedCidMapper,
boolean allowEnhancementAsProxy,
boolean collectionsInDefaultFetchGroupEnabled)
Static constructor
|
String |
getEntityName()
The name of the entity to which this metadata applies.
|
LazyAttributesMetadata |
getLazyAttributesMetadata() |
boolean |
hasUnFetchedAttributes(Object entity) |
void |
injectEnhancedEntityAsProxyInterceptor(Object entity,
EntityKey entityKey,
SharedSessionContractImplementor session) |
LazyAttributeLoadingInterceptor |
injectInterceptor(Object entity,
Object identifier,
SharedSessionContractImplementor session)
Build and inject an interceptor instance into the enhanced entity.
|
void |
injectInterceptor(Object entity,
PersistentAttributeInterceptor interceptor,
SharedSessionContractImplementor session) |
boolean |
isAttributeLoaded(Object entity,
String attributeName) |
boolean |
isEnhancedForLazyLoading()
Has the entity class been bytecode enhanced for lazy loading?
|
protected BytecodeEnhancementMetadataPojoImpl(String entityName, Class entityClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean enhancedForLazyLoading, LazyAttributesMetadata lazyAttributesMetadata)
public static BytecodeEnhancementMetadata from(PersistentClass persistentClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean allowEnhancementAsProxy, boolean collectionsInDefaultFetchGroupEnabled)
public String getEntityName()
BytecodeEnhancementMetadatagetEntityName in interface BytecodeEnhancementMetadatapublic boolean isEnhancedForLazyLoading()
BytecodeEnhancementMetadataisEnhancedForLazyLoading in interface BytecodeEnhancementMetadatatrue indicates the entity class is enhanced for Hibernate use
in lazy loading; false indicates it is notpublic LazyAttributesMetadata getLazyAttributesMetadata()
getLazyAttributesMetadata in interface BytecodeEnhancementMetadatapublic boolean hasUnFetchedAttributes(Object entity)
hasUnFetchedAttributes in interface BytecodeEnhancementMetadatapublic boolean isAttributeLoaded(Object entity, String attributeName)
isAttributeLoaded in interface BytecodeEnhancementMetadatapublic LazyAttributeLoadingInterceptor extractInterceptor(Object entity) throws NotInstrumentedException
BytecodeEnhancementMetadataextractInterceptor in interface BytecodeEnhancementMetadataentity - The entity from which to extract the interceptorNotInstrumentedException - Thrown if BytecodeEnhancementMetadata.isEnhancedForLazyLoading() returns falsepublic PersistentAttributeInterceptable createEnhancedProxy(EntityKey entityKey, boolean addEmptyEntry, SharedSessionContractImplementor session)
BytecodeEnhancementMetadatacreateEnhancedProxy in interface BytecodeEnhancementMetadatapublic LazyAttributeLoadingInterceptor injectInterceptor(Object entity, Object identifier, SharedSessionContractImplementor session)
BytecodeEnhancementMetadatainjectInterceptor in interface BytecodeEnhancementMetadataentity - The entity into which built interceptor should be injectedsession - The session to which the entity instance belongs.public void injectEnhancedEntityAsProxyInterceptor(Object entity, EntityKey entityKey, SharedSessionContractImplementor session)
injectEnhancedEntityAsProxyInterceptor in interface BytecodeEnhancementMetadatapublic void injectInterceptor(Object entity, PersistentAttributeInterceptor interceptor, SharedSessionContractImplementor session)
injectInterceptor in interface BytecodeEnhancementMetadatapublic BytecodeLazyAttributeInterceptor extractLazyInterceptor(Object entity) throws NotInstrumentedException
extractLazyInterceptor in interface BytecodeEnhancementMetadataNotInstrumentedExceptionCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.