Class MappingModelCreationHelper
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.MappingModelCreationHelper
-
public class MappingModelCreationHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BasicAttributeMapping
buildBasicAttributeMapping(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 Expression
buildColumnReferenceExpression(TableGroup tableGroup, ModelPart modelPart, SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory)
static EmbeddedForeignKeyDescriptor
buildEmbeddableForeignKeyDescriptor(EmbeddableValuedModelPart embeddableValuedModelPart, Value bootValueMapping, ManagedMappingType keyDeclaringType, TableGroupProducer keyDeclaringTableGroupProducer, boolean inverse, boolean[] insertable, boolean[] updateable, Dialect dialect, MappingModelCreationProcess creationProcess)
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)
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)
static EntityIdentifierMapping
buildEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, Property bootProperty, String attributeName, String rootTableName, String[] rootTableKeyColumnNames, CompositeType cidType, MappingModelCreationProcess creationProcess)
static CompositeIdentifierMapping
buildNonEncapsulatedCompositeIdentifierMapping(EntityPersister entityPersister, String rootTableName, String[] rootTableKeyColumnNames, PersistentClass bootEntityDescriptor, MappingModelCreationProcess creationProcess)
static PluralAttributeMapping
buildPluralAttributeMapping(String attrName, int stateArrayPosition, int fetchableIndex, Property bootProperty, ManagedMappingType declaringType, PropertyAccess propertyAccess, CascadeStyle cascadeStyle, FetchMode fetchMode, MappingModelCreationProcess creationProcess)
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 Reactivestatic 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 Reactivestatic 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)
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)
static AttributeMetadata
getAttributeMetadata(PropertyAccess propertyAccess)
static int[]
getPropertyOrder(Value bootValueMapping, MappingModelCreationProcess creationProcess)
static String
getTableIdentifierExpression(Table table, SessionFactoryImplementor sessionFactory)
static String
getTableIdentifierExpression(Table table, MappingModelCreationProcess creationProcess)
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
.static BasicType<?>
resolveAggregateColumnBasicType(MappingModelCreationProcess creationProcess, NavigableRole navigableRole, Column column)
-
-
-
Method Detail
-
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)
-
buildBasicAttributeMapping
public static BasicAttributeMapping buildBasicAttributeMapping(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)
-
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
public static AttributeMetadata getAttributeMetadata(PropertyAccess propertyAccess)
-
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)
-
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(TableGroup tableGroup, ModelPart modelPart, SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory)
-
resolveAggregateColumnBasicType
public static BasicType<?> resolveAggregateColumnBasicType(MappingModelCreationProcess creationProcess, NavigableRole navigableRole, Column column)
-
buildSingularAssociationAttributeMapping
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
-
buildSingularAssociationAttributeMapping
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)
-
-