类 BytecodeEnhancementMetadataPojoImpl
- java.lang.Object
-
- org.hibernate.tuple.entity.BytecodeEnhancementMetadataPojoImpl
-
- 所有已实现的接口:
BytecodeEnhancementMetadata
public final class BytecodeEnhancementMetadataPojoImpl extends Object implements BytecodeEnhancementMetadata
- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 限定符 构造器 说明 protectedBytecodeEnhancementMetadataPojoImpl(String entityName, Class entityClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean enhancedForLazyLoading, LazyAttributesMetadata lazyAttributesMetadata)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 PersistentAttributeInterceptablecreateEnhancedProxy(EntityKey entityKey, boolean addEmptyEntry, SharedSessionContractImplementor session)Create an "enhancement as proxy" instance for the given entityLazyAttributeLoadingInterceptorextractInterceptor(Object entity)Extract the field interceptor instance from the enhanced entity.BytecodeLazyAttributeInterceptorextractLazyInterceptor(Object entity)static BytecodeEnhancementMetadatafrom(PersistentClass persistentClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean allowEnhancementAsProxy)Static constructorStringgetEntityName()The name of the entity to which this metadata applies.LazyAttributesMetadatagetLazyAttributesMetadata()booleanhasUnFetchedAttributes(Object entity)voidinjectEnhancedEntityAsProxyInterceptor(Object entity, EntityKey entityKey, SharedSessionContractImplementor session)LazyAttributeLoadingInterceptorinjectInterceptor(Object entity, Object identifier, SharedSessionContractImplementor session)Build and inject an interceptor instance into the enhanced entity.voidinjectInterceptor(Object entity, PersistentAttributeInterceptor interceptor, SharedSessionContractImplementor session)booleanisAttributeLoaded(Object entity, String attributeName)booleanisEnhancedForLazyLoading()Has the entity class been bytecode enhanced for lazy loading?
-
-
-
构造器详细资料
-
BytecodeEnhancementMetadataPojoImpl
protected BytecodeEnhancementMetadataPojoImpl(String entityName, Class entityClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean enhancedForLazyLoading, LazyAttributesMetadata lazyAttributesMetadata)
-
-
方法详细资料
-
from
public static BytecodeEnhancementMetadata from(PersistentClass persistentClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean allowEnhancementAsProxy)
Static constructor
-
getEntityName
public String getEntityName()
从接口复制的说明:BytecodeEnhancementMetadataThe name of the entity to which this metadata applies.- 指定者:
getEntityName在接口中BytecodeEnhancementMetadata- 返回:
- The entity name
-
isEnhancedForLazyLoading
public boolean isEnhancedForLazyLoading()
从接口复制的说明:BytecodeEnhancementMetadataHas the entity class been bytecode enhanced for lazy loading?- 指定者:
isEnhancedForLazyLoading在接口中BytecodeEnhancementMetadata- 返回:
trueindicates the entity class is enhanced for Hibernate use in lazy loading;falseindicates it is not
-
getLazyAttributesMetadata
public LazyAttributesMetadata getLazyAttributesMetadata()
-
hasUnFetchedAttributes
public boolean hasUnFetchedAttributes(Object entity)
-
isAttributeLoaded
public boolean isAttributeLoaded(Object entity, String attributeName)
- 指定者:
isAttributeLoaded在接口中BytecodeEnhancementMetadata
-
extractInterceptor
public LazyAttributeLoadingInterceptor extractInterceptor(Object entity) throws NotInstrumentedException
从接口复制的说明:BytecodeEnhancementMetadataExtract the field interceptor instance from the enhanced entity.- 指定者:
extractInterceptor在接口中BytecodeEnhancementMetadata- 参数:
entity- The entity from which to extract the interceptor- 返回:
- The extracted interceptor
- 抛出:
NotInstrumentedException- Thrown ifBytecodeEnhancementMetadata.isEnhancedForLazyLoading()returnsfalse
-
createEnhancedProxy
public PersistentAttributeInterceptable createEnhancedProxy(EntityKey entityKey, boolean addEmptyEntry, SharedSessionContractImplementor session)
从接口复制的说明:BytecodeEnhancementMetadataCreate an "enhancement as proxy" instance for the given entity
-
injectInterceptor
public LazyAttributeLoadingInterceptor injectInterceptor(Object entity, Object identifier, SharedSessionContractImplementor session)
从接口复制的说明:BytecodeEnhancementMetadataBuild and inject an interceptor instance into the enhanced entity.- 指定者:
injectInterceptor在接口中BytecodeEnhancementMetadata- 参数:
entity- The entity into which built interceptor should be injectedsession- The session to which the entity instance belongs.- 返回:
- The built and injected interceptor
-
injectEnhancedEntityAsProxyInterceptor
public void injectEnhancedEntityAsProxyInterceptor(Object entity, EntityKey entityKey, SharedSessionContractImplementor session)
-
injectInterceptor
public void injectInterceptor(Object entity, PersistentAttributeInterceptor interceptor, SharedSessionContractImplementor session)
- 指定者:
injectInterceptor在接口中BytecodeEnhancementMetadata
-
extractLazyInterceptor
public BytecodeLazyAttributeInterceptor extractLazyInterceptor(Object entity) throws NotInstrumentedException
-
-