Top Inners Fields Constructors Methods
org.hibernate.boot.model.internal

public abstract Class AbstractPropertyHolder

extends Object
implements PropertyHolder
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.internal.PropertyHolder
Known Direct Subclasses
org.hibernate.boot.model.internal.ClassPropertyHolder, org.hibernate.boot.model.internal.CollectionPropertyHolder, org.hibernate.boot.model.internal.ComponentPropertyHolder
Imports
java.lang.annotation.Annotation, java.util.ArrayList, .Arrays, .HashMap, .List, .Map, org.hibernate.AnnotationException, .AssertionFailure, org.hibernate.annotations.ColumnTransformer, .ColumnTransformers, .TimeZoneColumn, org.hibernate.annotations.common.reflection.XAnnotatedElement, .XClass, .XProperty, org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor, org.hibernate.boot.model.convert.spi.ConverterDescriptor, org.hibernate.boot.model.naming.Identifier, .ImplicitBasicColumnNameSource, org.hibernate.boot.model.source.spi.AttributePath, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.internal.CoreLogging, org.hibernate.internal.util.StringHelper, org.hibernate.usertype.internal.AbstractTimeZoneStorageCompositeUserType, .OffsetTimeCompositeUserType, org.jboss.logging.Logger, jakarta.persistence.AssociationOverride, .AssociationOverrides, .AttributeOverride, .AttributeOverrides, .Column, .Embeddable, .Entity, .ForeignKey, .JoinColumn, .JoinTable, .MappedSuperclass

Author
Emmanuel Bernard

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final MetadataBuildingContext
private Map<String, Column[]>
private Map<String, ColumnTransformer>
private Map<String, ForeignKey>
private Map<String, JoinColumn[]>
private Map<String, JoinTable>
private Map<String, Column[]>
private Map<String, ColumnTransformer>
private Map<String, ForeignKey>
private Map<String, JoinColumn[]>
private Map<String, JoinTable>
private Boolean
private static final Logger
protected AbstractPropertyHolder
private final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static AssociationOverride[]
private static Map<String, Column[]>
private static Map<String, ColumnTransformer>
protected IllegalStateException
private static Map<String, ForeignKey>
private void
private static Map<String, JoinColumn[]>
private static Map<String, JoinTable>
private static Column
private static Column
protected MetadataBuildingContext

Returns:

The mappings
getContext
()

Get the mappings

private Column[]
getExactOverriddenColumn(String propertyName)

Get column overriding, property first, then parent, then holder find the overridden rules from the exact property name.

private ForeignKey
private JoinColumn[]
getExactOverriddenJoinColumn(String propertyName)

Get column overriding, property first, then parent, then holder

private JoinTable
getExactOverriddenJoinTable(String propertyName)

Get column overriding, property first, then parent, then holder

public JoinTable
getJoinTable(XProperty property)

Implements org.hibernate.boot.model.internal.PropertyHolder.getJoinTable.

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.
public Column[]
getOverriddenColumn(String propertyName)

Implements org.hibernate.boot.model.internal.PropertyHolder.getOverriddenColumn.

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing

These rules are here to support both JPA 2 and legacy overriding rules.

public ColumnTransformer
public ForeignKey
getOverriddenForeignKey(String propertyName)

Overrides default org.hibernate.boot.model.internal.PropertyHolder.getOverriddenForeignKey.

return null if hte foreign key is not overridden, or the foreign key if true
public JoinColumn[]
getOverriddenJoinColumn(String propertyName)

Implements org.hibernate.boot.model.internal.PropertyHolder.getOverriddenJoinColumn.

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.
public JoinTable
getOverriddenJoinTable(String propertyName)

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.

public String
public boolean
protected abstract AttributeConversionInfo
protected abstract AttributeConversionInfo
protected ConverterDescriptor
protected abstract String
protected abstract String
public ConverterDescriptor
resolveAttributeConverterDescriptor(XProperty property)

Implements org.hibernate.boot.model.internal.PropertyHolder.resolveAttributeConverterDescriptor.

Determine the AttributeConverter to use for the given property.
protected void
setCurrentProperty(XProperty
The property
property
)

