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.Nature
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,
Y>, ModelPart.JdbcValueConsumer -
Field Summary
Fields inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
ID_ROLE_NAME, LEGACY_ID_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCompositeIdentifierMapping
(EntityMappingType entityMapping, String tableExpression, MappingModelCreationProcess creationProcess) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsTableReference
(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, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, SqlAstJoinType sqlAstJoinType, boolean fetched, Consumer<Predicate> predicateConsumer, SqlAstCreationState creationState) Create the "join", but return a TableGroup.createTableGroupJoin
(NavigablePath navigablePath, TableGroup lhs, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, 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 EntityMappingType
The configured fetch timing and styleDescriptor for the type of this mappinggetStyle()
boolean
Does the identifier have a corresponding EmbeddableId or IdClass?boolean
Instantiate an instance of the identifier.toSqlExpression
(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState) void
visitSubParts
(Consumer<ModelPart> consumer, EntityMappingType treatTargetType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
Methods inherited from interface org.hibernate.metamodel.mapping.CompositeIdentifierMapping
getFetchableKey, getMappedIdEmbeddableTypeDescriptor, getPartMappingType, getUnsavedStrategy
Methods inherited from interface org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable
getDefaultSqlAstJoinType, isSimpleJoinPredicate
Methods 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, getSelectableIndex
Methods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getAttributeName, getIdentifier, getIdentifierIfNotUnsaved, getNature, getPartName, isEntityIdentifierMapping, setIdentifier
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, getFetchableName, incrementFetchDepth, isSelectable, resolveCircularFetch
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchables
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKey
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, isVirtual
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
determineSqlJoinType
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
getSqlAliasStem
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachNonFormula, forEachSelectable, getSingleJdbcMapping
Methods 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:CompositeIdentifierMapping
Does the identifier have a corresponding EmbeddableId or IdClass?- Specified by:
hasContainingClass
in interfaceCompositeIdentifierMapping
- Returns:
- false if there is not an IdCass or an EmbeddableId
-
getMappedType
Description copied from interface:ValueMapping
Descriptor for the type of this mapping- Specified by:
getMappedType
in interfaceEmbeddableValuedModelPart
- Specified by:
getMappedType
in interfaceValueMapping
-
getEmbeddableTypeDescriptor
- Specified by:
getEmbeddableTypeDescriptor
in interfaceEmbeddableValuedModelPart
-
getContainingTableExpression
Description copied from interface:ValuedModelPart
The table which contains the columns mapped by this value- Specified by:
getContainingTableExpression
in interfaceValuedModelPart
-
findSubPart
- Specified by:
findSubPart
in interfaceEmbeddableValuedModelPart
- Specified by:
findSubPart
in interfaceModelPartContainer
-
visitSubParts
- Specified by:
visitSubParts
in interfaceEmbeddableValuedModelPart
- Specified by:
visitSubParts
in interfaceModelPartContainer
-
toSqlExpression
public SqlTuple toSqlExpression(TableGroup tableGroup, Clause clause, SqmToSqlAstConverter walker, SqlAstCreationState sqlAstCreationState) - Specified by:
toSqlExpression
in interfaceEmbeddableValuedModelPart
-
instantiate
Description copied from interface:EntityIdentifierMapping
Instantiate an instance of the identifier.- Specified by:
instantiate
in interfaceEntityIdentifierMapping
-
findContainingEntityMapping
- Specified by:
findContainingEntityMapping
in interfaceModelPart
-
getMappedFetchOptions
Description copied from interface:Fetchable
The configured fetch timing and style- Specified by:
getMappedFetchOptions
in interfaceFetchable
-
getStyle
- Specified by:
getStyle
in interfaceFetchStyleAccess
-
getTiming
- Specified by:
getTiming
in interfaceFetchTimingAccess
-
getEntityMapping
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()- Specified by:
hasPartitionedSelectionMapping
in interfaceEmbeddableValuedModelPart
- Specified by:
hasPartitionedSelectionMapping
in interfaceModelPart
-
containsTableReference
- Specified by:
containsTableReference
in interfaceTableGroupProducer
-