Class AbstractEntityCollectionPart
java.lang.Object
org.hibernate.metamodel.mapping.internal.AbstractEntityCollectionPart
- All Implemented Interfaces:
Bindable
,CollectionPart
,EntityValuedModelPart
,EntityCollectionPart
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,ModelPartContainer
,SelectableMappings
,ValuedModelPart
,ValueMapping
,TableGroupProducer
,EntityValuedFetchable
,Fetchable
,FetchableContainer
,FetchOptions
,FetchStyleAccess
,FetchTimingAccess
,JavaTypedExpressible
- Direct Known Subclasses:
ManyToManyCollectionPart
,OneToManyCollectionPart
public abstract class AbstractEntityCollectionPart
extends Object
implements EntityCollectionPart, FetchOptions, TableGroupProducer
Base support for EntityCollectionPart implementations
-
Nested Class Summary
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.CollectionPart
CollectionPart.Nature
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.internal.EntityCollectionPart
EntityCollectionPart.Cardinality
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,
Y>, ModelPart.JdbcValueConsumer -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionAbstractEntityCollectionPart
(CollectionPart.Nature nature, Collection collectionBootDescriptor, CollectionPersister collectionDescriptor, EntityMappingType associatedEntityTypeDescriptor, NotFoundAction notFoundAction, MappingModelCreationProcess creationProcess) protected
For Hibernate Reactive -
Method Summary
Modifier and TypeMethodDescriptionprotected EagerCollectionFetch
buildEagerCollectionFetch
(NavigablePath fetchedPath, PluralAttributeMapping fetchedAttribute, TableGroup collectionTableGroup, FetchParent fetchParent, DomainResultCreationState creationState) For Hibernate Reactiveprotected EntityFetch
buildEntityFetchJoined
(FetchParent fetchParent, AbstractEntityCollectionPart abstractEntityCollectionPart, TableGroup partTableGroup, NavigablePath fetchablePath, DomainResultCreationState creationState) For Hibernate Reactiveboolean
containsTableReference
(String tableExpression) <T> DomainResult<T>
createDomainResult
(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.createTableGroupInternal
(boolean canUseInnerJoins, NavigablePath navigablePath, boolean fetched, String sourceAlias, SqlAliasBase sqlAliasBase, SqlAstCreationState creationState) disassemble
(Object value, SharedSessionContractImplementor session) Breaks down a value ofJ
into its simple pieces.generateFetch
(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState) Generates a Fetch of this fetchableint
The key that identifies this Fetchable within aFetchableContainer
.The name of the fetchable.The configured fetch timing and styleDescriptor for the type of this mappingint
The number of fetchables in the containerGet the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedgetStyle()
boolean
Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.boolean
boolean
protected abstract AssociationKey
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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.CollectionPart
getInclusionCheckPart, getPartName
Methods inherited from interface org.hibernate.metamodel.mapping.internal.EntityCollectionPart
addToCacheKey, finishInitialization, getCardinality, getEntityMappingType, getExpressibleJavaType, getJavaType, getJdbcTypeCount, getPartMappingType
Methods inherited from interface org.hibernate.metamodel.mapping.EntityValuedModelPart
applySqlSelections, applySqlSelections, findSubPart, findSubPart, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachSubPart, visitSubParts
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, isSelectable, resolveCircularFetch
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getFetchable, getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, getSelectableIndex, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchables
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, decompose, decompose, hasPartitionedSelectionMapping, isEntityIdentifierMapping, isVirtual
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
getSelectable
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachSelectable, forEachUpdatable, getContainingTableExpression, getSingleJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
treatAs
-
Field Details
-
targetKeyPropertyNames
-
-
Constructor Details
-
AbstractEntityCollectionPart
public AbstractEntityCollectionPart(CollectionPart.Nature nature, Collection collectionBootDescriptor, CollectionPersister collectionDescriptor, EntityMappingType associatedEntityTypeDescriptor, NotFoundAction notFoundAction, MappingModelCreationProcess creationProcess) -
AbstractEntityCollectionPart
For Hibernate Reactive
-
-
Method Details
-
toString
-
getCollectionDescriptor
-
getMappedType
Description copied from interface:ValueMapping
Descriptor for the type of this mapping- Specified by:
getMappedType
in interfaceValueMapping
-
getNature
- Specified by:
getNature
in interfaceCollectionPart
-
getCollectionAttribute
- Specified by:
getCollectionAttribute
in interfaceCollectionPart
-
getFetchableName
Description copied from interface:Fetchable
The name of the fetchable. This is the part's "local name".- Specified by:
getFetchableName
in interfaceEntityCollectionPart
- Specified by:
getFetchableName
in interfaceFetchable
- See Also:
-
getFetchableKey
public int getFetchableKey()Description copied from interface:Fetchable
The key that identifies this Fetchable within aFetchableContainer
. If this Fetchable is part ofFetchableContainer.visitFetchables(IndexedConsumer, EntityMappingType)
, the values is guaranteed to be between 0 (inclusive) andFetchableContainer.getNumberOfFetchableKeys()
(exclusive). Other Fetchable objects may have a special negative value.The main intent of this key is to index e.g.
Fetch
objects in an array.- Specified by:
getFetchableKey
in interfaceFetchable
-
getAssociatedEntityMappingType
- Specified by:
getAssociatedEntityMappingType
in interfaceEntityCollectionPart
-
getNotFoundAction
- Specified by:
getNotFoundAction
in interfaceEntityCollectionPart
-
getMappedFetchOptions
Description copied from interface:Fetchable
The configured fetch timing and style- Specified by:
getMappedFetchOptions
in interfaceFetchable
-
getStyle
- Specified by:
getStyle
in interfaceFetchStyleAccess
-
getTiming
- Specified by:
getTiming
in interfaceFetchTimingAccess
-
incrementFetchDepth
public boolean incrementFetchDepth()Description copied from interface:Fetchable
Should this Fetchable affect the fetch depth? E.g., composites would generally not increment the fetch depth.- Specified by:
incrementFetchDepth
in interfaceFetchable
- See Also:
-
isOptional
public boolean isOptional()- Specified by:
isOptional
in interfaceEntityValuedFetchable
-
isUnwrapProxy
public boolean isUnwrapProxy()- Specified by:
isUnwrapProxy
in interfaceEntityValuedFetchable
-
findContainingEntityMapping
- Specified by:
findContainingEntityMapping
in interfaceModelPart
-
getNumberOfFetchables
public int getNumberOfFetchables()Description copied from interface:FetchableContainer
The number of fetchables in the container- Specified by:
getNumberOfFetchables
in interfaceFetchableContainer
-
resolveFetchAssociationKey
-
getSqlAliasStem
Description copied from interface:TableGroupProducer
Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedNote that this is a metadata-ive value. It is only ever used internal to the producer producing its TableGroup.
- Specified by:
getSqlAliasStem
in interfaceTableGroupProducer
- See Also:
-
containsTableReference
- Specified by:
containsTableReference
in interfaceTableGroupProducer
-