Package org.hibernate.boot.model.internal

Class AnnotationBinder


  • public final classAnnotationBinderextendsObject
    Reads annotations from Java classes and produces the Hibernate configuration-time metamodel, that is, the objects defined in the packageorg.hibernate.mapping.
    Implementation Note:
    This class is stateless, unlike most of the other "binders".
    • Method Detail

      • bindQueries

        public static void bindQueries​(org.hibernate.annotations.common.reflection.XAnnotatedElement annotatedElement,MetadataBuildingContext context)
      • bindClass

        public static void bindClass​(org.hibernate.annotations.common.reflection.XClass annotatedClass,Map<org.hibernate.annotations.common.reflection.XClass,​InheritanceState> inheritanceStatePerClass,MetadataBuildingContext context)                      throwsMappingException
        Bind an annotated class. A subclass must be boundafter its superclass.
        Parameters:
        annotatedClass - entity to bind asXClass instance
        inheritanceStatePerClass - 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.annotations.common.reflection.XClass annotatedClass,MetadataBuildingContext context)
      • buildInheritanceStates

        public static Map<org.hibernate.annotations.common.reflection.XClass,​InheritanceState> buildInheritanceStates​(List<org.hibernate.annotations.common.reflection.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 ofInheritanceStates keyed against theirXClass.