Package org.hibernate.metamodel.mapping
Interface EmbeddableMappingType
-
- All Superinterfaces:
Bindable
,FetchableContainer
,JdbcMappingContainer
,ManagedMappingType
,MappingModelExpressible
,MappingType
,ModelPart
,ModelPartContainer
,SelectableMappings
- All Known Subinterfaces:
NonAggregatedIdentifierMapping.IdentifierValueMapper
- All Known Implementing Classes:
AbstractEmbeddableMapping
,AnonymousTupleEmbeddableValuedModelPart
,AnonymousTupleEmbeddedEntityIdentifierMapping
,AnonymousTupleNonAggregatedEntityIdentifierMapping
,EmbeddableMappingTypeImpl
,IdClassEmbeddable
,VirtualIdEmbeddable
public interface EmbeddableMappingType extends ManagedMappingType, SelectableMappings
Describes an embeddable - the actual type- See Also:
EmbeddableValuedModelPart
- Implementation Note:
- Even though this represents the embeddable class, one is created for each embedded usage. This is done to help
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EmbeddableMappingType.ConcreteEmbeddableType
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
anyRequiresAggregateColumnWriter()
default void
applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)
Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.default void
applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection,JdbcMapping> selectionConsumer)
Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.default int
compare(Object value1, Object value2)
<T> DomainResult<T>
createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Create a DomainResult for a specific reference to this ModelPart.EmbeddableMappingType
createInverseMappingType(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess)
default EmbeddableMappingType.ConcreteEmbeddableType
findSubtypeByDiscriminator(Object discriminatorValue)
default EmbeddableMappingType.ConcreteEmbeddableType
findSubtypeBySubclass(String subclassName)
default void
forEachInsertable(int offset, SelectableConsumer consumer)
int
forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)
Visit each JdbcMapping starting from the given offsetint
forEachSelectable(int offset, SelectableConsumer consumer)
Visits each selectable mapping with the selectable index offset by the given value.default int
forEachSelectable(SelectableConsumer consumer)
A short hand form ofModelPart.forEachSelectable(int, SelectableConsumer)
, that passes 0 as offset.default void
forEachUpdatable(int offset, SelectableConsumer consumer)
default SelectableMapping
getAggregateMapping()
default Collection<EmbeddableMappingType.ConcreteEmbeddableType>
getConcreteEmbeddableTypes()
Returns the concrete embeddable subtypes or an empty collection ifisPolymorphic()
isfalse
.default EmbeddableDiscriminatorMapping
getDiscriminatorMapping()
Returns the discriminator mapping if this discriminator type is polymorphic,null
otherwise.EmbeddableValuedModelPart
getEmbeddedValueMapping()
int
getJdbcTypeCount()
The number of JDBC mappingsdefault int
getJdbcValueCount()
Different fromgetJdbcTypeCount()
as this will treat an aggregate as a single element.default SelectableMapping
getJdbcValueSelectable(int columnIndex)
default EmbeddableMappingType
getPartMappingType()
The type for this part.EmbeddableRepresentationStrategy
getRepresentationStrategy()
default int
getSelectableIndex(String selectableName)
boolean
isCreateEmptyCompositesEnabled()
default boolean
isPolymorphic()
Returnstrue
if this embeddable mapping type defines a discriminator-based inheritance hierarchy,false
otherwise.default boolean
requiresAggregateColumnWriter()
default boolean
shouldBindAggregateMapping()
default boolean
shouldMutateAggregateMapping()
default boolean
shouldSelectAggregateMapping()
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getFetchable, getKeyFetchable, getNumberOfFetchableKeys, getNumberOfFetchables, getNumberOfKeyFetchables, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getJdbcMapping, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ManagedMappingType
findAttributeMapping, forEachAttributeMapping, forEachAttributeMapping, getAttributeMapping, getAttributeMappings, getJavaType, getNumberOfAttributeMappings, getValue, getValues, hasPartitionedSelectionMapping, isAffectedByEnabledFilters, setValue, setValues
-
Methods inherited from interface org.hibernate.metamodel.mapping.MappingType
getMappedJavaType
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, decompose, decompose, findContainingEntityMapping, getNavigableRole, getPartName, isEntityIdentifierMapping, isVirtual
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, findSubPart, forEachSubPart, forEachSubPart, visitSubParts
-
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
getSelectable
-
-
-
-
Method Detail
-
getEmbeddedValueMapping
EmbeddableValuedModelPart getEmbeddedValueMapping()
-
getRepresentationStrategy
EmbeddableRepresentationStrategy getRepresentationStrategy()
-
isCreateEmptyCompositesEnabled
boolean isCreateEmptyCompositesEnabled()
-
getDiscriminatorMapping
default EmbeddableDiscriminatorMapping getDiscriminatorMapping()
Returns the discriminator mapping if this discriminator type is polymorphic,null
otherwise.
-
isPolymorphic
default boolean isPolymorphic()
Returnstrue
if this embeddable mapping type defines a discriminator-based inheritance hierarchy,false
otherwise.
-
findSubtypeByDiscriminator
default EmbeddableMappingType.ConcreteEmbeddableType findSubtypeByDiscriminator(Object discriminatorValue)
-
findSubtypeBySubclass
default EmbeddableMappingType.ConcreteEmbeddableType findSubtypeBySubclass(String subclassName)
-
getConcreteEmbeddableTypes
default Collection<EmbeddableMappingType.ConcreteEmbeddableType> getConcreteEmbeddableTypes()
Returns the concrete embeddable subtypes or an empty collection ifisPolymorphic()
isfalse
.
-
getAggregateMapping
default SelectableMapping getAggregateMapping()
-
shouldSelectAggregateMapping
default boolean shouldSelectAggregateMapping()
-
getPartMappingType
default EmbeddableMappingType getPartMappingType()
Description copied from interface:ModelPart
The type for this part.- Specified by:
getPartMappingType
in interfaceManagedMappingType
- Specified by:
getPartMappingType
in interfaceModelPart
-
shouldMutateAggregateMapping
default boolean shouldMutateAggregateMapping()
-
shouldBindAggregateMapping
default boolean shouldBindAggregateMapping()
-
anyRequiresAggregateColumnWriter
default boolean anyRequiresAggregateColumnWriter()
- Specified by:
anyRequiresAggregateColumnWriter
in interfaceManagedMappingType
-
requiresAggregateColumnWriter
default boolean requiresAggregateColumnWriter()
-
getJdbcValueCount
default int getJdbcValueCount()
Different fromgetJdbcTypeCount()
as this will treat an aggregate as a single element.
-
getJdbcValueSelectable
default SelectableMapping getJdbcValueSelectable(int columnIndex)
-
getSelectableIndex
default int getSelectableIndex(String selectableName)
- Specified by:
getSelectableIndex
in interfaceFetchableContainer
-
createInverseMappingType
EmbeddableMappingType createInverseMappingType(EmbeddedAttributeMapping valueMapping, TableGroupProducer declaringTableGroupProducer, SelectableMappings selectableMappings, MappingModelCreationProcess creationProcess)
-
forEachSelectable
default int forEachSelectable(SelectableConsumer consumer)
Description copied from interface:ModelPart
A short hand form ofModelPart.forEachSelectable(int, SelectableConsumer)
, that passes 0 as offset.- Specified by:
forEachSelectable
in interfaceModelPart
- Specified by:
forEachSelectable
in interfaceSelectableMappings
-
forEachSelectable
int forEachSelectable(int offset, SelectableConsumer consumer)
Description copied from interface:ModelPart
Visits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.- Specified by:
forEachSelectable
in interfaceModelPart
- Specified by:
forEachSelectable
in interfaceSelectableMappings
- See Also:
SelectableConsumer.accept(int, SelectableMapping)
-
forEachInsertable
default void forEachInsertable(int offset, SelectableConsumer consumer)
-
forEachUpdatable
default void forEachUpdatable(int offset, SelectableConsumer consumer)
-
getJdbcTypeCount
int getJdbcTypeCount()
Description copied from interface:Bindable
The number of JDBC mappings- Specified by:
getJdbcTypeCount
in interfaceBindable
- Specified by:
getJdbcTypeCount
in interfaceJdbcMappingContainer
- Specified by:
getJdbcTypeCount
in interfaceSelectableMappings
-
forEachJdbcType
int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)
Description copied from interface:JdbcMappingContainer
Visit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcType
in interfaceJdbcMappingContainer
-
createDomainResult
<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 interfaceModelPart
-
applySqlSelections
default void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)
Description copied from interface:ModelPart
Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelections
in interfaceModelPart
-
applySqlSelections
default void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection,JdbcMapping> selectionConsumer)
Description copied from interface:ModelPart
Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelections
in interfaceModelPart
-
-