Top Inners Constructors Methods
org.hibernate.metamodel.mapping.internal

public Class MappingModelCreationHelper

extends Object
Class Inheritance
Imports
java.io.Serializable, java.util.ArrayList, .Iterator, .List, .SortedMap, .SortedSet, java.util.function.Function, org.hibernate.FetchMode, .MappingException, .SharedSessionContract, org.hibernate.collection.internal.StandardArraySemantics, .StandardBagSemantics, .StandardIdentifierBagSemantics, .StandardListSemantics, org.hibernate.collection.spi.CollectionSemantics, org.hibernate.dialect.Dialect, org.hibernate.engine.FetchStyle, .FetchTiming, org.hibernate.engine.spi.CascadeStyle, .SessionFactoryImplementor, org.hibernate.internal.util.StringHelper, org.hibernate.mapping.Any, .BasicValue, .Collection, .Component, .DependantValue, .IndexedCollection, .KeyValue, .ManyToOne, .Map, .OneToMany, .OneToOne, .PersistentClass, .Property, .Resolvable, .Selectable, .SimpleValue, .SortableValue, .Table, .ToOne, .Value, org.hibernate.metamodel.CollectionClassification, .MappingMetamodel, org.hibernate.metamodel.mapping.AttributeMetadata, .BasicValuedModelPart, .CollectionIdentifierDescriptor, .CollectionMappingType, .CollectionPart, .CompositeIdentifierMapping, .EmbeddableMappingType, .EmbeddableValuedModelPart, .EntityIdentifierMapping, .EntityMappingType, .ForeignKeyDescriptor, .JdbcMapping, .ManagedMappingType, .ModelPart, .ModelPartContainer, .PluralAttributeMapping, .PropertyBasedMapping, .SelectableMapping, .SelectableMappings, .SelectablePath, .VirtualModelPart, org.hibernate.metamodel.model.domain.NavigableRole, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.persister.collection.AbstractCollectionPersister, .CollectionPersister, .QueryableCollection, .SQLLoadableCollection, org.hibernate.persister.entity.EntityPersister, .Joinable, org.hibernate.property.access.internal.ChainedPropertyAccessImpl, org.hibernate.property.access.spi.PropertyAccess, org.hibernate.sql.ast.spi.SqlAliasStemHelper, .SqlExpressionResolver, org.hibernate.sql.ast.tree.expression.ColumnReference, .Expression, .SqlTuple, org.hibernate.sql.ast.tree.from.TableGroup, .TableGroupProducer, org.hibernate.type.AssociationType, .BasicType, .ComponentType, .CompositeType, .EntityType, .ForeignKeyDirection, .Type, org.hibernate.type.descriptor.java.ImmutableMutabilityPlan, .JavaType, .MutabilityPlan, org.hibernate.type.descriptor.java.spi.JavaTypeRegistry, org.hibernate.type.spi.TypeConfiguration

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
private
MappingModelCreationHelper()

A factory - disallow direct instantiation

Method Summary

Modifier and TypeMethod and Description
public static BasicAttributeMapping
buildBasicAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, BasicType<T> attrType, String tableExpression, String attrColumnName, SelectablePath selectablePath, boolean isAttrFormula, String readExpr, String writeExpr, String columnDefinition, Long length, Integer precision, Integer scale, boolean isLob, boolean nullable, boolean insertable, boolean updateable, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)

public static Expression
buildColumnReferenceExpression(TableGroup tableGroup, ModelPart modelPart, SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public static EmbeddedForeignKeyDescriptor
buildEmbeddableForeignKeyDescriptor(EmbeddableValuedModelPart embeddableValuedModelPart, Value bootValueMapping, ManagedMappingType keyDeclaringType, TableGroupProducer keyDeclaringTableGroupProducer, boolean inverse, boolean[] insertable, boolean[] updateable, Dialect dialect, MappingModelCreationProcess creationProcess)

private static EmbeddedForeignKeyDescriptor
buildEmbeddableForeignKeyDescriptor(EmbeddableValuedModelPart embeddableValuedModelPart, Value bootValueMapping, ManagedMappingType keyDeclaringType, TableGroupProducer keyDeclaringTableGroupProducer, String keyTableExpression, boolean inverse, boolean[] insertable, boolean[] updateable, Dialect dialect, MappingModelCreationProcess creationProcess)

public static EmbeddedAttributeMapping
buildEmbeddedAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, CompositeType attrType, String tableExpression, String[] rootTableKeyColumnNames, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)

