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
public interface EntityCollectionPart extends CollectionPart, EntityValuedFetchable
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 Modifier and Type Interface Description static classEntityCollectionPart.Cardinality-
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default 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.EntityMappingTypegetAssociatedEntityMappingType()EntityCollectionPart.CardinalitygetCardinality()default EntityMappingTypegetEntityMappingType()The descriptor of the entity that is the type for this partdefault JavaType<?>getExpressibleJavaType()default StringgetFetchableName()The name of the fetchable.default JavaType<?>getJavaType()The Java type for this part.default intgetJdbcTypeCount()The number of JDBC mappingsNotFoundActiongetNotFoundAction()default EntityMappingTypegetPartMappingType()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
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, getJdbcMappings, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getMappedType, treatAs
-
-
-
-
Method Detail
-
getCardinality
EntityCollectionPart.Cardinality getCardinality()
-
getNotFoundAction
NotFoundAction getNotFoundAction()
-
getAssociatedEntityMappingType
EntityMappingType getAssociatedEntityMappingType()
-
getFetchableName
default String getFetchableName()
Description copied from interface:FetchableThe name of the fetchable. This is the part's "local name".- Specified by:
getFetchableNamein interfaceFetchable- See Also:
ModelPart.getNavigableRole(),NavigableRole.getLocalName()
-
getPartMappingType
default EntityMappingType getPartMappingType()
Description copied from interface:ModelPartThe type for this part.- Specified by:
getPartMappingTypein interfaceModelPart
-
getEntityMappingType
default EntityMappingType getEntityMappingType()
Description copied from interface:EntityValuedModelPartThe descriptor of the entity that is the type for this part- Specified by:
getEntityMappingTypein interfaceEntityValuedModelPart
-
getJavaType
default JavaType<?> getJavaType()
Description copied from interface:ModelPartThe Java type for this part. Generally equivalent toMappingType.getMappedJavaType()relative toModelPart.getPartMappingType()- Specified by:
getJavaTypein interfaceModelPart
-
getExpressibleJavaType
default JavaType<?> 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
-
addToCacheKey
default void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session)
Description copied from interface:BindableAdd to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.- Specified by:
addToCacheKeyin interfaceBindable- Specified by:
addToCacheKeyin interfaceEntityValuedModelPart- Specified by:
addToCacheKeyin interfaceJavaTypedExpressible- Parameters:
cacheKey- the MutableCacheKey used to add the disassembled value and the hashCodevalue- the value to disassemblesession- the SharedSessionContractImplementor
-
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
-
-