Top Fields Constructors Methods
org.hibernate.tuple.entity

public final Class BytecodeEnhancementMetadataPojoImpl

extends Object
implements BytecodeEnhancementMetadata
Class Inheritance
All Implemented Interfaces
org.hibernate.bytecode.spi.BytecodeEnhancementMetadata
Imports
java.io.Serializable, java.util.Set, org.hibernate.LockMode, org.hibernate.bytecode.enhance.spi.interceptor.BytecodeLazyAttributeInterceptor, .EnhancementAsProxyLazinessInterceptor, .LazyAttributeLoadingInterceptor, .LazyAttributesMetadata, org.hibernate.bytecode.spi.BytecodeEnhancementMetadata, .NotInstrumentedException, org.hibernate.engine.internal.ManagedTypeHelper, org.hibernate.engine.spi.EntityKey, .PersistenceContext, .PersistentAttributeInterceptable, .PersistentAttributeInterceptor, .SelfDirtinessTracker, .SharedSessionContractImplementor, .Status, org.hibernate.mapping.PersistentClass, org.hibernate.persister.entity.EntityPersister, org.hibernate.persister.spi.PersisterCreationContext, org.hibernate.type.CompositeType

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final boolean
private final Class<T>
private final String
private final Set<String>
private final LazyAttributesMetadata
private final CompositeType

Constructor Summary

AccessConstructor and Description
protected
BytecodeEnhancementMetadataPojoImpl(String entityName, Class<T> entityClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean enhancedForLazyLoading, LazyAttributesMetadata lazyAttributesMetadata)

Method Summary

Modifier and TypeMethod and Description
public PersistentAttributeInterceptable
createEnhancedProxy(EntityKey entityKey, boolean addEmptyEntry, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.createEnhancedProxy.

Create an "enhancement as proxy" instance for the given entity
public LazyAttributeLoadingInterceptor
extractInterceptor(Object
The entity from which to extract the interceptor
entity
)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractInterceptor.

Deprecated as a consequence of LazyAttributeLoadingInterceptor being deprecated.
Extract the field interceptor instance from the enhanced entity.
public BytecodeLazyAttributeInterceptor
public static BytecodeEnhancementMetadata
from(PersistentClass persistentClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean collectionsInDefaultFetchGroupEnabled, PersisterCreationContext creationContext)

Static constructor

public String
getEntityName()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getEntityName.

The name of the entity to which this metadata applies.
public LazyAttributesMetadata
public boolean
public void
public LazyAttributeLoadingInterceptor
injectInterceptor(Object
The entity into which built interceptor should be injected
entity
,
Object identifier, SharedSessionContractImplementor
The session to which the entity instance belongs.
session
)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Deprecated as a consequence of LazyAttributeLoadingInterceptor being deprecated.
Build and inject an interceptor instance into the enhanced entity.
public void
public boolean
public boolean
isEnhancedForLazyLoading()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isEnhancedForLazyLoading.

Has the entity class been bytecode enhanced for lazy loading?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enhancedForLazyLoadingback to summary
private final boolean enhancedForLazyLoading
entityClassback to summary
private final Class<T> entityClass
entityNameback to summary
private final String entityName
identifierAttributeNamesback to summary
private final Set<String> identifierAttributeNames
lazyAttributesMetadataback to summary
private final LazyAttributesMetadata lazyAttributesMetadata
nonAggregatedCidMapperback to summary
private final CompositeType nonAggregatedCidMapper

Constructor Detail

BytecodeEnhancementMetadataPojoImplback to summary
protected BytecodeEnhancementMetadataPojoImpl(String entityName, Class<T> entityClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean enhancedForLazyLoading, LazyAttributesMetadata lazyAttributesMetadata)
Annotations
@SuppressWarnings:WeakerAccess

Method Detail

createEnhancedProxyback to summary
public PersistentAttributeInterceptable createEnhancedProxy(EntityKey entityKey, boolean addEmptyEntry, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.createEnhancedProxy.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.createEnhancedProxy.

Create an "enhancement as proxy" instance for the given entity

Annotations
@Override
extractInterceptorback to summary
public LazyAttributeLoadingInterceptor extractInterceptor(Object entity) throws NotInstrumentedException

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractInterceptor.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractInterceptor.

Deprecated

as a consequence of LazyAttributeLoadingInterceptor being deprecated. See corresponding docs for further information.

Extract the field interceptor instance from the enhanced entity.

Parameters
entity:Object

The entity from which to extract the interceptor

Returns:LazyAttributeLoadingInterceptor

The extracted interceptor

Annotations
@Override
Exceptions
NotInstrumentedException:
Thrown if isEnhancedForLazyLoading() returns false
extractLazyInterceptorback to summary
public BytecodeLazyAttributeInterceptor extractLazyInterceptor(Object entity) throws NotInstrumentedException

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.extractLazyInterceptor.

Deprecated

as a consequence of BytecodeLazyAttributeInterceptor being deprecated. See corresponding docs for further information.

Annotations
@Override
fromback to summary
public static BytecodeEnhancementMetadata from(PersistentClass persistentClass, Set<String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, boolean collectionsInDefaultFetchGroupEnabled, PersisterCreationContext creationContext)

Static constructor

getEntityNameback to summary
public String getEntityName()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getEntityName.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getEntityName.

The name of the entity to which this metadata applies.

Returns:String

The entity name

Annotations
@Override
getLazyAttributesMetadataback to summary
public LazyAttributesMetadata getLazyAttributesMetadata()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.getLazyAttributesMetadata.

Annotations
@Override
hasUnFetchedAttributesback to summary
public boolean hasUnFetchedAttributes(Object entity)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.hasUnFetchedAttributes.

Annotations
@Override
injectEnhancedEntityAsProxyInterceptorback to summary
public void injectEnhancedEntityAsProxyInterceptor(Object entity, EntityKey entityKey, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectEnhancedEntityAsProxyInterceptor.

Annotations
@Override
injectInterceptorback to summary
public LazyAttributeLoadingInterceptor injectInterceptor(Object entity, Object identifier, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Deprecated

as a consequence of LazyAttributeLoadingInterceptor being deprecated. See corresponding docs for further information.

Build and inject an interceptor instance into the enhanced entity.

Parameters
entity:Object

The entity into which built interceptor should be injected

session:SharedSessionContractImplementor

The session to which the entity instance belongs.

Returns:LazyAttributeLoadingInterceptor

The built and injected interceptor

Annotations
@Override
injectInterceptorback to summary
public void injectInterceptor(Object entity, PersistentAttributeInterceptor interceptor, SharedSessionContractImplementor session)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.injectInterceptor.

Deprecated

as a consequence of PersistentAttributeInterceptor being deprecated. See corresponding docs for further information.

Annotations
@Override
isAttributeLoadedback to summary
public boolean isAttributeLoaded(Object entity, String attributeName)

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isAttributeLoaded.

Annotations
@Override
isEnhancedForLazyLoadingback to summary
public boolean isEnhancedForLazyLoading()

Implements org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isEnhancedForLazyLoading.

Doc from org.hibernate.bytecode.spi.BytecodeEnhancementMetadata.isEnhancedForLazyLoading.

Has the entity class been bytecode enhanced for lazy loading?

Returns:boolean

true indicates the entity class is enhanced for Hibernate use in lazy loading; false indicates it is not

Annotations
@Override