Package org.hibernate.metamodel.internal
Class AbstractCompositeIdentifierMapping
java.lang.Object
org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping
- All Implemented Interfaces:
Bindable,CompositeIdentifierMapping,EmbeddableValuedModelPart,EntityIdentifierMapping,JdbcMappingContainer,MappingModelExpressible,ModelPart,ModelPartContainer,SelectableMappings,ValuedModelPart,ValueMapping,TableGroupJoinProducer,TableGroupProducer,EmbeddableValuedFetchable,Fetchable,FetchableContainer,FetchOptions,FetchStyleAccess,FetchTimingAccess,JavaTypedExpressible
- Direct Known Subclasses:
EmbeddedIdentifierMappingImpl,NonAggregatedIdentifierMappingImpl
public abstract class AbstractCompositeIdentifierMapping
extends Object
implements CompositeIdentifierMapping, EmbeddableValuedFetchable, FetchOptions
Base implementation for composite identifier mappings
-
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.EntityIdentifierMapping
EntityIdentifierMapping.NatureNested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Field Summary
FieldsFields inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
ID_ROLE_NAME, LEGACY_ID_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCompositeIdentifierMapping(EntityMappingType entityMapping, String tableExpression, MappingModelCreationProcess creationProcess) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsTableReference(String tableExpression) <T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) Create a DomainResult for a specific reference to this ModelPart.createRootTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType sqlAstJoinType, boolean fetched, @Nullable Consumer<Predicate> predicateConsumer, SqlAstCreationState creationState) Create the "join", but return a TableGroup.createTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType requestedJoinType, boolean fetched, boolean addsPredicate, SqlAstCreationState creationState) Create a TableGroupJoin.findSubPart(String name, EntityMappingType treatTargetType) <X,Y> int forEachJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) Visit each constituent JDBC value extracted from the entity instance itself.generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState) Generates a Fetch of this fetchableThe table which contains the columns mapped by this valueprotected EntityMappingTypeThe configured fetch timing and styleDescriptor for the type of this mappinggetStyle()booleanDoes the identifier have a corresponding EmbeddableId or IdClass?booleanInstantiate an instance of the identifier.toSqlExpression(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState) voidvisitSubParts(Consumer<ModelPart> consumer, EntityMappingType treatTargetType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.metamodel.mapping.CompositeIdentifierMapping
getFetchableKey, getMappedIdEmbeddableTypeDescriptor, getPartMappingType, getUnsavedStrategyMethods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable
getDefaultSqlAstJoinType, isSimpleJoinPredicateMethods inherited from interface org.hibernate.metamodel.mapping.EmbeddableValuedModelPart
addToCacheKey, breakDownJdbcValues, decompose, disassemble, forEachDisassembledJdbcValue, forEachInsertable, forEachJdbcType, forEachSelectable, forEachSubPart, forEachUpdatable, getFetchable, getJavaType, getJdbcMapping, getJdbcTypeCount, getNumberOfFetchables, getParentInjectionAttributePropertyAccess, getSelectable, getSelectableIndexMethods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getAttributeName, getIdentifier, getIdentifier, getIdentifierIfNotUnsaved, getNature, getPartName, isEntityIdentifierMapping, setIdentifierMethods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, getFetchableName, incrementFetchDepth, isSelectable, resolveCircularFetchMethods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchablesMethods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKeyMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPartMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
determineSqlJoinTypeMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
getSqlAliasStemMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachNonFormula, forEachSelectable, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Field Details
-
sessionFactory
-
-
Constructor Details
-
AbstractCompositeIdentifierMapping
public AbstractCompositeIdentifierMapping(EntityMappingType entityMapping, String tableExpression, MappingModelCreationProcess creationProcess) -
AbstractCompositeIdentifierMapping
-
-
Method Details
-
hasContainingClass
public boolean hasContainingClass()Description copied from interface:CompositeIdentifierMappingDoes the identifier have a corresponding EmbeddableId or IdClass?- Specified by:
hasContainingClassin interfaceCompositeIdentifierMapping- Returns:
- false if there is not an IdCass or an EmbeddableId
-
getMappedType
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceEmbeddableValuedModelPart- Specified by:
getMappedTypein interfaceValueMapping
-
getEmbeddableTypeDescriptor
- Specified by:
getEmbeddableTypeDescriptorin interfaceEmbeddableValuedModelPart
-
getContainingTableExpression
Description copied from interface:ValuedModelPartThe table which contains the columns mapped by this value- Specified by:
getContainingTableExpressionin interfaceValuedModelPart
-
findSubPart
- Specified by:
findSubPartin interfaceEmbeddableValuedModelPart- Specified by:
findSubPartin interfaceModelPartContainer
-
visitSubParts
- Specified by:
visitSubPartsin interfaceEmbeddableValuedModelPart- Specified by:
visitSubPartsin interfaceModelPartContainer
-
toSqlExpression
public SqlTuple toSqlExpression(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState) - Specified by:
toSqlExpressionin interfaceEmbeddableValuedModelPart
-
instantiate
Description copied from interface:EntityIdentifierMappingInstantiate an instance of the identifier.- Specified by:
instantiatein interfaceEntityIdentifierMapping
-
findContainingEntityMapping
- Specified by:
findContainingEntityMappingin interfaceModelPart
-
getMappedFetchOptions
Description copied from interface:FetchableThe configured fetch timing and style- Specified by:
getMappedFetchOptionsin interfaceFetchable
-
getStyle
- Specified by:
getStylein interfaceFetchStyleAccess
-
getTiming
- Specified by:
getTimingin interfaceFetchTimingAccess
-
getEntityMapping
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()- Specified by:
hasPartitionedSelectionMappingin interfaceEmbeddableValuedModelPart- Specified by:
hasPartitionedSelectionMappingin interfaceModelPart
-
containsTableReference
- Specified by:
containsTableReferencein interfaceTableGroupProducer
-