Set the property to be processed.

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final MetadataBuildingContext context
currentPropertyColumnOverrideback to summary
private Map<String, Column[]> currentPropertyColumnOverride
currentPropertyColumnTransformerOverrideback to summary
private Map<String, ColumnTransformer> currentPropertyColumnTransformerOverride
currentPropertyForeignKeyOverrideback to summary
private Map<String, ForeignKey> currentPropertyForeignKeyOverride
currentPropertyJoinColumnOverrideback to summary
private Map<String, JoinColumn[]> currentPropertyJoinColumnOverride
currentPropertyJoinTableOverrideback to summary
private Map<String, JoinTable> currentPropertyJoinTableOverride
holderColumnOverrideback to summary
private Map<String, Column[]> holderColumnOverride
holderColumnTransformerOverrideback to summary
private Map<String, ColumnTransformer> holderColumnTransformerOverride
holderForeignKeyOverrideback to summary
private Map<String, ForeignKey> holderForeignKeyOverride
holderJoinColumnOverrideback to summary
private Map<String, JoinColumn[]> holderJoinColumnOverride
holderJoinTableOverrideback to summary
private Map<String, JoinTable> holderJoinTableOverride
isInIdClassback to summary
private Boolean isInIdClass
logback to summary
private static final Logger log
parentback to summary
protected AbstractPropertyHolder parent
pathback to summary
private final String path

Constructor Detail

AbstractPropertyHolderback to summary
pack-priv AbstractPropertyHolder(String path, PropertyHolder parent, XClass clazzToProcess, MetadataBuildingContext context)

Method Detail

buildAssociationOverridesback to summary
private static AssociationOverride[] buildAssociationOverrides(XAnnotatedElement element, String path)
buildColumnOverrideback to summary
private static Map<String, Column[]> buildColumnOverride(XAnnotatedElement element, String path, MetadataBuildingContext context)
buildColumnTransformerOverrideback to summary
private static Map<String, ColumnTransformer> buildColumnTransformerOverride(XAnnotatedElement element)
buildExceptionFromInstantiationErrorback to summary
protected IllegalStateException buildExceptionFromInstantiationError(AttributeConversionInfo info, Exception e)
buildForeignKeyOverrideback to summary
private static Map<String, ForeignKey> buildForeignKeyOverride(XAnnotatedElement element, String path)
buildHierarchyColumnOverrideback to summary
private void buildHierarchyColumnOverride(XClass element)
buildJoinColumnOverrideback to summary
private static Map<String, JoinColumn[]> buildJoinColumnOverride(XAnnotatedElement element, String path)
buildJoinTableOverrideback to summary
private static Map<String, JoinTable> buildJoinTableOverride(XAnnotatedElement element, String path)
createTemporalColumnback to summary
private static Column createTemporalColumn(XAnnotatedElement element, String path, MetadataBuildingContext context)
createTimeZoneColumnback to summary
private static Column createTimeZoneColumn(XAnnotatedElement element, Column column)
getContextback to summary
protected MetadataBuildingContext getContext()

Get the mappings

Returns:MetadataBuildingContext

The mappings

getExactOverriddenColumnback to summary
private Column[] getExactOverriddenColumn(String propertyName)

Get column overriding, property first, then parent, then holder find the overridden rules from the exact property name.

getExactOverriddenForeignKeyback to summary
private ForeignKey getExactOverriddenForeignKey(String propertyName)
getExactOverriddenJoinColumnback to summary
private JoinColumn[] getExactOverriddenJoinColumn(String propertyName)

Get column overriding, property first, then parent, then holder

getExactOverriddenJoinTableback to summary
private JoinTable getExactOverriddenJoinTable(String propertyName)

Get column overriding, property first, then parent, then holder

getJoinTableback to summary
public JoinTable getJoinTable(XProperty property)

Implements org.hibernate.boot.model.internal.PropertyHolder.getJoinTable.

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.

Annotations
@Override
getOverriddenColumnback to summary
public Column[] getOverriddenColumn(String propertyName)

Implements org.hibernate.boot.model.internal.PropertyHolder.getOverriddenColumn.

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing

These rules are here to support both JPA 2 and legacy overriding rules.

Annotations
@Override
getOverriddenColumnTransformerback to summary
public ColumnTransformer getOverriddenColumnTransformer(String logicalColumnName)

