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

public Class DefaultEnhancementContext

extends Object
implements EnhancementContext
Class Inheritance
All Implemented Interfaces
org.hibernate.bytecode.enhance.spi.EnhancementContext
Imports
javax.persistence.Basic, .Convert, .ElementCollection, .Embeddable, .Entity, .ManyToMany, .MappedSuperclass, .OneToMany, .Transient

default implementation of EnhancementContext. May be sub-classed as needed.
Author
Luis Barreiro

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true
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

Returns:

true
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

Returns:

false
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

Returns:

the classloader for this class
getLoadingClassLoader
()

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

Obtain access to the ClassLoader that can be used to load Class references.
public boolean

Returns:

true
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.

look for @Embeddable annotation
public boolean
isEntityClass(UnloadedClass
The descriptor of the class to check.
classDescriptor
)

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

look for @Entity annotation
public boolean

Returns:

true
isLazyLoadable
(UnloadedField
The field to check
field
)

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

Determine if a field is lazy loadable.
public boolean
isMappedCollection(UnloadedField
the field to check
field
)

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

look for @OneToMany, @ManyToMany and @ElementCollection annotations
public boolean
isMappedSuperclassClass(UnloadedClass
The descriptor of the class to check.
classDescriptor
)

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

look for @MappedSuperclass annotation
public boolean
isPersistentField(UnloadedField
The field reference.
ctField
)

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

look for @Transient annotation
public UnloadedField[]
order(UnloadedField[]
The persistent field references.
persistentFields
)

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

keep the same order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DefaultEnhancementContextback to summary
public DefaultEnhancementContext()

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

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

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

false

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 javax.persistence.spi.PersistenceUnitInfo#getNewTempClassLoader()

Returns:ClassLoader

the classloader for this class

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

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

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

look for @Embeddable annotation

Parameters
classDescriptor:UnloadedClass

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

The descriptor of the class to check.

Returns:boolean

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

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

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

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

look for @Entity annotation

Parameters
classDescriptor:UnloadedClass

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

The descriptor of the class to check.

Returns:boolean

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

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

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

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

look for @OneToMany, @ManyToMany and @ElementCollection annotations

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.

look for @MappedSuperclass annotation

Parameters
classDescriptor:UnloadedClass

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

The descriptor of the class to check.

Returns:boolean

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

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.

look for @Transient annotation

Parameters
ctField:UnloadedField

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

The field reference.

Returns:boolean

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

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.

keep the same order.

Parameters
persistentFields:UnloadedField[]

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

The persistent field references.

Returns:UnloadedField[]

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

The ordered references.

Annotations
@Override