Class EmbeddableMappingTypeImpl
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.AbstractEmbeddableMapping
-
- org.hibernate.metamodel.mapping.internal.EmbeddableMappingTypeImpl
-
- All Implemented Interfaces:
Bindable
,EmbeddableMappingType
,JdbcMappingContainer
,ManagedMappingType
,MappingModelExpressible
,MappingType
,ModelPart
,ModelPartContainer
,SelectableMappings
,FetchableContainer
public class EmbeddableMappingTypeImpl extends AbstractEmbeddableMapping implements SelectableMappings
Describes a "normal" embeddable.- API Note:
- At the moment, this class is also used to describe some non-"normal" things: mainly composite foreign keys.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.metamodel.mapping.internal.AbstractEmbeddableMapping
AbstractEmbeddableMapping.AttributeTypeValidator, AbstractEmbeddableMapping.ConcreteTableResolver, AbstractEmbeddableMapping.IllegalAttributeType, AbstractEmbeddableMapping.SuccessfulCompletionCallback
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer
-
-
Field Summary
-
Fields inherited from class org.hibernate.metamodel.mapping.internal.AbstractEmbeddableMapping
attributeMappings, selectableMappings
-
-
Constructor Summary
Constructors Constructor Description EmbeddableMappingTypeImpl(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, EmbeddableMappingType inverseMappingType, MappingModelCreationProcess creationProcess)
-
Method Summary
-
Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractEmbeddableMapping
addAttribute, addToCacheKey, disassemble, findAttributeMapping, findSubPart, finishInitialization, forEachAttributeMapping, forEachAttributeMapping, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachSelectable, forEachSelectable, forEachSubPart, getAttributeMapping, getAttributeMappings, getFetchable, getJdbcMapping, getJdbcTypeCount, getNumberOfAttributeMappings, getNumberOfFetchables, getSelectable, getSelectableMappings, getValues, initColumnMappings, inverseInitializeCallback, setValues, visitFetchables, visitFetchables, visitSubParts
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.EmbeddableMappingType
anyRequiresAggregateColumnWriter, applySqlSelections, applySqlSelections, compare, getJdbcValueCount, getJdbcValueSelectable, getPartMappingType, getSelectableIndex, shouldMutateAggregateMapping
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ManagedMappingType
getJavaType, getValue, hasPartitionedSelectionMapping, setValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asEntityMappingType, breakDownJdbcValues, decompose, isEntityIdentifierMapping, isVirtual
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
-
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
forEachSelectable, forEachSelectable, getJdbcTypeCount, getSelectable
-
-
-
-
Constructor Detail
-
EmbeddableMappingTypeImpl
public EmbeddableMappingTypeImpl(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, EmbeddableMappingType inverseMappingType, MappingModelCreationProcess creationProcess)
-
-
Method Detail
-
from
public static EmbeddableMappingTypeImpl from(Component bootDescriptor, CompositeType compositeType, boolean[] insertability, boolean[] updateability, Function<EmbeddableMappingType,EmbeddableValuedModelPart> embeddedPartBuilder, MappingModelCreationProcess creationProcess)
-
from
public static EmbeddableMappingTypeImpl from(Component bootDescriptor, CompositeType compositeType, String rootTableExpression, String[] rootTableKeyColumnNames, Property componentProperty, DependantValue dependantValue, int dependantColumnIndex, boolean[] insertability, boolean[] updateability, Function<EmbeddableMappingType,EmbeddableValuedModelPart> embeddedPartBuilder, MappingModelCreationProcess creationProcess)
-
createInverseMappingType
public EmbeddableMappingType createInverseMappingType(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess)
- Specified by:
createInverseMappingType
in interfaceEmbeddableMappingType
-
getEmbeddedValueMapping
public EmbeddableValuedModelPart getEmbeddedValueMapping()
- Specified by:
getEmbeddedValueMapping
in interfaceEmbeddableMappingType
-
getMappedJavaType
public JavaType<?> getMappedJavaType()
Description copied from interface:MappingType
The descriptor descriptor for the mapped Java type- Specified by:
getMappedJavaType
in interfaceMappingType
- Overrides:
getMappedJavaType
in classAbstractEmbeddableMapping
-
getRepresentationStrategy
public EmbeddableRepresentationStrategy getRepresentationStrategy()
- Specified by:
getRepresentationStrategy
in interfaceEmbeddableMappingType
-
getPartName
public String getPartName()
Description copied from interface:ModelPart
The local part name, which is generally the unqualified role name- Specified by:
getPartName
in interfaceModelPart
-
getNavigableRole
public NavigableRole getNavigableRole()
- Specified by:
getNavigableRole
in interfaceModelPart
- See Also:
ModelPart.getPartName()
-
createDomainResult
public <T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:ModelPart
Create a DomainResult for a specific reference to this ModelPart.- Specified by:
createDomainResult
in interfaceEmbeddableMappingType
- Specified by:
createDomainResult
in interfaceModelPart
-
breakDownJdbcValues
public <X,Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X,Y> valueConsumer, SharedSessionContractImplementor session)
Description copied from interface:ModelPart
Breaks down the domain value to its constituent JDBC values. Think of it as breaking the multi-dimensional array into a visitable flat array. Additionally, it passes through the valuesX
andY
to the consumer. Returns the amount of jdbc types that have been visited.- Specified by:
breakDownJdbcValues
in interfaceModelPart
- Overrides:
breakDownJdbcValues
in classAbstractEmbeddableMapping
-
decompose
public <X,Y> int decompose(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X,Y> valueConsumer, SharedSessionContractImplementor session)
Description copied from interface:ModelPart
Similar toModelPart.breakDownJdbcValues(Object, int, Object, Object, JdbcValueBiConsumer, SharedSessionContractImplementor)
, but this method is supposed to be used for decomposing values for assignment expressions. Returns the amount of jdbc types that have been visited.
-
forEachInsertable
public void forEachInsertable(int offset, SelectableConsumer consumer)
- Specified by:
forEachInsertable
in interfaceEmbeddableMappingType
-
forEachUpdatable
public void forEachUpdatable(int offset, SelectableConsumer consumer)
- Specified by:
forEachUpdatable
in interfaceEmbeddableMappingType
-
findContainingEntityMapping
public EntityMappingType findContainingEntityMapping()
- Specified by:
findContainingEntityMapping
in interfaceModelPart
-
isCreateEmptyCompositesEnabled
public boolean isCreateEmptyCompositesEnabled()
- Specified by:
isCreateEmptyCompositesEnabled
in interfaceEmbeddableMappingType
-
getAggregateMapping
public SelectableMapping getAggregateMapping()
- Specified by:
getAggregateMapping
in interfaceEmbeddableMappingType
-
requiresAggregateColumnWriter
public boolean requiresAggregateColumnWriter()
- Specified by:
requiresAggregateColumnWriter
in interfaceEmbeddableMappingType
-
shouldSelectAggregateMapping
public boolean shouldSelectAggregateMapping()
- Specified by:
shouldSelectAggregateMapping
in interfaceEmbeddableMappingType
-
shouldBindAggregateMapping
public boolean shouldBindAggregateMapping()
- Specified by:
shouldBindAggregateMapping
in interfaceEmbeddableMappingType
-
-