Class MappingModelCreationHelper
java.lang.Object
org.hibernate.metamodel.mapping.internal.MappingModelCreationHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic BasicAttributeMappingbuildBasicAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, BasicType attrType, String tableExpression, String attrColumnName, SelectablePath selectablePath, boolean isAttrFormula, String readExpr, String writeExpr, String columnDefinition, Long length, Integer precision, Integer scale, Integer temporalPrecision, boolean isLob, boolean nullable, boolean insertable, boolean updateable, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess) static ExpressionbuildColumnReferenceExpression(@Nullable TableGroup tableGroup, ModelPart modelPart, @Nullable SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory) static EmbeddedForeignKeyDescriptorbuildEmbeddableForeignKeyDescriptor(EmbeddableValuedModelPart embeddableValuedModelPart, Value bootValueMapping, ManagedMappingType keyDeclaringType, TableGroupProducer keyDeclaringTableGroupProducer, boolean inverse, boolean[] insertable, boolean[] updateable, Dialect dialect, MappingModelCreationProcess creationProcess) static EmbeddedAttributeMappingbuildEmbeddedAttributeMapping(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) static EmbeddedAttributeMappingbuildEmbeddedAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, CompositeType attrType, String tableExpression, String[] rootTableKeyColumnNames, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess) static EntityIdentifierMappingbuildEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, Property bootProperty, String attributeName, String rootTableName, String[] rootTableKeyColumnNames, CompositeType cidType, MappingModelCreationProcess creationProcess) static CompositeIdentifierMappingbuildNonEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, String rootTableName, String[] rootTableKeyColumnNames, PersistentClass bootEntityDescriptor, MappingModelCreationProcess creationProcess) static PluralAttributeMappingbuildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess) static PluralAttributeMappingbuildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess, Function<PluralAttributeMappingImpl, PluralAttributeMappingImpl> mappingConverter) For Hibernate Reactivestatic ToOneAttributeMappingbuildSingularAssociationAttributeMapping(String attrName, NavigableRole navigableRole, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, EntityPersister declaringEntityPersister, EntityType attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess) For Hibernate Reactivestatic ToOneAttributeMappingbuildSingularAssociationAttributeMapping(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) static EmbeddedAttributeMappingcreateInverseModelPart(EmbeddableValuedModelPart modelPart, ManagedMappingType keyDeclaringType, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess) protected static AttributeMetadatagetAttributeMetadata(Property bootProperty, Type attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess) static AttributeMetadatagetAttributeMetadata(PropertyAccess propertyAccess) static int[]getPropertyOrder(Value bootValueMapping, MappingModelCreationProcess creationProcess) static @Nullable SelectablePathstatic StringgetTableIdentifierExpression(Table table, SessionFactoryImplementor sessionFactory) static StringgetTableIdentifierExpression(Table table, MappingModelCreationProcess creationProcess) static booleaninterpretToOneKeyDescriptor(ToOneAttributeMapping attributeMapping, Property bootProperty, ToOne bootValueMapping, PropertyAccess inversePropertyAccess, Dialect dialect, MappingModelCreationProcess creationProcess) Tries toToOneAttributeMapping.setForeignKeyDescriptor(org.hibernate.metamodel.mapping.ForeignKeyDescriptor)to the given attributeattributeMapping.static BasicType<?> resolveAggregateColumnBasicType(MappingModelCreationProcess creationProcess, NavigableRole navigableRole, Column column)
-
Method Details
-
buildEncapsulatedCompositeIdentifierMapping
public static EntityIdentifierMapping buildEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, Property bootProperty, String attributeName, String rootTableName, String[] rootTableKeyColumnNames, CompositeType cidType, MappingModelCreationProcess creationProcess) -
buildNonEncapsulatedCompositeIdentifierMapping
public static CompositeIdentifierMapping buildNonEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, String rootTableName, String[] rootTableKeyColumnNames, PersistentClass bootEntityDescriptor, MappingModelCreationProcess creationProcess) -
buildEmbeddedAttributeMapping
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) -
buildEmbeddedAttributeMapping
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) -
getAttributeMetadata
protected static AttributeMetadata getAttributeMetadata(Property bootProperty, Type attrType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, MappingModelCreationProcess creationProcess) -
getAttributeMetadata
-
buildPluralAttributeMapping
public static PluralAttributeMapping buildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess) -
buildPluralAttributeMapping
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 -
interpretToOneKeyDescriptor
public static boolean interpretToOneKeyDescriptor(ToOneAttributeMapping attributeMapping, Property bootProperty, ToOne bootValueMapping, PropertyAccess inversePropertyAccess, Dialect dialect, MappingModelCreationProcess creationProcess) Tries toToOneAttributeMapping.setForeignKeyDescriptor(org.hibernate.metamodel.mapping.ForeignKeyDescriptor)to the given attributeattributeMapping.- Parameters:
attributeMapping- The attribute for which we try to set the foreign keybootProperty- The propertybootValueMapping- The value mappinginversePropertyAccess- Access to the inverse propertydialect- Current dialectcreationProcess- Current creation process- Returns:
- true if the foreign key is actually set
-
buildEmbeddableForeignKeyDescriptor
public static EmbeddedForeignKeyDescriptor buildEmbeddableForeignKeyDescriptor(EmbeddableValuedModelPart embeddableValuedModelPart, Value bootValueMapping, ManagedMappingType keyDeclaringType, TableGroupProducer keyDeclaringTableGroupProducer, boolean inverse, boolean[] insertable, boolean[] updateable, Dialect dialect, MappingModelCreationProcess creationProcess) -
getSelectablePath
-
getPropertyOrder
public static int[] getPropertyOrder(Value bootValueMapping, MappingModelCreationProcess creationProcess) -
getTableIdentifierExpression
public static String getTableIdentifierExpression(Table table, MappingModelCreationProcess creationProcess) -
getTableIdentifierExpression
public static String getTableIdentifierExpression(Table table, SessionFactoryImplementor sessionFactory) -
createInverseModelPart
public static EmbeddedAttributeMapping createInverseModelPart(EmbeddableValuedModelPart modelPart, ManagedMappingType keyDeclaringType, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess) -
buildColumnReferenceExpression
public static Expression buildColumnReferenceExpression(@Nullable TableGroup tableGroup, ModelPart modelPart, @Nullable SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory)
-