Top Description Inners Methods
org.hibernate.metamodel.mapping.internal

public Interface EntityCollectionPart

extends CollectionPart, EntityValuedFetchable
Known Direct Implementers
org.hibernate.metamodel.mapping.internal.AbstractEntityCollectionPart
Imports
org.hibernate.Internal, org.hibernate.annotations.NotFoundAction, org.hibernate.cache.MutableCacheKeyBuilder, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.mapping.Collection, org.hibernate.metamodel.mapping.CollectionPart, .EntityMappingType, .NonTransientException, org.hibernate.persister.collection.CollectionPersister, org.hibernate.sql.results.graph.entity.EntityValuedFetchable, org.hibernate.type.descriptor.java.JavaType

An entity-valued collection-part.

API Note

This mapping does not include "ANY" mappings

Implementation Specification

Allows for 2-phase initialization via finishInitialization

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public default void
addToCacheKey(MutableCacheKeyBuilder
the MutableCacheKey used to add the disassembled value and the hashCode
cacheKey
,
Object
the value to disassemble
value
,
SharedSessionContractImplementor
the SharedSessionContractImplementor
session
)

Overrides default org.hibernate.metamodel.mapping.EntityValuedModelPart.addToCacheKey.

Implements org.hibernate.metamodel.mapping.Bindable.addToCacheKey, org.hibernate.type.descriptor.java.JavaTypedExpressible.addToCacheKey.

Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.
public boolean
finishInitialization(CollectionPersister collectionDescriptor, Collection bootValueMapping, String fkTargetModelPartName, MappingModelCreationProcess creationProcess)

Perform any delayed initialization.

public EntityMappingType
public EntityCollectionPart.Cardinality
public default EntityMappingType
getEntityMappingType()

Implements org.hibernate.metamodel.mapping.EntityValuedModelPart.getEntityMappingType.

The descriptor of the entity that is the type for this part
public default JavaType<?>
public default String
public default JavaType<?>
getJavaType()

Implements org.hibernate.metamodel.mapping.ModelPart.getJavaType.

The Java type for this part.
public default int
public NotFoundAction
public default EntityMappingType
Inherited from org.hibernate.metamodel.mapping.CollectionPart:
getInclusionCheckPartgetNaturegetPartName
Inherited from org.hibernate.sql.results.graph.entity.EntityValuedFetchable:
generateFetchisOptionalisUnwrapProxy

Method Detail

addToCacheKeyback to summary
public default void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session)

Overrides default org.hibernate.metamodel.mapping.EntityValuedModelPart.addToCacheKey.

Implements org.hibernate.metamodel.mapping.Bindable.addToCacheKey, org.hibernate.type.descriptor.java.JavaTypedExpressible.addToCacheKey.

Doc from org.hibernate.metamodel.mapping.Bindable.addToCacheKey.

Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.

Parameters
cacheKey:MutableCacheKeyBuilder

the MutableCacheKey used to add the disassembled value and the hashCode

value:Object

the value to disassemble

session:SharedSessionContractImplementor

the SharedSessionContractImplementor

Annotations
@Override
finishInitializationback to summary
public 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 is false 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

Annotations
@Internal
getAssociatedEntityMappingTypeback to summary
public EntityMappingType getAssociatedEntityMappingType()
getCardinalityback to summary
public EntityCollectionPart.Cardinality getCardinality()
getEntityMappingTypeback to summary
public default EntityMappingType getEntityMappingType()

Implements org.hibernate.metamodel.mapping.EntityValuedModelPart.getEntityMappingType.

Doc from org.hibernate.metamodel.mapping.EntityValuedModelPart.getEntityMappingType.

The descriptor of the entity that is the type for this part

Annotations
@Override
getExpressibleJavaTypeback to summary
public default JavaType<?> getExpressibleJavaType()

Overrides default org.hibernate.metamodel.mapping.ValueMapping.getExpressibleJavaType.

Implements org.hibernate.type.descriptor.java.JavaTypedExpressible.getExpressibleJavaType.

Annotations
@Override
getFetchableNameback to summary
public default String getFetchableName()

Implements org.hibernate.sql.results.graph.Fetchable.getFetchableName.

Doc from org.hibernate.sql.results.graph.Fetchable.getFetchableName.

The name of the fetchable. This is the part's "local name".

Annotations
@Override
getJavaTypeback to summary
public default JavaType<?> getJavaType()

Implements org.hibernate.metamodel.mapping.ModelPart.getJavaType.

Doc from org.hibernate.metamodel.mapping.ModelPart.getJavaType.

The Java type for this part. Generally equivalent to MappingType#getMappedJavaType() relative to getPartMappingType()

Annotations
@Override
getJdbcTypeCountback to summary
public default int getJdbcTypeCount()

Overrides default org.hibernate.metamodel.mapping.ValuedModelPart.getJdbcTypeCount, org.hibernate.metamodel.mapping.Bindable.getJdbcTypeCount, org.hibernate.metamodel.mapping.EntityValuedModelPart.getJdbcTypeCount.

Doc from org.hibernate.metamodel.mapping.SelectableMappings.getJdbcTypeCount.

The number of selectables

Annotations
@Override
getNotFoundActionback to summary
public NotFoundAction getNotFoundAction()
getPartMappingTypeback to summary
public default EntityMappingType getPartMappingType()

Implements org.hibernate.metamodel.mapping.ModelPart.getPartMappingType.

Doc from org.hibernate.metamodel.mapping.ModelPart.getPartMappingType.

The type for this part.

Annotations
@Override
org.hibernate.metamodel.mapping.internal back to summary

public final Enum EntityCollectionPart.Cardinality

extends Enum<EntityCollectionPart.Cardinality>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final EntityCollectionPart.Cardinality
public static final EntityCollectionPart.Cardinality

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static EntityCollectionPart.Cardinality
public static EntityCollectionPart.Cardinality[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

MANY_TO_MANYback to summary
public static final EntityCollectionPart.Cardinality MANY_TO_MANY
ONE_TO_MANYback to summary
public static final EntityCollectionPart.Cardinality ONE_TO_MANY

Constructor Detail

Cardinalityback to summary
private Cardinality()

Method Detail

valueOfback to summary
public static EntityCollectionPart.Cardinality valueOf(String name)
valuesback to summary
public static EntityCollectionPart.Cardinality[] values()