public class DefaultEnhancementContext extends Object implements EnhancementContext
Constructor and Description |
---|
DefaultEnhancementContext() |
Modifier and Type | Method and Description |
---|---|
boolean |
doBiDirectionalAssociationManagement(javassist.CtField field)
Should we manage association of bi-directional persistent attributes for this field?
|
boolean |
doDirtyCheckingInline(javassist.CtClass classDescriptor)
Should we in-line dirty checking for persistent attributes for this class?
|
boolean |
doExtendedEnhancement(javassist.CtClass classDescriptor)
Should we enhance field access to entities from this class?
|
ClassLoader |
getLoadingClassLoader()
Obtain access to the ClassLoader that can be used to load Class references.
|
boolean |
hasLazyLoadableAttributes(javassist.CtClass classDescriptor)
Does the given class define any lazy loadable attributes?
|
boolean |
isCompositeClass(javassist.CtClass classDescriptor)
look for @Embeddable annotation
|
boolean |
isEntityClass(javassist.CtClass classDescriptor)
look for @Entity annotation
|
boolean |
isLazyLoadable(javassist.CtField field)
Determine if a field is lazy loadable.
|
boolean |
isMappedCollection(javassist.CtField field)
look for @OneToMany, @ManyToMany and @ElementCollection annotations
|
boolean |
isMappedSuperclassClass(javassist.CtClass classDescriptor)
look for @MappedSuperclass annotation
|
boolean |
isPersistentField(javassist.CtField ctField)
look for @Transient annotation
|
javassist.CtField[] |
order(javassist.CtField[] persistentFields)
keep the same order.
|
public ClassLoader getLoadingClassLoader()
EnhancementContext
PersistenceUnitInfo.getNewTempClassLoader()
getLoadingClassLoader
in interface EnhancementContext
public boolean isEntityClass(javassist.CtClass classDescriptor)
isEntityClass
in interface EnhancementContext
classDescriptor
- The descriptor of the class to check.true
if the class is an entity; false
otherwise.public boolean isCompositeClass(javassist.CtClass classDescriptor)
isCompositeClass
in interface EnhancementContext
classDescriptor
- The descriptor of the class to check.true
if the class is an embeddable/component; false
otherwise.public boolean isMappedSuperclassClass(javassist.CtClass classDescriptor)
isMappedSuperclassClass
in interface EnhancementContext
classDescriptor
- The descriptor of the class to check.true
if the class is an mapped super class; false
otherwise.public boolean doBiDirectionalAssociationManagement(javassist.CtField field)
EnhancementContext
doBiDirectionalAssociationManagement
in interface EnhancementContext
field
- The field to check.public boolean doDirtyCheckingInline(javassist.CtClass classDescriptor)
EnhancementContext
doDirtyCheckingInline
in interface EnhancementContext
classDescriptor
- The descriptor of the class to check.public boolean doExtendedEnhancement(javassist.CtClass classDescriptor)
EnhancementContext
doExtendedEnhancement
in interface EnhancementContext
classDescriptor
- The descriptor of the class to check.public boolean hasLazyLoadableAttributes(javassist.CtClass classDescriptor)
EnhancementContext
hasLazyLoadableAttributes
in interface EnhancementContext
classDescriptor
- The class to checkpublic boolean isLazyLoadable(javassist.CtField field)
EnhancementContext
isLazyLoadable
in interface EnhancementContext
field
- The field to checkpublic boolean isPersistentField(javassist.CtField ctField)
isPersistentField
in interface EnhancementContext
ctField
- The field reference.true
if the field is ; false
otherwise.public boolean isMappedCollection(javassist.CtField field)
isMappedCollection
in interface EnhancementContext
field
- the field to checktrue
if the field is mappedpublic javassist.CtField[] order(javassist.CtField[] persistentFields)
order
in interface EnhancementContext
persistentFields
- The persistent field references.Copyright © 2017 JBoss by Red Hat. All rights reserved.