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 class
EntityCollectionPart.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 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.EntityMappingType
getAssociatedEntityMappingType()
EntityCollectionPart.Cardinality
getCardinality()
default EntityMappingType
getEntityMappingType()
The descriptor of the entity that is the type for this partdefault JavaType<?>
getExpressibleJavaType()
default String
getFetchableName()
The name of the fetchable.default JavaType<?>
getJavaType()
The Java type for this part.default int
getJdbcTypeCount()
The number of JDBC mappingsNotFoundAction
getNotFoundAction()
default EntityMappingType
getPartMappingType()
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:Fetchable
The name of the fetchable. This is the part's "local name".- Specified by:
getFetchableName
in interfaceFetchable
- See Also:
ModelPart.getNavigableRole()
,NavigableRole.getLocalName()
-
getPartMappingType
default EntityMappingType getPartMappingType()
Description copied from interface:ModelPart
The type for this part.- Specified by:
getPartMappingType
in interfaceModelPart
-
getEntityMappingType
default EntityMappingType getEntityMappingType()
Description copied from interface:EntityValuedModelPart
The descriptor of the entity that is the type for this part- Specified by:
getEntityMappingType
in interfaceEntityValuedModelPart
-
getJavaType
default JavaType<?> 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
default JavaType<?> 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
-
addToCacheKey
default void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session)
Description copied from interface:Bindable
Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.- Specified by:
addToCacheKey
in interfaceBindable
- Specified by:
addToCacheKey
in interfaceEntityValuedModelPart
- Specified by:
addToCacheKey
in 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 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
-
-