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
.- Implementation Note:
- This class is stateless, unlike most of the other "binders".
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
bindClass
(org.hibernate.models.spi.ClassDetails classDetails, Map<org.hibernate.models.spi.ClassDetails, InheritanceState> inheritanceStatePerClass, MetadataBuildingContext context) Bind an annotated class.static void
bindDefaults
(MetadataBuildingContext context) static void
bindFetchProfilesForClass
(org.hibernate.models.spi.AnnotationTarget annotatedClass, MetadataBuildingContext context) static void
bindFetchProfilesForPackage
(ClassLoaderService cls, String packageName, MetadataBuildingContext context) static void
bindPackage
(ClassLoaderService cls, String packageName, MetadataBuildingContext context) static void
bindQueries
(org.hibernate.models.spi.AnnotationTarget annotationTarget, MetadataBuildingContext context) static Map<org.hibernate.models.spi.ClassDetails,
InheritanceState> buildInheritanceStates
(List<org.hibernate.models.spi.ClassDetails> 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
public static void bindQueries(org.hibernate.models.spi.AnnotationTarget annotationTarget, MetadataBuildingContext context) -
bindClass
public static void bindClass(org.hibernate.models.spi.ClassDetails classDetails, Map<org.hibernate.models.spi.ClassDetails, InheritanceState> inheritanceStatePerClass, MetadataBuildingContext context) throws MappingExceptionBind an annotated class. A subclass must be bound after its superclass.- Parameters:
classDetails
- entity to bind asXClass
instanceinheritanceStatePerClass
- Metadata about the inheritance relationships for all mapped classes- Throws:
MappingException
- in case there is a configuration error
-
bindFetchProfilesForClass
public static void bindFetchProfilesForClass(org.hibernate.models.spi.AnnotationTarget annotatedClass, MetadataBuildingContext context) -
bindFetchProfilesForPackage
public static void bindFetchProfilesForPackage(ClassLoaderService cls, String packageName, MetadataBuildingContext context) -
buildInheritanceStates
public static Map<org.hibernate.models.spi.ClassDetails,InheritanceState> buildInheritanceStates(List<org.hibernate.models.spi.ClassDetails> 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
InheritanceState
s keyed against theirXClass
.
-