public static EmbeddedAttributeMapping
buildEmbeddedAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, DependantValue dependantValue, int dependantColumnIndex, ManagedMappingType declaringType, CompositeType attrType, String tableExpression, String[] rootTableKeyColumnNames, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)

public static EntityIdentifierMapping
buildEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, Property bootProperty, String attributeName, String rootTableName, String[] rootTableKeyColumnNames, CompositeType cidType, MappingModelCreationProcess creationProcess)

public static CompositeIdentifierMapping
buildNonEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, String rootTableName, String[] rootTableKeyColumnNames, PersistentClass bootEntityDescriptor, MappingModelCreationProcess creationProcess)

public static PluralAttributeMapping
buildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess)

public static PluralAttributeMapping
buildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess, Function<PluralAttributeMappingImpl, PluralAttributeMappingImpl> mappingConverter)

For Hibernate Reactive

public static ToOneAttributeMapping
buildSingularAssociationAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, EntityPersister declaringEntityPersister, EntityType attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)

For Hibernate Reactive

public static ToOneAttributeMapping
buildSingularAssociationAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, EntityPersister declaringEntityPersister, EntityType attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess, Function<ToOneAttributeMapping, ToOneAttributeMapping> mappingConverter)

public static EmbeddedAttributeMapping
createInverseModelPart(EmbeddableValuedModelPart modelPart, ManagedMappingType keyDeclaringType, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess)

protected static AttributeMetadata
getAttributeMetadata(Property bootProperty, Type attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)

public static AttributeMetadata
private static MutabilityPlan<T>
getMutabilityPlan(Property bootProperty, Type attrType, MappingModelCreationProcess creationProcess)

public static int[]
getPropertyOrder(Value bootValueMapping, MappingModelCreationProcess creationProcess)

