类 DefaultEnhancementContext
- java.lang.Object
-
- org.hibernate.bytecode.enhance.spi.DefaultEnhancementContext
-
- 所有已实现的接口:
EnhancementContext
public class DefaultEnhancementContext extends Object implements EnhancementContext
default implementation of EnhancementContext. May be sub-classed as needed.- 作者:
- Luis Barreiro
-
-
构造器概要
构造器 构造器 说明 DefaultEnhancementContext()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleandoBiDirectionalAssociationManagement(UnloadedField field)Should we manage association of bi-directional persistent attributes for this field?booleandoDirtyCheckingInline(UnloadedClass classDescriptor)Should we in-line dirty checking for persistent attributes for this class?booleandoExtendedEnhancement(UnloadedClass classDescriptor)Should we enhance field access to entities from this class?ClassLoadergetLoadingClassLoader()Obtain access to the ClassLoader that can be used to load Class references.booleanhasLazyLoadableAttributes(UnloadedClass classDescriptor)Does the given class define any lazy loadable attributes?booleanisCompositeClass(UnloadedClass classDescriptor)look for @Embeddable annotationbooleanisEntityClass(UnloadedClass classDescriptor)look for @Entity annotationbooleanisLazyLoadable(UnloadedField field)Determine if a field is lazy loadable.booleanisMappedCollection(UnloadedField field)look for @OneToMany, @ManyToMany and @ElementCollection annotationsbooleanisMappedSuperclassClass(UnloadedClass classDescriptor)look for @MappedSuperclass annotationbooleanisPersistentField(UnloadedField ctField)look for @Transient annotationUnloadedField[]order(UnloadedField[] persistentFields)keep the same order.
-
-
-
方法详细资料
-
getLoadingClassLoader
public ClassLoader getLoadingClassLoader()
从接口复制的说明:EnhancementContextObtain 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 byPersistenceUnitInfo.getNewTempClassLoader()- 指定者:
getLoadingClassLoader在接口中EnhancementContext- 返回:
- the classloader for this class
-
isEntityClass
public boolean isEntityClass(UnloadedClass classDescriptor)
look for @Entity annotation- 指定者:
isEntityClass在接口中EnhancementContext- 参数:
classDescriptor- The descriptor of the class to check.- 返回:
trueif the class is an entity;falseotherwise.
-
isCompositeClass
public boolean isCompositeClass(UnloadedClass classDescriptor)
look for @Embeddable annotation- 指定者:
isCompositeClass在接口中EnhancementContext- 参数:
classDescriptor- The descriptor of the class to check.- 返回:
trueif the class is an embeddable/component;falseotherwise.
-
isMappedSuperclassClass
public boolean isMappedSuperclassClass(UnloadedClass classDescriptor)
look for @MappedSuperclass annotation- 指定者:
isMappedSuperclassClass在接口中EnhancementContext- 参数:
classDescriptor- The descriptor of the class to check.- 返回:
trueif the class is a mapped super class;falseotherwise.
-
doBiDirectionalAssociationManagement
public boolean doBiDirectionalAssociationManagement(UnloadedField field)
从接口复制的说明:EnhancementContextShould we manage association of bi-directional persistent attributes for this field?- 指定者:
doBiDirectionalAssociationManagement在接口中EnhancementContext- 参数:
field- The field to check.- 返回:
- true
-
doDirtyCheckingInline
public boolean doDirtyCheckingInline(UnloadedClass classDescriptor)
从接口复制的说明:EnhancementContextShould we in-line dirty checking for persistent attributes for this class?- 指定者:
doDirtyCheckingInline在接口中EnhancementContext- 参数:
classDescriptor- The descriptor of the class to check.- 返回:
- true
-
doExtendedEnhancement
public boolean doExtendedEnhancement(UnloadedClass classDescriptor)
从接口复制的说明:EnhancementContextShould we enhance field access to entities from this class?- 指定者:
doExtendedEnhancement在接口中EnhancementContext- 参数:
classDescriptor- The descriptor of the class to check.- 返回:
- false
-
hasLazyLoadableAttributes
public boolean hasLazyLoadableAttributes(UnloadedClass classDescriptor)
从接口复制的说明:EnhancementContextDoes the given class define any lazy loadable attributes?- 指定者:
hasLazyLoadableAttributes在接口中EnhancementContext- 参数:
classDescriptor- The class to check- 返回:
- true
-
isLazyLoadable
public boolean isLazyLoadable(UnloadedField field)
从接口复制的说明:EnhancementContextDetermine if a field is lazy loadable.- 指定者:
isLazyLoadable在接口中EnhancementContext- 参数:
field- The field to check- 返回:
- true
-
isPersistentField
public boolean isPersistentField(UnloadedField ctField)
look for @Transient annotation- 指定者:
isPersistentField在接口中EnhancementContext- 参数:
ctField- The field reference.- 返回:
trueif the field is ;falseotherwise.
-
isMappedCollection
public boolean isMappedCollection(UnloadedField field)
look for @OneToMany, @ManyToMany and @ElementCollection annotations- 指定者:
isMappedCollection在接口中EnhancementContext- 参数:
field- the field to check- 返回:
trueif the field is mapped
-
order
public UnloadedField[] order(UnloadedField[] persistentFields)
keep the same order.- 指定者:
order在接口中EnhancementContext- 参数:
persistentFields- The persistent field references.- 返回:
- The ordered references.
-
-