Package org.hibernate.cfg
Class AnnotationBinder
java.lang.Object
org.hibernate.cfg.AnnotationBinder
JSR 175 annotation binder which reads the annotations from classes, applies the
principles of the EJB3 spec and produces the Hibernate configuration-time metamodel
(the classes in the
org.hibernate.mapping package)-
Method Summary
Modifier and TypeMethodDescriptionstatic voidbindClass(XClass clazzToProcess, Map<XClass, InheritanceState> inheritanceStatePerClass, Mappings mappings) Bind a class having JSR175 annotations.static voidbindDefaults(Mappings mappings) static voidbindPackage(String packageName, Mappings mappings) static Map<XClass, InheritanceState> buildInheritanceStates(List<XClass> orderedClasses, Mappings mappings) For the mapped entities build some temporary data-structure containing information about the inheritance status of a class.static ComponentcreateComponent(PropertyHolder propertyHolder, PropertyData inferredData, boolean isComponentEmbedded, boolean isIdentifierMapper, Mappings mappings) protected static voiddefineFetchingStrategy(ToOne toOne, XProperty property) static ComponentfillComponent(PropertyHolder propertyHolder, PropertyData inferredData, AccessType propertyAccessor, boolean isNullable, EntityBinder entityBinder, boolean isComponentEmbedded, boolean isIdentifierMapper, boolean inSecondPass, Mappings mappings, Map<XClass, InheritanceState> inheritanceStatePerClass) static ComponentfillComponent(PropertyHolder propertyHolder, PropertyData inferredData, PropertyData baseInferredData, AccessType propertyAccessor, boolean isNullable, EntityBinder entityBinder, boolean isComponentEmbedded, boolean isIdentifierMapper, boolean inSecondPass, Mappings mappings, Map<XClass, InheritanceState> inheritanceStatePerClass) static FetchModestatic boolean
-
Method Details
-
bindDefaults
-
bindPackage
-
bindClass
public static void bindClass(XClass clazzToProcess, Map<XClass, InheritanceState> inheritanceStatePerClass, Mappings mappings) throws MappingExceptionBind a class having JSR175 annotations. Subclasses have to be bound after its parent class.- Parameters:
clazzToProcess- entity to bind asXClassinstanceinheritanceStatePerClass- Meta data about the inheritance relationships for all mapped classesmappings- Mapping meta data- Throws:
MappingException- in case there is an configuration error
-
fillComponent
public static Component fillComponent(PropertyHolder propertyHolder, PropertyData inferredData, AccessType propertyAccessor, boolean isNullable, EntityBinder entityBinder, boolean isComponentEmbedded, boolean isIdentifierMapper, boolean inSecondPass, Mappings mappings, Map<XClass, InheritanceState> inheritanceStatePerClass) -
fillComponent
public static Component fillComponent(PropertyHolder propertyHolder, PropertyData inferredData, PropertyData baseInferredData, AccessType propertyAccessor, boolean isNullable, EntityBinder entityBinder, boolean isComponentEmbedded, boolean isIdentifierMapper, boolean inSecondPass, Mappings mappings, Map<XClass, InheritanceState> inheritanceStatePerClass) -
createComponent
public static Component createComponent(PropertyHolder propertyHolder, PropertyData inferredData, boolean isComponentEmbedded, boolean isIdentifierMapper, Mappings mappings) -
defineFetchingStrategy
-
getFetchMode
-
isDefault
-
buildInheritanceStates
public static Map<XClass,InheritanceState> buildInheritanceStates(List<XClass> orderedClasses, Mappings mappings) 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
InheritanceStates keyed against theirXClass.
-