public final class AnnotationBinder
extends java.lang.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(org.hibernate.annotations.common.reflection.XClass clazzToProcess,
java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> inheritanceStatePerClass,
org.hibernate.boot.spi.MetadataBuildingContext context)
Bind a class having JSR175 annotations.
|
static void |
bindDefaults(org.hibernate.boot.spi.MetadataBuildingContext context) |
static void |
bindPackage(java.lang.String packageName,
org.hibernate.boot.spi.MetadataBuildingContext context) |
static java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> |
buildInheritanceStates(java.util.List<org.hibernate.annotations.common.reflection.XClass> orderedClasses,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext)
For the mapped entities build some temporary data-structure containing information about the
inheritance status of a class.
|
static org.hibernate.mapping.Component |
createComponent(org.hibernate.cfg.PropertyHolder propertyHolder,
org.hibernate.cfg.PropertyData inferredData,
boolean isComponentEmbedded,
boolean isIdentifierMapper,
org.hibernate.boot.spi.MetadataBuildingContext context) |
protected static void |
defineFetchingStrategy(org.hibernate.mapping.ToOne toOne,
org.hibernate.annotations.common.reflection.XProperty property) |
static org.hibernate.mapping.Component |
fillComponent(org.hibernate.cfg.PropertyHolder propertyHolder,
org.hibernate.cfg.PropertyData inferredData,
org.hibernate.cfg.AccessType propertyAccessor,
boolean isNullable,
EntityBinder entityBinder,
boolean isComponentEmbedded,
boolean isIdentifierMapper,
boolean inSecondPass,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext,
java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> inheritanceStatePerClass) |
static org.hibernate.mapping.Component |
fillComponent(org.hibernate.cfg.PropertyHolder propertyHolder,
org.hibernate.cfg.PropertyData inferredData,
org.hibernate.cfg.PropertyData baseInferredData,
org.hibernate.cfg.AccessType propertyAccessor,
boolean isNullable,
EntityBinder entityBinder,
boolean isComponentEmbedded,
boolean isIdentifierMapper,
boolean inSecondPass,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext,
java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> inheritanceStatePerClass) |
static java.lang.String |
generatorType(javax.persistence.GeneratedValue generatedValueAnn,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext,
org.hibernate.annotations.common.reflection.XClass javaTypeXClass) |
static org.hibernate.FetchMode |
getFetchMode(javax.persistence.FetchType fetch) |
static boolean |
isDefault(org.hibernate.annotations.common.reflection.XClass clazz,
org.hibernate.boot.spi.MetadataBuildingContext context) |
public static void bindDefaults(org.hibernate.boot.spi.MetadataBuildingContext context)
public static void bindPackage(java.lang.String packageName,
org.hibernate.boot.spi.MetadataBuildingContext context)
public static void bindClass(org.hibernate.annotations.common.reflection.XClass clazzToProcess,
java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> inheritanceStatePerClass,
org.hibernate.boot.spi.MetadataBuildingContext context)
throws org.hibernate.MappingException
clazzToProcess - entity to bind as XClass instanceinheritanceStatePerClass - Meta data about the inheritance relationships for all mapped classesorg.hibernate.MappingException - in case there is a configuration errorpublic static java.lang.String generatorType(javax.persistence.GeneratedValue generatedValueAnn,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext,
org.hibernate.annotations.common.reflection.XClass javaTypeXClass)
public static org.hibernate.mapping.Component fillComponent(org.hibernate.cfg.PropertyHolder propertyHolder,
org.hibernate.cfg.PropertyData inferredData,
org.hibernate.cfg.AccessType propertyAccessor,
boolean isNullable,
EntityBinder entityBinder,
boolean isComponentEmbedded,
boolean isIdentifierMapper,
boolean inSecondPass,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext,
java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> inheritanceStatePerClass)
public static org.hibernate.mapping.Component fillComponent(org.hibernate.cfg.PropertyHolder propertyHolder,
org.hibernate.cfg.PropertyData inferredData,
org.hibernate.cfg.PropertyData baseInferredData,
org.hibernate.cfg.AccessType propertyAccessor,
boolean isNullable,
EntityBinder entityBinder,
boolean isComponentEmbedded,
boolean isIdentifierMapper,
boolean inSecondPass,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext,
java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> inheritanceStatePerClass)
public static org.hibernate.mapping.Component createComponent(org.hibernate.cfg.PropertyHolder propertyHolder,
org.hibernate.cfg.PropertyData inferredData,
boolean isComponentEmbedded,
boolean isIdentifierMapper,
org.hibernate.boot.spi.MetadataBuildingContext context)
protected static void defineFetchingStrategy(org.hibernate.mapping.ToOne toOne,
org.hibernate.annotations.common.reflection.XProperty property)
public static org.hibernate.FetchMode getFetchMode(javax.persistence.FetchType fetch)
public static boolean isDefault(org.hibernate.annotations.common.reflection.XClass clazz,
org.hibernate.boot.spi.MetadataBuildingContext context)
public static java.util.Map<org.hibernate.annotations.common.reflection.XClass,org.hibernate.cfg.InheritanceState> buildInheritanceStates(java.util.List<org.hibernate.annotations.common.reflection.XClass> orderedClasses,
org.hibernate.boot.spi.MetadataBuildingContext buildingContext)
orderedClasses - Order list of all annotated entities and their mapped superclassesInheritanceStates keyed against their XClass.Copyright © 2019. All rights reserved.