public static String
public static String
getTableIdentifierExpression(Table table, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private static CollectionPart
interpretElement(Collection bootDescriptor, String tableExpression, CollectionPersister collectionDescriptor, String sqlAliasStem, Dialect dialect, MappingModelCreationProcess creationProcess)

private static CollectionPart
interpretMapKey(Collection bootValueMapping, CollectionPersister collectionDescriptor, String tableExpression, String sqlAliasStem, Dialect dialect, MappingModelCreationProcess creationProcess)

private static boolean

Returns:

true if the foreign key is actually set
interpretNestedToOneKeyDescriptor
(EntityPersister
The entity which contains the inverse property
referencedEntityDescriptor
,
String
The inverse property name path
referencedPropertyName
,
ToOneAttributeMapping
The attribute for which we try to set the foreign key
attributeMapping
)

Tries to ToOneAttributeMapping#setForeignKeyDescriptor to the given attribute attributeMapping, using the same value from the inverse property defined by the mapped-by.

private static void
interpretPluralAttributeMappingKeyDescriptor(PluralAttributeMappingImpl attributeMapping, Collection bootValueMapping, CollectionPersister collectionDescriptor, ManagedMappingType declaringType, Dialect dialect, MappingModelCreationProcess creationProcess)

public static boolean

Returns:

true if the foreign key is actually set
interpretToOneKeyDescriptor
(ToOneAttributeMapping
The attribute for which we try to set the foreign key
attributeMapping
,
Property
The property
bootProperty
,
ToOne
The value mapping
bootValueMapping
,
PropertyAccess
Access to the inverse property
inversePropertyAccess
,
Dialect
Current dialect
dialect
,
MappingModelCreationProcess
Current creation process
creationProcess
)

Tries to ToOneAttributeMapping#setForeignKeyDescriptor to the given attribute attributeMapping.

private static void
setReferencedAttributeForeignKeyDescriptor(AbstractAttributeMapping attributeMapping, ToOneAttributeMapping referencedAttributeMapping, EntityPersister referencedEntityDescriptor, String referencedPropertyName, Dialect dialect, MappingModelCreationProcess creationProcess)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MappingModelCreationHelperback to summary
private MappingModelCreationHelper()

A factory - disallow direct instantiation

Method Detail

buildBasicAttributeMappingback to summary
public static BasicAttributeMapping buildBasicAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, BasicType<T> attrType, String tableExpression, String attrColumnName, SelectablePath selectablePath, boolean isAttrFormula, String readExpr, String writeExpr, String columnDefinition, Long length, Integer precision, Integer scale, boolean isLob, boolean nullable, boolean insertable, boolean updateable, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)
Annotations
@SuppressWarnings:rawtypes
buildColumnReferenceExpressionback to summary
public static Expression buildColumnReferenceExpression(TableGroup tableGroup, ModelPart modelPart, SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

buildEmbeddableForeignKeyDescriptorback to summary
public static EmbeddedForeignKeyDescriptor buildEmbeddableForeignKeyDescriptor(EmbeddableValuedModelPart embeddableValuedModelPart, Value bootValueMapping, ManagedMappingType keyDeclaringType, TableGroupProducer keyDeclaringTableGroupProducer, boolean inverse, boolean[] insertable, boolean[] updateable, Dialect dialect, MappingModelCreationProcess creationProcess)
buildEmbeddableForeignKeyDescriptorback to summary
private static EmbeddedForeignKeyDescriptor buildEmbeddableForeignKeyDescriptor(EmbeddableValuedModelPart embeddableValuedModelPart, Value bootValueMapping, ManagedMappingType keyDeclaringType, TableGroupProducer keyDeclaringTableGroupProducer, String keyTableExpression, boolean inverse, boolean[] insertable, boolean[] updateable, Dialect dialect, MappingModelCreationProcess creationProcess)
buildEmbeddedAttributeMappingback to summary
public static EmbeddedAttributeMapping buildEmbeddedAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, CompositeType attrType, String tableExpression, String[] rootTableKeyColumnNames, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)
buildEmbeddedAttributeMappingback to summary
public static EmbeddedAttributeMapping buildEmbeddedAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, DependantValue dependantValue, int dependantColumnIndex, ManagedMappingType declaringType, CompositeType attrType, String tableExpression, String[] rootTableKeyColumnNames, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)
buildEncapsulatedCompositeIdentifierMappingback to summary
public static EntityIdentifierMapping buildEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, Property bootProperty, String attributeName, String rootTableName, String[] rootTableKeyColumnNames, CompositeType cidType, MappingModelCreationProcess creationProcess)
buildNonEncapsulatedCompositeIdentifierMappingback to summary
public static CompositeIdentifierMapping buildNonEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, String rootTableName, String[] rootTableKeyColumnNames, PersistentClass bootEntityDescriptor, MappingModelCreationProcess creationProcess)
buildPluralAttributeMappingback to summary
public static PluralAttributeMapping buildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess)
Annotations
@SuppressWarnings:rawtypes
buildPluralAttributeMappingback to summary
public static PluralAttributeMapping buildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess, Function<PluralAttributeMappingImpl, PluralAttributeMappingImpl> mappingConverter)

For Hibernate Reactive

Annotations
@SuppressWarnings:rawtypes
buildSingularAssociationAttributeMappingback to summary
public static ToOneAttributeMapping buildSingularAssociationAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, EntityPersister declaringEntityPersister, EntityType attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)

For Hibernate Reactive

