Package org.hibernate.metamodel.mapping
Interface ModelPart
- All Superinterfaces:
Bindable
,JdbcMappingContainer
,MappingModelExpressible
- All Known Subinterfaces:
AggregatedIdentifierMapping
,Association
,AttributeMapping
,BasicEntityIdentifierMapping
,BasicValuedModelPart
,CollectionIdentifierDescriptor
,CollectionPart
,CompositeIdentifierMapping
,DatabaseSnapshotContributor
,DiscriminatedAssociationModelPart
,DiscriminatorMapping
,EmbeddableDiscriminatorMapping
,EmbeddableMappingType
,EmbeddableValuedFetchable
,EmbeddableValuedModelPart
,EntityAssociationMapping
,EntityCollectionPart
,EntityDiscriminatorMapping
,EntityIdentifierMapping
,EntityMappingType
,EntityPersister
,EntityRowIdMapping
,EntityValuedFetchable
,EntityValuedModelPart
,EntityVersionMapping
,Fetchable
,FetchableContainer
,ForeignKeyDescriptor
,InFlightEntityMappingType
,Loadable
,ManagedMappingType
,ModelPartContainer
,NaturalIdMapping
,NonAggregatedIdentifierMapping
,NonAggregatedIdentifierMapping.IdentifierValueMapper
,OwnedValuedModelPart
,PluralAttributeMapping
,RootTableGroupProducer
,SingleAttributeIdentifierMapping
,SingularAttributeMapping
,SoftDeletableModelPart
,SoftDeleteMapping
,TableGroupJoinProducer
,TableGroupProducer
,ValuedModelPart
,VirtualModelPart
- All Known Implementing Classes:
AbstractAttributeMapping
,AbstractCompositeIdentifierMapping
,AbstractDiscriminatorMapping
,AbstractEmbeddableMapping
,AbstractEntityCollectionPart
,AbstractEntityPersister
,AbstractNaturalIdMapping
,AbstractSingularAttributeMapping
,AbstractStateArrayContributorMapping
,AnonymousTupleBasicEntityIdentifierMapping
,AnonymousTupleBasicValuedModelPart
,AnonymousTupleEmbeddableValuedModelPart
,AnonymousTupleEmbeddedEntityIdentifierMapping
,AnonymousTupleEntityValuedModelPart
,AnonymousTupleNonAggregatedEntityIdentifierMapping
,AnonymousTupleTableGroupProducer
,AnyDiscriminatorPart
,AnyKeyPart
,BasicAttributeMapping
,BasicEntityIdentifierMappingImpl
,BasicValuedCollectionPart
,CaseStatementDiscriminatorMappingImpl
,CollectionIdentifierDescriptorImpl
,CompoundNaturalIdMapping
,CteTupleTableGroupProducer
,DiscriminatedAssociationAttributeMapping
,DiscriminatedCollectionPart
,EmbeddableMappingTypeImpl
,EmbeddedAttributeMapping
,EmbeddedCollectionPart
,EmbeddedForeignKeyDescriptor
,EmbeddedIdentifierMappingImpl
,EntityRowIdMappingImpl
,EntityVersionMappingImpl
,ExplicitColumnDiscriminatorMappingImpl
,IdClassEmbeddable
,InverseNonAggregatedIdentifierMapping
,JoinedSubclassEntityPersister
,ManyToManyCollectionPart
,MockEntityPersister
,NonAggregatedIdentifierMappingImpl
,OneToManyCollectionPart
,PluralAttributeMappingImpl
,ProcessorSessionFactory.EntityPersister
,SimpleForeignKeyDescriptor
,SimpleNaturalIdMapping
,SingleTableEntityPersister
,SoftDeleteMappingImpl
,ToOneAttributeMapping
,UnionSubclassEntityPersister
,VirtualEmbeddedAttributeMapping
,VirtualIdEmbeddable
Base descriptor, within the mapping model, for any part of the
application's domain model: an attribute, an entity identifier,
collection elements, and so on.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Functional interface for consuming the JDBC values, along with two values of typeX
andY
.static interface
Functional interface for consuming the JDBC values.Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,
Y>, Bindable.JdbcValuesConsumer -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.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 boolean
areEqual
(@Nullable Object one, @Nullable Object other, SharedSessionContractImplementor session) default AttributeMapping
default @Nullable BasicValuedModelPart
default EntityMappingType
<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.default int
breakDownJdbcValues
(Object domainValue, ModelPart.JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session) A short hand form ofbreakDownJdbcValues(Object, int, Object, Object, JdbcValueBiConsumer, SharedSessionContractImplementor)
, that passes 0 as offset and null for the two valuesX
andY
.<T> DomainResult<T>
createDomainResult
(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.default <X,
Y> int decompose
(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Similar tobreakDownJdbcValues(Object, int, Object, Object, JdbcValueBiConsumer, SharedSessionContractImplementor)
, but this method is supposed to be used for decomposing values for assignment expressions.default int
decompose
(Object domainValue, ModelPart.JdbcValueConsumer valueConsumer, SharedSessionContractImplementor session) A short hand form ofdecompose(Object, int, Object, Object, JdbcValueBiConsumer, SharedSessionContractImplementor)
, that passes 0 as offset and null for the two valuesX
andY
.default int
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 offorEachSelectable(int, SelectableConsumer)
, that passes 0 as offset.JavaType<?>
The Java type for this part.The type for this part.The local part name, which is generally the unqualified role nameboolean
default boolean
default boolean
Whether this model part describes something that physically exists in the domain model.Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
addToCacheKey, disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, getJdbcTypeCount
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType, getJdbcMapping, getSingleJdbcMapping
-
Method Details
-
getPartName
String getPartName()The local part name, which is generally the unqualified role name -
getPartMappingType
MappingType getPartMappingType()The type for this part. -
getJavaType
JavaType<?> getJavaType()The Java type for this part. Generally equivalent toMappingType.getMappedJavaType()
relative togetPartMappingType()
-
isVirtual
default boolean isVirtual()Whether this model part describes something that physically exists in the domain model. For example, an entity's discriminator is part of the model, but is not a physical part of the domain model - there is no "discriminator attribute". Also indicates whether the part is castable toVirtualModelPart
-
isEntityIdentifierMapping
default boolean isEntityIdentifierMapping() -
hasPartitionedSelectionMapping
boolean hasPartitionedSelectionMapping() -
forEachSelectable
A short hand form offorEachSelectable(int, SelectableConsumer)
, that passes 0 as offset. -
forEachSelectable
Visits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited. -
asAttributeMapping
-
asEntityMappingType
-
asBasicValuedModelPart
-
findContainingEntityMapping
EntityMappingType findContainingEntityMapping()