Top Fields Constructors Methods
org.hibernate.bytecode.enhance.spi

public Class EnhancementContextWrapper

extends Object
implements EnhancementContext
Class Inheritance
All Implemented Interfaces
org.hibernate.bytecode.enhance.spi.EnhancementContext
Imports
jakarta.persistence.metamodel.Type

Field Summary

Modifier and TypeField and Description
private final ClassLoader
private final EnhancementContext

Constructor Summary

AccessConstructor and Description
public
EnhancementContextWrapper(EnhancementContext wrappedContext, ClassLoader loadingClassloader)

Method Summary

Modifier and TypeMethod and Description
public boolean
doBiDirectionalAssociationManagement(UnloadedField
The field to check.
field
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.doBiDirectionalAssociationManagement.

Should we manage association of bi-directional persistent attributes for this field?
public boolean
doDirtyCheckingInline(UnloadedClass
The descriptor of the class to check.
classDescriptor
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.doDirtyCheckingInline.

Should we in-line dirty checking for persistent attributes for this class?
public boolean
doExtendedEnhancement(UnloadedClass
The descriptor of the class to check.
classDescriptor
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.doExtendedEnhancement.

Should we enhance field access to entities from this class?
public ClassLoader
getLoadingClassLoader()

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.getLoadingClassLoader.

Obtain access to the ClassLoader that can be used to load Class references.
public boolean
hasLazyLoadableAttributes(UnloadedClass
The class to check
classDescriptor
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.hasLazyLoadableAttributes.

Does the given class define any lazy loadable attributes?
public boolean
isCompositeClass(UnloadedClass
The descriptor of the class to check.
classDescriptor
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isCompositeClass.

Does the given class name represent an embeddable/component class?
public boolean
public boolean
isEntityClass(UnloadedClass
The descriptor of the class to check.
classDescriptor
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isEntityClass.

Does the given class descriptor represent an entity class?
public boolean
isLazyLoadable(UnloadedField
The field to check
field
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isLazyLoadable.

Determine if a field is lazy loadable.
public boolean
public boolean
isMappedSuperclassClass(UnloadedClass
The descriptor of the class to check.
classDescriptor
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isMappedSuperclassClass.

Does the given class name represent a MappedSuperclass class?
public boolean
isPersistentField(UnloadedField
The field reference.
ctField
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isPersistentField.

Does the field represent persistent state?
public UnloadedField[]
order(UnloadedField[]
The persistent field references.
persistentFields
)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.order.

For fields which are persistent (according to isPersistentField), determine the corresponding ordering maintained within the Hibernate metamodel.
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loadingClassloaderback to summary
private final ClassLoader loadingClassloader
wrappedContextback to summary
private final EnhancementContext wrappedContext

Constructor Detail

EnhancementContextWrapperback to summary
public EnhancementContextWrapper(EnhancementContext wrappedContext, ClassLoader loadingClassloader)

Method Detail

doBiDirectionalAssociationManagementback to summary
public boolean doBiDirectionalAssociationManagement(UnloadedField field)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.doBiDirectionalAssociationManagement.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.doBiDirectionalAssociationManagement.

Should we manage association of bi-directional persistent attributes for this field?

Parameters
field:UnloadedField

The field to check.

Returns:boolean

true indicates that the field is enhanced so that for bi-directional persistent fields the association is managed, i.e. the associations are automatically set; false indicates that the management is handled by the user.

Annotations
@Override
doDirtyCheckingInlineback to summary
public boolean doDirtyCheckingInline(UnloadedClass classDescriptor)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.doDirtyCheckingInline.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.doDirtyCheckingInline.

Should we in-line dirty checking for persistent attributes for this class?

Parameters
classDescriptor:UnloadedClass

The descriptor of the class to check.

Returns:boolean

true indicates that dirty checking should be in-lined within the entity; false indicates it should not. In-lined is more easily serializable and probably more performant.

Annotations
@Override
doExtendedEnhancementback to summary
public boolean doExtendedEnhancement(UnloadedClass classDescriptor)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.doExtendedEnhancement.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.doExtendedEnhancement.

Should we enhance field access to entities from this class?

Parameters
classDescriptor:UnloadedClass

The descriptor of the class to check.

Returns:boolean

true indicates that any direct access to fields of entities should be routed to the enhanced getter / setter method.

Annotations
@Override
getLoadingClassLoaderback to summary
public ClassLoader getLoadingClassLoader()

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.getLoadingClassLoader.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.getLoadingClassLoader.

Obtain access to the ClassLoader that can be used to load Class references. In JPA SPI terms, this should be a "temporary class loader" as defined by jakarta.persistence.spi.PersistenceUnitInfo#getNewTempClassLoader()

Returns:ClassLoader

The class loader that the enhancer can use.

Annotations
@Override
hasLazyLoadableAttributesback to summary
public boolean hasLazyLoadableAttributes(UnloadedClass classDescriptor)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.hasLazyLoadableAttributes.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.hasLazyLoadableAttributes.

Does the given class define any lazy loadable attributes?

Parameters
classDescriptor:UnloadedClass

The class to check

Returns:boolean

true/false

Annotations
@Override
isCompositeClassback to summary
public boolean isCompositeClass(UnloadedClass classDescriptor)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isCompositeClass.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.isCompositeClass.

Does the given class name represent an embeddable/component class?

Parameters
classDescriptor:UnloadedClass

The descriptor of the class to check.

Returns:boolean

true if the class is an embeddable/component; false otherwise.

Annotations
@Override
isDiscoveredTypeback to summary
public boolean isDiscoveredType(UnloadedClass classDescriptor)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isDiscoveredType.

Annotations
@Override
isEntityClassback to summary
public boolean isEntityClass(UnloadedClass classDescriptor)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isEntityClass.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.isEntityClass.

Does the given class descriptor represent an entity class?

Parameters
classDescriptor:UnloadedClass

The descriptor of the class to check.

Returns:boolean

true if the class is an entity; false otherwise.

Annotations
@Override
isLazyLoadableback to summary
public boolean isLazyLoadable(UnloadedField field)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isLazyLoadable.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.isLazyLoadable.

Determine if a field is lazy loadable.

Parameters
field:UnloadedField

The field to check

Returns:boolean

true if the field is lazy loadable; false otherwise.

Annotations
@Override
isMappedCollectionback to summary
public boolean isMappedCollection(UnloadedField field)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isMappedCollection.

Parameters
field:UnloadedField

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.isMappedCollection.

the field to check

Returns:boolean

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.isMappedCollection.

true if the field is mapped

Annotations
@Override
isMappedSuperclassClassback to summary
public boolean isMappedSuperclassClass(UnloadedClass classDescriptor)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isMappedSuperclassClass.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.isMappedSuperclassClass.

Does the given class name represent a MappedSuperclass class?

Parameters
classDescriptor:UnloadedClass

The descriptor of the class to check.

Returns:boolean

true if the class is a mapped super class; false otherwise.

Annotations
@Override
isPersistentFieldback to summary
public boolean isPersistentField(UnloadedField ctField)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.isPersistentField.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.isPersistentField.

Does the field represent persistent state? Persistent fields will be "enhanced".

may be better to perform basic checks in the caller (non-static, etc) and call out with just the Class name and field name...

Parameters
ctField:UnloadedField

The field reference.

Returns:boolean

true if the field is ; false otherwise.

Annotations
@Override
orderback to summary
public UnloadedField[] order(UnloadedField[] persistentFields)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.order.

Doc from org.hibernate.bytecode.enhance.spi.EnhancementContext.order.

For fields which are persistent (according to isPersistentField), determine the corresponding ordering maintained within the Hibernate metamodel.

Parameters
persistentFields:UnloadedField[]

The persistent field references.

Returns:UnloadedField[]

The ordered references.

Annotations
@Override
registerDiscoveredTypeback to summary
public void registerDiscoveredType(UnloadedClass classDescriptor, Type.PersistenceType type)

Implements org.hibernate.bytecode.enhance.spi.EnhancementContext.registerDiscoveredType.

Annotations
@Override