Package org.hibernate.metamodel.mapping
Interface EntityValuedModelPart
-
- All Superinterfaces:
Bindable
,FetchableContainer
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,ModelPartContainer
,Queryable
- All Known Subinterfaces:
EntityMappingType
,EntityPersister
,EntityValuedFetchable
,InFlightEntityMappingType
,Loadable
,Lockable
,OuterJoinLoadable
,PostInsertIdentityPersister
,Queryable
,SQLLoadable
,UniqueKeyLoadable
- All Known Implementing Classes:
AbstractEntityPersister
,AnonymousTupleEntityValuedModelPart
,EntityCollectionPart
,JoinedSubclassEntityPersister
,SingleTableEntityPersister
,ToOneAttributeMapping
,UnionSubclassEntityPersister
public interface EntityValuedModelPart extends FetchableContainer
Entity-valued model partManyToOne
OneToOne
- entity-valued collection element
- entity-valued Map key
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description 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 <T> DomainResult<T>
createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Create a DomainResult for a specific reference to this ModelPart.default Object
disassemble(Object value, SharedSessionContractImplementor session)
default ModelPart
findSubPart(String name)
default ModelPart
findSubPart(String name, EntityMappingType targetType)
For an entity, this form allows for Hibernate's "implicit treat" support - meaning it should find a sub-part whether defined on the entity, its super-type or even one of its sub-types.default int
forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
default int
forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)
Visit each JdbcMapping starting from the given offsetdefault int
forEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer consumer, SharedSessionContractImplementor session)
EntityMappingType
getEntityMappingType()
default int
getJdbcTypeCount()
The number of JDBC mappingsdefault void
visitSubParts(Consumer<ModelPart> consumer, EntityMappingType targetType)
LikeQueryable.findSubPart(java.lang.String, org.hibernate.metamodel.mapping.EntityMappingType)
, this form visits all parts defined on the entity, its super-types and its sub-types.-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, getJdbcMappings
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getFetchable, getKeyFetchable, getNumberOfFetchables, getNumberOfKeyFetchables, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, breakDownJdbcValues, findContainingEntityMapping, forEachSelectable, forEachSelectable, getJavaType, getNavigableRole, getPartMappingType, getPartName
-
Methods inherited from interface org.hibernate.metamodel.mapping.Queryable
findByPath, findSubTypesSubPart, resolveSubPart
-
-
-
-
Method Detail
-
getEntityMappingType
EntityMappingType getEntityMappingType()
-
findSubPart
default ModelPart findSubPart(String name, EntityMappingType targetType)
Description copied from interface:Queryable
For an entity, this form allows for Hibernate's "implicit treat" support - meaning it should find a sub-part whether defined on the entity, its super-type or even one of its sub-types.- Specified by:
findSubPart
in interfaceQueryable
-
visitSubParts
default void visitSubParts(Consumer<ModelPart> consumer, EntityMappingType targetType)
Description copied from interface:Queryable
LikeQueryable.findSubPart(java.lang.String, org.hibernate.metamodel.mapping.EntityMappingType)
, this form visits all parts defined on the entity, its super-types and its sub-types.- Specified by:
visitSubParts
in interfaceQueryable
-
createDomainResult
default <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
-
getJdbcTypeCount
default int getJdbcTypeCount()
Description copied from interface:Bindable
The number of JDBC mappings- Specified by:
getJdbcTypeCount
in interfaceBindable
- Specified by:
getJdbcTypeCount
in interfaceJdbcMappingContainer
-
forEachJdbcType
default 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
-
disassemble
default Object disassemble(Object value, SharedSessionContractImplementor session)
- Specified by:
disassemble
in interfaceBindable
- See Also:
As an example, consider the following domain model: ````
-
forEachDisassembledJdbcValue
default int forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachDisassembledJdbcValue
in interfaceBindable
-
forEachJdbcValue
default int forEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer consumer, SharedSessionContractImplementor session)
- Specified by:
forEachJdbcValue
in interfaceBindable
-
-