Package org.hibernate.cfg.annotations
Class EntityBinder
- java.lang.Object
-
- org.hibernate.cfg.annotations.EntityBinder
-
public class EntityBinder extends Object
Stateful holder and processor for binding Entity information
-
-
Constructor Summary
Constructors Constructor Description EntityBinder()
Use as a fake one for Collection of elementsEntityBinder(org.hibernate.annotations.common.reflection.XClass annotatedClass, PersistentClass persistentClass, MetadataBuildingContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(Filter filter)
Join
addJoin(jakarta.persistence.JoinTable joinTable, PropertyHolder holder, boolean noDelayInPkColumnCreation)
Join
addJoin(jakarta.persistence.SecondaryTable secondaryTable, PropertyHolder holder, boolean noDelayInPkColumnCreation)
void
applyCaching(org.hibernate.annotations.common.reflection.XClass clazzToProcess, jakarta.persistence.SharedCacheMode sharedCacheMode, MetadataBuildingContext context)
void
bindDiscriminatorValue()
void
bindEntity()
static void
bindEntityClass(org.hibernate.annotations.common.reflection.XClass clazzToProcess, Map<org.hibernate.annotations.common.reflection.XClass,InheritanceState> inheritanceStatePerClass, HashMap<String,IdentifierGeneratorDefinition> classGenerators, MetadataBuildingContext context)
static void
bindFiltersAndFilterDefs(org.hibernate.annotations.common.reflection.XClass annotatedClass, EntityBinder entityBinder, MetadataBuildingContext context)
Process the filters defined on the given class, as well as all filters defined on the MappedSuperclass(es) in the inheritance hierarchyvoid
bindTable(String schema, String catalog, String tableName, List<UniqueConstraintHolder> uniqueConstraints, String constraints, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref)
void
bindTableForDiscriminatedSubclass(InFlightMetadataCollector.EntityTableXref superTableXref)
void
finalSecondaryTableBinding(PropertyHolder propertyHolder)
void
finalSecondaryTableFromAnnotationBinding(PropertyHolder propertyHolder)
static String
getCacheConcurrencyStrategy(CacheConcurrencyStrategy strategy)
AccessType
getExplicitAccessType(org.hibernate.annotations.common.reflection.XAnnotatedElement element)
PersistentClass
getPersistentClass()
AccessType
getPropertyAccessor(org.hibernate.annotations.common.reflection.XAnnotatedElement element)
AccessType
getPropertyAccessType()
Map<String,Join>
getSecondaryTables()
boolean
isIgnoreIdAnnotations()
boolean
isPropertyDefinedInSuperHierarchy(String name)
For the most part, this is a simple delegation toPersistentClass.isPropertyDefinedInHierarchy(java.lang.String)
, after verifying that PersistentClass is indeed set here.boolean
isRootEntity()
void
processComplementaryTableDefinitions(jakarta.persistence.Table table)
void
processComplementaryTableDefinitions(Table table)
void
processComplementaryTableDefinitions(Tables tables)
void
setBatchSize(BatchSize sizeAnn)
void
setDiscriminatorValue(String discriminatorValue)
void
setForceDiscriminator(boolean forceDiscriminator)
void
setIgnoreIdAnnotations(boolean ignoreIdAnnotations)
void
setInsertableDiscriminator(boolean insertableDiscriminator)
void
setPropertyAccessType(AccessType propertyAccessor)
void
setProxy(Proxy proxy)
void
setWhere(Where whereAnn)
void
setWrapIdsInEmbeddedComponents(boolean wrapIdsInEmbeddedComponents)
boolean
wrapIdsInEmbeddedComponents()
-
-
-
Constructor Detail
-
EntityBinder
public EntityBinder()
Use as a fake one for Collection of elements
-
EntityBinder
public EntityBinder(org.hibernate.annotations.common.reflection.XClass annotatedClass, PersistentClass persistentClass, MetadataBuildingContext context)
-
-
Method Detail
-
bindEntityClass
public static void bindEntityClass(org.hibernate.annotations.common.reflection.XClass clazzToProcess, Map<org.hibernate.annotations.common.reflection.XClass,InheritanceState> inheritanceStatePerClass, HashMap<String,IdentifierGeneratorDefinition> classGenerators, MetadataBuildingContext context)
-
wrapIdsInEmbeddedComponents
public boolean wrapIdsInEmbeddedComponents()
-
isPropertyDefinedInSuperHierarchy
public boolean isPropertyDefinedInSuperHierarchy(String name)
For the most part, this is a simple delegation toPersistentClass.isPropertyDefinedInHierarchy(java.lang.String)
, after verifying that PersistentClass is indeed set here.- Parameters:
name
- The name of the property to check- Returns:
true
if a property by that given name does already exist in the super hierarchy.
-
isRootEntity
public boolean isRootEntity()
-
setDiscriminatorValue
public void setDiscriminatorValue(String discriminatorValue)
-
setForceDiscriminator
public void setForceDiscriminator(boolean forceDiscriminator)
-
setInsertableDiscriminator
public void setInsertableDiscriminator(boolean insertableDiscriminator)
-
bindEntity
public void bindEntity()
-
getPersistentClass
public PersistentClass getPersistentClass()
-
bindDiscriminatorValue
public void bindDiscriminatorValue()
-
setBatchSize
public void setBatchSize(BatchSize sizeAnn)
-
setProxy
public void setProxy(Proxy proxy)
-
setWhere
public void setWhere(Where whereAnn)
-
setWrapIdsInEmbeddedComponents
public void setWrapIdsInEmbeddedComponents(boolean wrapIdsInEmbeddedComponents)
-
applyCaching
public void applyCaching(org.hibernate.annotations.common.reflection.XClass clazzToProcess, jakarta.persistence.SharedCacheMode sharedCacheMode, MetadataBuildingContext context)
-
bindTableForDiscriminatedSubclass
public void bindTableForDiscriminatedSubclass(InFlightMetadataCollector.EntityTableXref superTableXref)
-
bindTable
public void bindTable(String schema, String catalog, String tableName, List<UniqueConstraintHolder> uniqueConstraints, String constraints, InFlightMetadataCollector.EntityTableXref denormalizedSuperTableXref)
-
finalSecondaryTableBinding
public void finalSecondaryTableBinding(PropertyHolder propertyHolder)
-
finalSecondaryTableFromAnnotationBinding
public void finalSecondaryTableFromAnnotationBinding(PropertyHolder propertyHolder)
-
addJoin
public Join addJoin(jakarta.persistence.JoinTable joinTable, PropertyHolder holder, boolean noDelayInPkColumnCreation)
-
addJoin
public Join addJoin(jakarta.persistence.SecondaryTable secondaryTable, PropertyHolder holder, boolean noDelayInPkColumnCreation)
-
getCacheConcurrencyStrategy
public static String getCacheConcurrencyStrategy(CacheConcurrencyStrategy strategy)
-
addFilter
public void addFilter(Filter filter)
-
isIgnoreIdAnnotations
public boolean isIgnoreIdAnnotations()
-
setIgnoreIdAnnotations
public void setIgnoreIdAnnotations(boolean ignoreIdAnnotations)
-
processComplementaryTableDefinitions
public void processComplementaryTableDefinitions(jakarta.persistence.Table table)
-
processComplementaryTableDefinitions
public void processComplementaryTableDefinitions(Table table)
-
processComplementaryTableDefinitions
public void processComplementaryTableDefinitions(Tables tables)
-
getPropertyAccessType
public AccessType getPropertyAccessType()
-
setPropertyAccessType
public void setPropertyAccessType(AccessType propertyAccessor)
-
getPropertyAccessor
public AccessType getPropertyAccessor(org.hibernate.annotations.common.reflection.XAnnotatedElement element)
-
getExplicitAccessType
public AccessType getExplicitAccessType(org.hibernate.annotations.common.reflection.XAnnotatedElement element)
-
bindFiltersAndFilterDefs
public static void bindFiltersAndFilterDefs(org.hibernate.annotations.common.reflection.XClass annotatedClass, EntityBinder entityBinder, MetadataBuildingContext context)
Process the filters defined on the given class, as well as all filters defined on the MappedSuperclass(es) in the inheritance hierarchy
-
-