public class BytecodeEnhancementMetadataPojoImpl extends Object implements BytecodeEnhancementMetadata
| Constructor and Description |
|---|
BytecodeEnhancementMetadataPojoImpl(String entityName,
Class entityClass,
boolean enhancedForLazyLoading,
LazyAttributesMetadata lazyAttributesMetadata) |
| Modifier and Type | Method and Description |
|---|---|
LazyAttributeLoadingInterceptor |
extractInterceptor(Object entity)
Extract the field interceptor instance from the enhanced entity.
|
static BytecodeEnhancementMetadata |
from(PersistentClass persistentClass) |
String |
getEntityName()
The name of the entity to which this metadata applies.
|
LazyAttributesMetadata |
getLazyAttributesMetadata() |
boolean |
hasUnFetchedAttributes(Object entity) |
LazyAttributeLoadingInterceptor |
injectInterceptor(Object entity,
SessionImplementor session)
Build and inject an interceptor instance into the enhanced entity.
|
boolean |
isEnhancedForLazyLoading()
Has the entity class been bytecode enhanced for lazy loading?
|
public BytecodeEnhancementMetadataPojoImpl(String entityName, Class entityClass, boolean enhancedForLazyLoading, LazyAttributesMetadata lazyAttributesMetadata)
public static BytecodeEnhancementMetadata from(PersistentClass persistentClass)
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 LazyAttributeLoadingInterceptor extractInterceptor(Object entity) throws NotInstrumentedException
BytecodeEnhancementMetadataextractInterceptor in interface BytecodeEnhancementMetadataentity - The entity from which to extract the interceptorNotInstrumentedException - Thrown if BytecodeEnhancementMetadata.isEnhancedForLazyLoading() returns falsepublic LazyAttributeLoadingInterceptor injectInterceptor(Object entity, SessionImplementor session)
BytecodeEnhancementMetadatainjectInterceptor in interface BytecodeEnhancementMetadataentity - The entity into which built interceptor should be injectedsession - The session to which the entity instance belongs.Copyright © 2018 JBoss by Red Hat. All rights reserved.