Class EmbeddableMappingTypeImpl
java.lang.Object
org.hibernate.metamodel.mapping.internal.AbstractEmbeddableMapping
org.hibernate.metamodel.mapping.internal.EmbeddableMappingTypeImpl
- All Implemented Interfaces:
Bindable
,EmbeddableMappingType
,EmbeddableMappingType.ConcreteEmbeddableType
,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.EmbeddableMappingType
EmbeddableMappingType.ConcreteEmbeddableType
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, getterCache, selectableMappings, setterCache
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddableMappingTypeImpl
(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, EmbeddableMappingType inverseMappingType, MappingModelCreationProcess creationProcess) -
Method Summary
Modifier and TypeMethodDescription<X,
Y> int breakDownJdbcValues
(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.<T> DomainResult<T>
createDomainResult
(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.createInverseMappingType
(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess) <X,
Y> int decompose
(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Similar toModelPart.breakDownJdbcValues(Object, int, Object, Object, JdbcValueBiConsumer, SharedSessionContractImplementor)
, but this method is supposed to be used for decomposing values for assignment expressions.findSubPart
(String name, EntityMappingType treatTargetType) findSubtypeByDiscriminator
(Object discriminatorValue) findSubtypeBySubclass
(String subclassName) void
forEachInsertable
(int offset, SelectableConsumer consumer) <X,
Y> int forEachJdbcValue
(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) Visit each constituent JDBC value extracted from the entity instance itself.void
forEachUpdatable
(int offset, SelectableConsumer consumer) static EmbeddableMappingTypeImpl
from
(Component bootDescriptor, CompositeType compositeType, boolean[] insertability, boolean[] updateability, Function<EmbeddableMappingType, EmbeddableValuedModelPart> embeddedPartBuilder, MappingModelCreationProcess creationProcess) 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) protected Object[]
getAttributeValues
(Object compositeInstance) Returns the concrete embeddable subtypes or an empty collection ifEmbeddableMappingType.isPolymorphic()
isfalse
.Returns the discriminator mapping if this discriminator type is polymorphic,null
otherwise.JavaType<?>
The descriptor descriptor for the mapped Java typeThe local part name, which is generally the unqualified role nameboolean
boolean
protected void
setAttributeValues
(Object component, Object[] values) boolean
boolean
Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractEmbeddableMapping
addAttribute, addToCacheKey, buildGetterSetterCache, declaresAttribute, declaresAttribute, determineEmbeddablePrefix, disassemble, findAttributeMapping, finishInitialization, forEachAttributeMapping, forEachAttributeMapping, forEachDisassembledJdbcValue, forEachJdbcType, forEachSelectable, forEachSelectable, forEachSubPart, getAttributeMapping, getAttributeMappings, getDiscriminatorValue, getFetchable, getInstantiator, getJdbcMapping, getJdbcTypeCount, getNumberOfAttributeMappings, getNumberOfFetchables, getSelectable, getSelectableMappings, getSubclassId, getValue, getValues, initColumnMappings, inverseInitializeCallback, setValue, 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, isPolymorphic, 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, hasPartitionedSelectionMapping, isAffectedByEnabledFilters
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, 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 Details
-
EmbeddableMappingTypeImpl
public EmbeddableMappingTypeImpl(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, EmbeddableMappingType inverseMappingType, MappingModelCreationProcess creationProcess)
-
-
Method Details
-
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
- Specified by:
getEmbeddedValueMapping
in interfaceEmbeddableMappingType
-
getDiscriminatorMapping
Description copied from interface:EmbeddableMappingType
Returns the discriminator mapping if this discriminator type is polymorphic,null
otherwise.- Specified by:
getDiscriminatorMapping
in interfaceEmbeddableMappingType
-
getMappedJavaType
Description copied from interface:MappingType
The descriptor descriptor for the mapped Java type- Specified by:
getMappedJavaType
in interfaceMappingType
- Overrides:
getMappedJavaType
in classAbstractEmbeddableMapping
-
getRepresentationStrategy
- Specified by:
getRepresentationStrategy
in interfaceEmbeddableMappingType
-
getPartName
Description copied from interface:ModelPart
The local part name, which is generally the unqualified role name- Specified by:
getPartName
in interfaceModelPart
-
findSubtypeByDiscriminator
public EmbeddableMappingType.ConcreteEmbeddableType findSubtypeByDiscriminator(Object discriminatorValue) - Specified by:
findSubtypeByDiscriminator
in interfaceEmbeddableMappingType
-
findSubtypeBySubclass
- Specified by:
findSubtypeBySubclass
in interfaceEmbeddableMappingType
-
getConcreteEmbeddableTypes
Description copied from interface:EmbeddableMappingType
Returns the concrete embeddable subtypes or an empty collection ifEmbeddableMappingType.isPolymorphic()
isfalse
.- Specified by:
getConcreteEmbeddableTypes
in interfaceEmbeddableMappingType
-
getAttributeValues
- Overrides:
getAttributeValues
in classAbstractEmbeddableMapping
-
setAttributeValues
- Overrides:
setAttributeValues
in classAbstractEmbeddableMapping
-
findSubPart
- Specified by:
findSubPart
in interfaceModelPartContainer
- Overrides:
findSubPart
in classAbstractEmbeddableMapping
-
forEachInsertable
- Specified by:
forEachInsertable
in interfaceEmbeddableMappingType
-
forEachUpdatable
- Specified by:
forEachUpdatable
in interfaceEmbeddableMappingType
-
findContainingEntityMapping
- Specified by:
findContainingEntityMapping
in interfaceModelPart
-
isCreateEmptyCompositesEnabled
public boolean isCreateEmptyCompositesEnabled()- Specified by:
isCreateEmptyCompositesEnabled
in interfaceEmbeddableMappingType
-
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
-