buildSingularAssociationAttributeMappingback to summary
public static ToOneAttributeMapping buildSingularAssociationAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, EntityPersister declaringEntityPersister, EntityType attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess, Function<ToOneAttributeMapping, ToOneAttributeMapping> mappingConverter)
createInverseModelPartback to summary
public static EmbeddedAttributeMapping createInverseModelPart(EmbeddableValuedModelPart modelPart, ManagedMappingType keyDeclaringType, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess)
getAttributeMetadataback to summary
protected static AttributeMetadata getAttributeMetadata(Property bootProperty, Type attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess)
Annotations
@SuppressWarnings:rawtypes
getAttributeMetadataback to summary
public static AttributeMetadata getAttributeMetadata(PropertyAccess propertyAccess)
Annotations
@SuppressWarnings:rawtypes
getMutabilityPlanback to summary
private static MutabilityPlan<T> getMutabilityPlan(Property bootProperty, Type attrType, MappingModelCreationProcess creationProcess)
getPropertyOrderback to summary
public static int[] getPropertyOrder(Value bootValueMapping, MappingModelCreationProcess creationProcess)
getTableIdentifierExpressionback to summary
public static String getTableIdentifierExpression(Table table, MappingModelCreationProcess creationProcess)
getTableIdentifierExpressionback to summary
public static String getTableIdentifierExpression(Table table, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

interpretElementback to summary
private static CollectionPart interpretElement(Collection bootDescriptor, String tableExpression, CollectionPersister collectionDescriptor, String sqlAliasStem, Dialect dialect, MappingModelCreationProcess creationProcess)
interpretMapKeyback to summary
private static CollectionPart interpretMapKey(Collection bootValueMapping, CollectionPersister collectionDescriptor, String tableExpression, String sqlAliasStem, Dialect dialect, MappingModelCreationProcess creationProcess)
interpretNestedToOneKeyDescriptorback to summary
private static boolean interpretNestedToOneKeyDescriptor(EntityPersister referencedEntityDescriptor, String referencedPropertyName, ToOneAttributeMapping attributeMapping)

Tries to ToOneAttributeMapping#setForeignKeyDescriptor to the given attribute attributeMapping, using the same value from the inverse property defined by the mapped-by.

Parameters
referencedEntityDescriptor:EntityPersister

The entity which contains the inverse property

referencedPropertyName:String

The inverse property name path

attributeMapping:ToOneAttributeMapping

The attribute for which we try to set the foreign key

Returns:boolean

true if the foreign key is actually set

interpretPluralAttributeMappingKeyDescriptorback to summary
private static void interpretPluralAttributeMappingKeyDescriptor(PluralAttributeMappingImpl attributeMapping, Collection bootValueMapping, CollectionPersister collectionDescriptor, ManagedMappingType declaringType, Dialect dialect, MappingModelCreationProcess creationProcess)
interpretToOneKeyDescriptorback to summary
public static boolean interpretToOneKeyDescriptor(ToOneAttributeMapping attributeMapping, Property bootProperty, ToOne bootValueMapping, PropertyAccess inversePropertyAccess, Dialect dialect, MappingModelCreationProcess creationProcess)

Tries to ToOneAttributeMapping#setForeignKeyDescriptor to the given attribute attributeMapping.

Parameters
attributeMapping:ToOneAttributeMapping

The attribute for which we try to set the foreign key

bootProperty:Property

The property

bootValueMapping:ToOne

The value mapping

inversePropertyAccess:PropertyAccess

Access to the inverse property

dialect:Dialect

Current dialect

creationProcess:MappingModelCreationProcess

Current creation process

Returns:boolean

true if the foreign key is actually set

setReferencedAttributeForeignKeyDescriptorback to summary
private static void setReferencedAttributeForeignKeyDescriptor(AbstractAttributeMapping attributeMapping, ToOneAttributeMapping referencedAttributeMapping, EntityPersister referencedEntityDescriptor, String referencedPropertyName, Dialect dialect, MappingModelCreationProcess creationProcess)
org.hibernate.metamodel.mapping.internal back to summary

private Class MappingModelCreationHelper.CollectionMappingTypeImpl

extends Object
implements CollectionMappingType
Class Inheritance
  • java.lang.Object
  • org.hibernate.metamodel.mapping.internal.MappingModelCreationHelper.CollectionMappingTypeImpl
All Implemented Interfaces
org.hibernate.metamodel.mapping.CollectionMappingType, org.hibernate.metamodel.mapping.MappingType

Field Summary

Modifier and TypeField and Description
private final JavaType<?>
private final CollectionSemantics<?, ?>

Constructor Summary

AccessConstructor and Description
public
CollectionMappingTypeImpl(JavaType<?> collectionJtd, CollectionSemantics<?, ?> semantics)

Method Summary

Modifier and TypeMethod and Description
public CollectionSemantics<?, ?>
public JavaType<?>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

collectionJtdback to summary
private final JavaType<?> collectionJtd
semanticsback to summary
private final CollectionSemantics<?, ?> semantics

Constructor Detail

CollectionMappingTypeImplback to summary
public CollectionMappingTypeImpl(JavaType<?> collectionJtd, CollectionSemantics<?, ?> semantics)

Method Detail

getCollectionSemanticsback to summary
public CollectionSemantics<?, ?> getCollectionSemantics()

Implements org.hibernate.metamodel.mapping.CollectionMappingType.getCollectionSemantics.

Annotations
@Override
getMappedJavaTypeback to summary
public JavaType<?> getMappedJavaType()

Implements org.hibernate.metamodel.mapping.MappingType.getMappedJavaType.

Doc from org.hibernate.metamodel.mapping.MappingType.getMappedJavaType.

The descriptor descriptor for the mapped Java type

Annotations
@Override