Implements org.hibernate.boot.model.internal.PropertyHolder.getOverriddenColumnTransformer.

Annotations
@Override
getOverriddenForeignKeyback to summary
public ForeignKey getOverriddenForeignKey(String propertyName)

Overrides default org.hibernate.boot.model.internal.PropertyHolder.getOverriddenForeignKey.

Doc from org.hibernate.boot.model.internal.PropertyHolder.getOverriddenForeignKey.

return null if hte foreign key is not overridden, or the foreign key if true

Annotations
@Override
getOverriddenJoinColumnback to summary
public JoinColumn[] getOverriddenJoinColumn(String propertyName)

Implements org.hibernate.boot.model.internal.PropertyHolder.getOverriddenJoinColumn.

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.

Annotations
@Override
getOverriddenJoinTableback to summary
public JoinTable getOverriddenJoinTable(String propertyName)

Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing These rules are here to support both JPA 2 and legacy overriding rules.

getPathback to summary
public String getPath()

Implements org.hibernate.boot.model.internal.PropertyHolder.getPath.

Annotations
@Override
isInIdClassback to summary
public boolean isInIdClass()

Implements org.hibernate.boot.model.internal.PropertyHolder.isInIdClass.

Annotations
@Override
locateAttributeConversionInfoback to summary
protected abstract AttributeConversionInfo locateAttributeConversionInfo(XProperty property)
locateAttributeConversionInfoback to summary
protected abstract AttributeConversionInfo locateAttributeConversionInfo(String path)
makeAttributeConverterDescriptorback to summary
protected ConverterDescriptor makeAttributeConverterDescriptor(AttributeConversionInfo conversion)
normalizeCompositePathback to summary
protected abstract String normalizeCompositePath(String attributeName)
normalizeCompositePathForLoggingback to summary
protected abstract String normalizeCompositePathForLogging(String attributeName)
resolveAttributeConverterDescriptorback to summary
public ConverterDescriptor resolveAttributeConverterDescriptor(XProperty property)

Implements org.hibernate.boot.model.internal.PropertyHolder.resolveAttributeConverterDescriptor.

Doc from org.hibernate.boot.model.internal.PropertyHolder.resolveAttributeConverterDescriptor.

Determine the AttributeConverter to use for the given property.

Returns:ConverterDescriptor

The ConverterDescriptor

Annotations
@Override
setCurrentPropertyback to summary
protected void setCurrentProperty(XProperty property)

Set the property to be processed. property can be null

Parameters
property:XProperty

The property

setInIdClassback to summary
public void setInIdClass(Boolean isInIdClass)

Implements org.hibernate.boot.model.internal.PropertyHolder.setInIdClass.

Annotations
@Override
setParentPropertyback to summary
public void setParentProperty(String parentProperty)

Implements org.hibernate.boot.model.internal.PropertyHolder.setParentProperty.

Annotations
@Override
org.hibernate.boot.model.internal back to summary

private Class AbstractPropertyHolder.ColumnImpl

extends Object
implements Column
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.model.internal.AbstractPropertyHolder.ColumnImpl
All Implemented Interfaces
jakarta.persistence.Column, java.lang.annotation.Annotation

Field Summary

Modifier and TypeField and Description
private final String
private final boolean
private final String
private final boolean
private final int
private final String
private final boolean
private final boolean

Constructor Summary

AccessConstructor and Description
private
ColumnImpl(String name, boolean unique, boolean nullable, boolean insertable, boolean updatable, String columnDefinition, String table, int precision)

Method Summary

Modifier and TypeMethod and Description
public Class<? extends Annotation>
annotationType()

Implements java.lang.annotation.Annotation.annotationType.

Returns the annotation interface of this annotation.
public String
columnDefinition()

Implements jakarta.persistence.Column.columnDefinition.

(Optional) The SQL fragment that is used when generating the DDL for the column.
public boolean
insertable()

Implements jakarta.persistence.Column.insertable.

(Optional) Whether the column is included in SQL INSERT statements generated by the persistence provider.
public int
length()

Implements jakarta.persistence.Column.length.

(Optional) The column length.
public String
name()

Implements jakarta.persistence.Column.name.

(Optional) The name of the column.
public boolean
nullable()

