Class DefaultEnhancementContext

    • Constructor Detail

      • DefaultEnhancementContext

        public DefaultEnhancementContext()
    • Method Detail

      • isEntityClass

        public boolean isEntityClass​(UnloadedClass classDescriptor)
        look for @Entity annotation
        Specified by:
        isEntityClass in interface EnhancementContext
        Parameters:
        classDescriptor - The descriptor of the class to check.
        Returns:
        true if the class is an entity; false otherwise.
      • isCompositeClass

        public boolean isCompositeClass​(UnloadedClass classDescriptor)
        look for @Embeddable annotation
        Specified by:
        isCompositeClass in interface EnhancementContext
        Parameters:
        classDescriptor - The descriptor of the class to check.
        Returns:
        true if the class is an embeddable/component; false otherwise.
      • isMappedSuperclassClass

        public boolean isMappedSuperclassClass​(UnloadedClass classDescriptor)
        look for @MappedSuperclass annotation
        Specified by:
        isMappedSuperclassClass in interface EnhancementContext
        Parameters:
        classDescriptor - The descriptor of the class to check.
        Returns:
        true if the class is a mapped super class; false otherwise.
      • doDirtyCheckingInline

        public boolean doDirtyCheckingInline​(UnloadedClass classDescriptor)
        Description copied from interface: EnhancementContext
        Should we in-line dirty checking for persistent attributes for this class?
        Specified by:
        doDirtyCheckingInline in interface EnhancementContext
        Parameters:
        classDescriptor - The descriptor of the class to check.
        Returns:
        true
      • doExtendedEnhancement

        public boolean doExtendedEnhancement​(UnloadedClass classDescriptor)
        Description copied from interface: EnhancementContext
        Should we enhance field access to entities from this class?
        Specified by:
        doExtendedEnhancement in interface EnhancementContext
        Parameters:
        classDescriptor - The descriptor of the class to check.
        Returns:
        false
      • isPersistentField

        public boolean isPersistentField​(UnloadedField ctField)
        look for @Transient annotation
        Specified by:
        isPersistentField in interface EnhancementContext
        Parameters:
        ctField - The field reference.
        Returns:
        true if the field is ; false otherwise.
      • isMappedCollection

        public boolean isMappedCollection​(UnloadedField field)
        look for @OneToMany, @ManyToMany and @ElementCollection annotations
        Specified by:
        isMappedCollection in interface EnhancementContext
        Parameters:
        field - the field to check
        Returns:
        true if the field is mapped
      • order

        public UnloadedField[] order​(UnloadedField[] persistentFields)
        keep the same order.
        Specified by:
        order in interface EnhancementContext
        Parameters:
        persistentFields - The persistent field references.
        Returns:
        The ordered references.