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 ClassesNested 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.NatureNested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.booleanfinishInitialization(CollectionPersister collectionDescriptor, Collection bootValueMapping, String fkTargetModelPartName, MappingModelCreationProcess creationProcess) Perform any delayed initialization.default EntityMappingTypeThe descriptor of the entity that is the type for this partdefault JavaType<?> default StringThe name of the fetchable.default JavaType<?> The Java type for this part.default intThe number of JDBC mappingsdefault EntityMappingTypeThe type for this part.Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.metamodel.mapping.CollectionPart
getCollectionAttribute, getInclusionCheckPart, getNature, getPartNameMethods inherited from interface org.hibernate.sql.results.graph.entity.EntityValuedFetchable
generateFetch, isOptional, isUnwrapProxyMethods inherited from interface org.hibernate.metamodel.mapping.EntityValuedModelPart
applySqlSelections, applySqlSelections, createDomainResult, disassemble, findSubPart, findSubPart, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachSubPart, visitSubPartsMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, getFetchableKey, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getFetchable, getKeyFetchable, getNumberOfFetchableKeys, getNumberOfFetchables, getNumberOfKeyFetchables, getSelectableIndex, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchablesMethods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, decompose, decompose, findContainingEntityMapping, getNavigableRole, hasPartitionedSelectionMapping, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPartMethods inherited from interface org.hibernate.metamodel.mapping.SelectableMappings
getSelectableMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachSelectable, forEachUpdatable, getContainingTableExpression, getSingleJdbcMappingMethods 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:FetchableThe name of the fetchable. This is the part's "local name".- Specified by:
getFetchableNamein interfaceFetchable- See Also:
-
getPartMappingType
Description copied from interface:ModelPartThe type for this part.- Specified by:
getPartMappingTypein interfaceModelPart
-
getEntityMappingType
Description copied from interface:EntityValuedModelPartThe descriptor of the entity that is the type for this part- Specified by:
getEntityMappingTypein interfaceEntityValuedModelPart
-
getJavaType
Description copied from interface:ModelPartThe Java type for this part. Generally equivalent toMappingType.getMappedJavaType()relative toModelPart.getPartMappingType()- Specified by:
getJavaTypein interfaceModelPart
-
getExpressibleJavaType
- Specified by:
getExpressibleJavaTypein interfaceJavaTypedExpressible- Specified by:
getExpressibleJavaTypein interfaceValueMapping
-
getJdbcTypeCount
default int getJdbcTypeCount()Description copied from interface:BindableThe number of JDBC mappings- Specified by:
getJdbcTypeCountin interfaceBindable- Specified by:
getJdbcTypeCountin interfaceEntityValuedModelPart- Specified by:
getJdbcTypeCountin interfaceJdbcMappingContainer- Specified by:
getJdbcTypeCountin interfaceSelectableMappings- Specified by:
getJdbcTypeCountin 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 isfalseor 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
NonTransientExceptionmarker to allow the creation process to stop immediately
-