Class AnnotationBinder
java.lang.Object
org.hibernate.boot.model.internal.AnnotationBinder
Reads annotations from Java classes and produces the Hibernate configuration-time metamodel,
that is, the objects defined in the package
org.hibernate.mapping.- Author:
- Emmanuel Bernard, Hardy Ferentschik
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidbindClass(XClass annotatedClass, Map<XClass, InheritanceState> inheritanceStatePerClass, MetadataBuildingContext context) Bind an annotated class.static voidbindDefaults(MetadataBuildingContext context) static voidbindFetchProfilesForClass(XClass annotatedClass, MetadataBuildingContext context) static voidbindFetchProfilesForPackage(ClassLoaderService cls, String packageName, MetadataBuildingContext context) static voidbindPackage(ClassLoaderService cls, String packageName, MetadataBuildingContext context) static voidbindQueries(XAnnotatedElement annotatedElement, MetadataBuildingContext context) static Map<XClass,InheritanceState> buildInheritanceStates(List<XClass> orderedClasses, MetadataBuildingContext buildingContext) For the mapped entities build some temporary data-structure containing information about the inheritance status of a class.
-
Method Details
-
bindDefaults
-
bindPackage
public static void bindPackage(ClassLoaderService cls, String packageName, MetadataBuildingContext context) -
bindQueries
-
bindClass
public static void bindClass(XClass annotatedClass, Map<XClass, InheritanceState> inheritanceStatePerClass, MetadataBuildingContext context) throws MappingExceptionBind an annotated class. A subclass must be bound after its superclass.- Parameters:
annotatedClass- entity to bind asXClassinstanceinheritanceStatePerClass- Metadata about the inheritance relationships for all mapped classes- Throws:
MappingException- in case there is a configuration error
-
bindFetchProfilesForClass
public static void bindFetchProfilesForClass(XClass annotatedClass, MetadataBuildingContext context) -
bindFetchProfilesForPackage
public static void bindFetchProfilesForPackage(ClassLoaderService cls, String packageName, MetadataBuildingContext context) -
buildInheritanceStates
public static Map<XClass,InheritanceState> buildInheritanceStates(List<XClass> orderedClasses, MetadataBuildingContext buildingContext) For the mapped entities build some temporary data-structure containing information about the inheritance status of a class.- Parameters:
orderedClasses- Order list of all annotated entities and their mapped superclasses- Returns:
- A map of
InheritanceStates keyed against theirXClass.
-