Interface EntityCollectionPart
- All Superinterfaces:
Bindable
,CollectionPart
,EntityValuedFetchable
,EntityValuedModelPart
,Fetchable
,FetchableContainer
,JavaTypedExpressible
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,ModelPartContainer
,SelectableMappings
,ValuedModelPart
,ValueMapping
- All Known Implementing Classes:
AbstractEntityCollectionPart
,ManyToManyCollectionPart
,OneToManyCollectionPart
An entity-valued collection-part.
- API Note:
- This mapping does not include "ANY" mappings
- Implementation Specification:
- Allows for 2-phase initialization via
finishInitialization(org.hibernate.persister.collection.CollectionPersister, org.hibernate.mapping.Collection, java.lang.String, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess)
-
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.ModelPart
ModelPart.JdbcValueBiConsumer<X,
Y>, ModelPart.JdbcValueConsumer -
Method Summary
Modifier and TypeMethodDescriptiondefault void
addToCacheKey
(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.boolean
finishInitialization
(CollectionPersister collectionDescriptor, Collection bootValueMapping, String fkTargetModelPartName, MappingModelCreationProcess creationProcess) Perform any delayed initialization.default EntityMappingType
The descriptor of the entity that is the type for this partdefault JavaType<?>
default String
The name of the fetchable.default JavaType<?>
The Java type for this part.default int
The number of JDBC mappingsdefault EntityMappingType
The type for this part.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
getCollectionAttribute, getInclusionCheckPart, getNature, getPartName
Methods inherited from interface org.hibernate.sql.results.graph.entity.EntityValuedFetchable
generateFetch, isOptional, isUnwrapProxy
Methods inherited from interface org.hibernate.metamodel.mapping.EntityValuedModelPart
applySqlSelections, applySqlSelections, createDomainResult, disassemble, findSubPart, findSubPart, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachSubPart, visitSubParts
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, getFetchableKey, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetch
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getFetchable, getKeyFetchable, getNumberOfFetchableKeys, getNumberOfFetchables, 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, findContainingEntityMapping, getNavigableRole, 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
getMappedType, treatAs
-
Method Details
-
getCardinality
EntityCollectionPart.Cardinality getCardinality() -
getNotFoundAction
NotFoundAction getNotFoundAction() -
getAssociatedEntityMappingType
EntityMappingType getAssociatedEntityMappingType() -
getFetchableName
Description copied from interface:Fetchable
The name of the fetchable. This is the part's "local name".- Specified by:
getFetchableName
in interfaceFetchable
- See Also:
-
getPartMappingType
Description copied from interface:ModelPart
The type for this part.- Specified by:
getPartMappingType
in interfaceModelPart
-
getEntityMappingType
Description copied from interface:EntityValuedModelPart
The descriptor of the entity that is the type for this part- Specified by:
getEntityMappingType
in interfaceEntityValuedModelPart
-
getJavaType
Description copied from interface:ModelPart
The Java type for this part. Generally equivalent toMappingType.getMappedJavaType()
relative toModelPart.getPartMappingType()
- Specified by:
getJavaType
in interfaceModelPart
-
getExpressibleJavaType
- Specified by:
getExpressibleJavaType
in interfaceJavaTypedExpressible
- Specified by:
getExpressibleJavaType
in interfaceValueMapping
-
getJdbcTypeCount
default int getJdbcTypeCount()Description copied from interface:Bindable
The number of JDBC mappings- Specified by:
getJdbcTypeCount
in interfaceBindable
- Specified by:
getJdbcTypeCount
in interfaceEntityValuedModelPart
- Specified by:
getJdbcTypeCount
in interfaceJdbcMappingContainer
- Specified by:
getJdbcTypeCount
in interfaceSelectableMappings
- Specified by:
getJdbcTypeCount
in interfaceValuedModelPart
-
finishInitialization
@Internal boolean finishInitialization(CollectionPersister collectionDescriptor, Collection bootValueMapping, String fkTargetModelPartName, MappingModelCreationProcess creationProcess) Perform any delayed initialization.The initialization is considered successful if the result is
true
. It is considered unsuccessful if the result isfalse
or an exception is thrown. Unsuccessful initializations are generally retried "later", to allow waiting for model-parts being available e.g.If the exception is something that will just never succeed, consider throwing an exception with the
NonTransientException
marker to allow the creation process to stop immediately
-