public final class AnnotationBinder extends Object
org.hibernate.mapping package)
Some design description
I tried to remove any link to annotation except from the 2 first level of
method call.
It'll enable to:
- facilitate annotation overriding
- mutualize one day xml and annotation binder (probably a dream though)
- split this huge class in smaller mapping oriented classes
bindSomething usually create the mapping container and is accessed by one of the 2 first level method
makeSomething usually create the mapping container and is accessed by bindSomething[else]
fillSomething take the container into parameter and fill it.| 限定符和类型 | 方法和说明 |
|---|---|
static void |
bindClass(cn.sexycode.util.core.cls.XClass clazzToProcess,
Map<cn.sexycode.util.core.cls.XClass,InheritanceState> inheritanceStatePerClass,
MetadataBuildingContext context)
Bind a class having JSR175 annotations.
|
static void |
bindDefaults(MetadataBuildingContext context) |
static void |
bindPackage(String packageName,
MetadataBuildingContext context) |
static Map<cn.sexycode.util.core.cls.XClass,InheritanceState> |
buildInheritanceStates(List<cn.sexycode.util.core.cls.XClass> orderedClasses,
MetadataBuildingContext buildingContext)
For the mapped entities build some temporary data-structure containing information about the
inheritance status of a class.
|
public static void bindDefaults(MetadataBuildingContext context)
public static void bindPackage(String packageName, MetadataBuildingContext context)
public static void bindClass(cn.sexycode.util.core.cls.XClass clazzToProcess,
Map<cn.sexycode.util.core.cls.XClass,InheritanceState> inheritanceStatePerClass,
MetadataBuildingContext context)
throws MappingException
clazzToProcess - entity to bind as XClass instanceMappingException - in case there is a configuration errorpublic static Map<cn.sexycode.util.core.cls.XClass,InheritanceState> buildInheritanceStates(List<cn.sexycode.util.core.cls.XClass> orderedClasses, MetadataBuildingContext buildingContext)
orderedClasses - Order list of all annotated entities and their mapped superclassesInheritanceStates keyed against their XClass.Copyright © 2019. All rights reserved.