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.SuccessfulCompletionCallbackNested 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.ConcreteEmbeddableTypeNested 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) voidforEachInsertable(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.voidforEachUpdatable(int offset, SelectableConsumer consumer) static EmbeddableMappingTypeImplfrom(Component bootDescriptor, CompositeType compositeType, boolean[] insertability, boolean[] updateability, Function<EmbeddableMappingType, EmbeddableValuedModelPart> embeddedPartBuilder, MappingModelCreationProcess creationProcess) static EmbeddableMappingTypeImplfrom(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,nullotherwise.JavaType<?>The descriptor descriptor for the mapped Java typeThe local part name, which is generally the unqualified role namebooleanprotected voidsetAttributeValues(Object component, Object[] values) booleanbooleanMethods 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, visitSubPartsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.metamodel.mapping.EmbeddableMappingType
anyRequiresAggregateColumnWriter, applySqlSelections, applySqlSelections, compare, getJdbcValueCount, getJdbcValueSelectable, getPartMappingType, getSelectableIndex, isPolymorphic, shouldMutateAggregateMappingMethods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchablesMethods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ManagedMappingType
getJavaType, hasPartitionedSelectionMapping, isAffectedByEnabledFiltersMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPartMethods 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:
createInverseMappingTypein interfaceEmbeddableMappingType
-
getEmbeddedValueMapping
- Specified by:
getEmbeddedValueMappingin interfaceEmbeddableMappingType
-
getDiscriminatorMapping
Description copied from interface:EmbeddableMappingTypeReturns the discriminator mapping if this discriminator type is polymorphic,nullotherwise.- Specified by:
getDiscriminatorMappingin interfaceEmbeddableMappingType
-
getMappedJavaType
Description copied from interface:MappingTypeThe descriptor descriptor for the mapped Java type- Specified by:
getMappedJavaTypein interfaceMappingType- Overrides:
getMappedJavaTypein classAbstractEmbeddableMapping
-
getRepresentationStrategy
- Specified by:
getRepresentationStrategyin interfaceEmbeddableMappingType
-
getPartName
Description copied from interface:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein interfaceModelPart
-
findSubtypeByDiscriminator
public EmbeddableMappingType.ConcreteEmbeddableType findSubtypeByDiscriminator(Object discriminatorValue) - Specified by:
findSubtypeByDiscriminatorin interfaceEmbeddableMappingType
-
findSubtypeBySubclass
- Specified by:
findSubtypeBySubclassin interfaceEmbeddableMappingType
-
getConcreteEmbeddableTypes
Description copied from interface:EmbeddableMappingTypeReturns the concrete embeddable subtypes or an empty collection ifEmbeddableMappingType.isPolymorphic()isfalse.- Specified by:
getConcreteEmbeddableTypesin interfaceEmbeddableMappingType- Overrides:
getConcreteEmbeddableTypesin classAbstractEmbeddableMapping
-
getAttributeValues
- Overrides:
getAttributeValuesin classAbstractEmbeddableMapping
-
setAttributeValues
- Overrides:
setAttributeValuesin classAbstractEmbeddableMapping
-
findSubPart
- Specified by:
findSubPartin interfaceModelPartContainer- Overrides:
findSubPartin classAbstractEmbeddableMapping
-
forEachInsertable
- Specified by:
forEachInsertablein interfaceEmbeddableMappingType
-
forEachUpdatable
- Specified by:
forEachUpdatablein interfaceEmbeddableMappingType
-
findContainingEntityMapping
- Specified by:
findContainingEntityMappingin interfaceModelPart
-
getAggregateMapping
- Specified by:
getAggregateMappingin interfaceEmbeddableMappingType
-
requiresAggregateColumnWriter
public boolean requiresAggregateColumnWriter()- Specified by:
requiresAggregateColumnWriterin interfaceEmbeddableMappingType
-
shouldSelectAggregateMapping
public boolean shouldSelectAggregateMapping()- Specified by:
shouldSelectAggregateMappingin interfaceEmbeddableMappingType
-
shouldBindAggregateMapping
public boolean shouldBindAggregateMapping()- Specified by:
shouldBindAggregateMappingin interfaceEmbeddableMappingType
-