Implements jakarta.persistence.Column.nullable.

(Optional) Whether the database column is nullable.
public int
precision()

Implements jakarta.persistence.Column.precision.

(Optional) The precision for a decimal (exact numeric) column.
public int
scale()

Implements jakarta.persistence.Column.scale.

(Optional) The scale for a decimal (exact numeric) column.
public String
table()

Implements jakarta.persistence.Column.table.

(Optional) The name of the table that contains the column.
public boolean
unique()

Implements jakarta.persistence.Column.unique.

(Optional) Whether the column is a unique key.
public boolean
updatable()

Implements jakarta.persistence.Column.updatable.

(Optional) Whether the column is included in SQL UPDATE statements generated by the persistence provider.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnDefinitionback to summary
private final String columnDefinition
insertableback to summary
private final boolean insertable
nameback to summary
private final String name
nullableback to summary
private final boolean nullable
precisionback to summary
private final int precision
tableback to summary
private final String table
uniqueback to summary
private final boolean unique
updatableback to summary
private final boolean updatable

Constructor Detail

ColumnImplback to summary
private ColumnImpl(String name, boolean unique, boolean nullable, boolean insertable, boolean updatable, String columnDefinition, String table, int precision)

Method Detail

annotationTypeback to summary
public Class<? extends Annotation> annotationType()

Implements java.lang.annotation.Annotation.annotationType.

Doc from java.lang.annotation.Annotation.annotationType.

Returns the annotation interface of this annotation.

Returns:Class<? extends Annotation>

the annotation interface of this annotation

Annotations
@Override
columnDefinitionback to summary
public String columnDefinition()

Implements jakarta.persistence.Column.columnDefinition.

Doc from jakarta.persistence.Column.columnDefinition.

(Optional) The SQL fragment that is used when generating the DDL for the column.

Defaults to the generated SQL to create a column of the inferred type.

Annotations
@Override
insertableback to summary
public boolean insertable()

Implements jakarta.persistence.Column.insertable.

Doc from jakarta.persistence.Column.insertable.

(Optional) Whether the column is included in SQL INSERT statements generated by the persistence provider.

Annotations
@Override
lengthback to summary
public int length()

Implements jakarta.persistence.Column.length.

Doc from jakarta.persistence.Column.length.

(Optional) The column length. (Applies only if a string-valued column is used.)

Annotations
@Override
nameback to summary
public String name()

Implements jakarta.persistence.Column.name.

Doc from jakarta.persistence.Column.name.

(Optional) The name of the column. Defaults to the property or field name.

Annotations
@Override
nullableback to summary
public boolean nullable()

Implements jakarta.persistence.Column.nullable.

Doc from jakarta.persistence.Column.nullable.

(Optional) Whether the database column is nullable.

Annotations
@Override
precisionback to summary
public int precision()

Implements jakarta.persistence.Column.precision.

Doc from jakarta.persistence.Column.precision.

(Optional) The precision for a decimal (exact numeric) column. (Applies only if a decimal column is used.) Value must be set by developer if used when generating the DDL for the column.

Annotations
@Override
scaleback to summary
public int scale()

Implements jakarta.persistence.Column.scale.

Doc from jakarta.persistence.Column.scale.

(Optional) The scale for a decimal (exact numeric) column. (Applies only if a decimal column is used.)

Annotations
@Override
tableback to summary
public String table()

Implements jakarta.persistence.Column.table.

Doc from jakarta.persistence.Column.table.

(Optional) The name of the table that contains the column. If absent the column is assumed to be in the primary table.

Annotations
@Override
uniqueback to summary
public boolean unique()

Implements jakarta.persistence.Column.unique.

Doc from jakarta.persistence.Column.unique.

(Optional) Whether the column is a unique key. This is a shortcut for the UniqueConstraint annotation at the table level and is useful for when the unique key constraint corresponds to only a single column. This constraint applies in addition to any constraint entailed by primary key mapping and to constraints specified at the table level.

Annotations
@Override
updatableback to summary
public boolean updatable()

Implements jakarta.persistence.Column.updatable.

Doc from jakarta.persistence.Column.updatable.

(Optional) Whether the column is included in SQL UPDATE statements generated by the persistence provider.

Annotations
@Override