Package org.hibernate.query.derived
Class AnonymousTupleEmbeddedEntityIdentifierMapping
java.lang.Object
org.hibernate.query.derived.AnonymousTupleEmbeddableValuedModelPart
org.hibernate.query.derived.AnonymousTupleEmbeddedEntityIdentifierMapping
- All Implemented Interfaces:
AttributeMapping
,AttributeMetadata
,Bindable
,CompositeIdentifierMapping
,EmbeddableMappingType
,EmbeddableValuedModelPart
,EntityIdentifierMapping
,SingleAttributeIdentifierMapping
,JdbcMappingContainer
,ManagedMappingType
,MappingModelExpressible
,MappingType
,ModelPart
,ModelPartContainer
,OwnedValuedModelPart
,PropertyBasedMapping
,SelectableMappings
,ValuedModelPart
,ValueMapping
,TableGroupJoinProducer
,TableGroupProducer
,DatabaseSnapshotContributor
,Fetchable
,FetchableContainer
,JavaTypedExpressible
,MutabilityPlanExposer
@Incubating
public class AnonymousTupleEmbeddedEntityIdentifierMapping
extends AnonymousTupleEmbeddableValuedModelPart
implements CompositeIdentifierMapping, SingleAttributeIdentifierMapping
-
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.EmbeddableMappingType
EmbeddableMappingType.ConcreteEmbeddableType
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
ConstructorDescriptionAnonymousTupleEmbeddedEntityIdentifierMapping
(SqmExpressible<?> sqmExpressible, List<SqlSelection> sqlSelections, int selectionIndex, String selectionExpression, Set<String> compatibleTableExpressions, Set<Attribute<?, ?>> attributes, DomainType<?> domainType, CompositeIdentifierMapping delegate) -
Method Summary
Modifier and TypeMethodDescriptionint
The name of the attribute defining the id, if onegetIdentifier
(Object entity) Extract the identifier from an instance of the entityReturns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.Descriptor for the type of this mappingThe type for this part.Access to the identifier attribute's PropertyAccessThe strategy for distinguishing between detached and transient state based on the identifier mappingboolean
Does the identifier have a corresponding EmbeddableId or IdClass?Instantiate an instance of the identifier.void
setIdentifier
(Object entity, Object id, SharedSessionContractImplementor session) Inject an identifier value into an instance of the entityMethods inherited from class org.hibernate.query.derived.AnonymousTupleEmbeddableValuedModelPart
addToCacheKey, applySqlSelections, applySqlSelections, breakDownJdbcValues, createDomainResult, createInverseMappingType, createRootTableGroupJoin, createTableGroupJoin, decompose, disassemble, findContainingEntityMapping, findSubPart, forEachAttributeMapping, forEachDisassembledJdbcValue, forEachInsertable, forEachJdbcType, forEachJdbcValue, forEachSelectable, forEachSelectable, forEachSubPart, forEachUpdatable, generateFetch, getAttributeMapping, getAttributeMappings, getContainingTableExpression, getDefaultSqlAstJoinType, getEmbeddableTypeDescriptor, getEmbeddedValueMapping, getFetchable, getFetchableKey, getFetchableName, getJavaType, getJdbcMapping, getJdbcTypeCount, getMappedFetchOptions, getMappedJavaType, getNavigableRole, getNumberOfAttributeMappings, getNumberOfFetchables, getPartName, getRepresentationStrategy, getSelectable, getSelectableIndex, getSqlAliasStem, getValue, getValues, hasPartitionedSelectionMapping, isCreateEmptyCompositesEnabled, isSimpleJoinPredicate, setValue, setValues, toSqlExpression, visitSubParts
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.AttributeMapping
asAttributeMapping, asEmbeddedAttributeMapping, asPluralAttributeMapping, findContainingEntityMapping, getExposedMutabilityPlan, getValue, isEmbeddedAttributeMapping, isPluralAttributeMapping, setValue
Methods inherited from interface org.hibernate.metamodel.mapping.AttributeMetadata
getCascadeStyle
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
Methods inherited from interface org.hibernate.sql.results.graph.DatabaseSnapshotContributor
createSnapshotDomainResult
Methods inherited from interface org.hibernate.metamodel.mapping.EmbeddableMappingType
anyRequiresAggregateColumnWriter, findSubtypeByDiscriminator, findSubtypeBySubclass, getAggregateMapping, getConcreteEmbeddableTypes, getDiscriminatorMapping, getJdbcValueCount, getJdbcValueSelectable, isPolymorphic, requiresAggregateColumnWriter, shouldBindAggregateMapping, shouldMutateAggregateMapping, shouldSelectAggregateMapping
Methods inherited from interface org.hibernate.metamodel.mapping.EmbeddableValuedModelPart
addToCacheKey, breakDownJdbcValues, decompose, disassemble, findSubPart, forEachDisassembledJdbcValue, forEachInsertable, forEachJdbcType, forEachJdbcValue, forEachSelectable, forEachSubPart, forEachUpdatable, getEmbeddableTypeDescriptor, getFetchable, getJavaType, getJdbcMapping, getJdbcTypeCount, getNumberOfFetchables, getParentInjectionAttributePropertyAccess, getSelectable, getSelectableIndex, hasPartitionedSelectionMapping, toSqlExpression, visitSubParts
Methods inherited from interface org.hibernate.metamodel.mapping.EntityIdentifierMapping
getIdentifierIfNotUnsaved, isEntityIdentifierMapping
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
generateFetch, getFetchableName, getMappedFetchOptions, incrementFetchDepth, 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.ManagedMappingType
findAttributeMapping, forEachAttributeMapping, isAffectedByEnabledFilters
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, getNavigableRole, isVirtual
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
Methods inherited from interface org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping
getAttributeMetadata, getDeclaringType, getGenerator, getMutabilityPlan, getPartName, getStateArrayPosition, isIncludedInDirtyChecking, isIncludedInOptimisticLocking, isInsertable, isNullable, isSelectable, isUpdatable
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
createRootTableGroupJoin, createTableGroupJoin, determineSqlJoinType, getDefaultSqlAstJoinType, isSimpleJoinPredicate
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference, getSqlAliasStem
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachNonFormula, forEachSelectable, getContainingTableExpression, getSingleJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Constructor Details
-
AnonymousTupleEmbeddedEntityIdentifierMapping
public AnonymousTupleEmbeddedEntityIdentifierMapping(SqmExpressible<?> sqmExpressible, List<SqlSelection> sqlSelections, int selectionIndex, String selectionExpression, Set<String> compatibleTableExpressions, Set<Attribute<?, ?>> attributes, DomainType<?> domainType, CompositeIdentifierMapping delegate)
-
-
Method Details
-
getNature
- Specified by:
getNature
in interfaceEntityIdentifierMapping
- See Also:
-
getUnsavedStrategy
Description copied from interface:EntityIdentifierMapping
The strategy for distinguishing between detached and transient state based on the identifier mapping- Specified by:
getUnsavedStrategy
in interfaceCompositeIdentifierMapping
- Specified by:
getUnsavedStrategy
in interfaceEntityIdentifierMapping
- See Also:
-
getIdentifier
Description copied from interface:EntityIdentifierMapping
Extract the identifier from an instance of the entity- Specified by:
getIdentifier
in interfaceEntityIdentifierMapping
-
instantiate
Description copied from interface:EntityIdentifierMapping
Instantiate an instance of the identifier.- Specified by:
instantiate
in interfaceEntityIdentifierMapping
-
getPropertyAccess
Description copied from interface:SingleAttributeIdentifierMapping
Access to the identifier attribute's PropertyAccess- Specified by:
getPropertyAccess
in interfaceAttributeMapping
- Specified by:
getPropertyAccess
in interfaceAttributeMetadata
- Specified by:
getPropertyAccess
in interfacePropertyBasedMapping
- Specified by:
getPropertyAccess
in interfaceSingleAttributeIdentifierMapping
-
getPartMappingType
Description copied from interface:ModelPart
The type for this part.- Specified by:
getPartMappingType
in interfaceCompositeIdentifierMapping
- Specified by:
getPartMappingType
in interfaceEmbeddableMappingType
- Specified by:
getPartMappingType
in interfaceManagedMappingType
- Specified by:
getPartMappingType
in interfaceModelPart
-
compare
- Specified by:
compare
in interfaceAttributeMapping
- Specified by:
compare
in interfaceEmbeddableMappingType
-
getAttributeName
Description copied from interface:EntityIdentifierMapping
The name of the attribute defining the id, if one- Specified by:
getAttributeName
in interfaceAttributeMapping
- Specified by:
getAttributeName
in interfaceEntityIdentifierMapping
- Specified by:
getAttributeName
in interfaceSingleAttributeIdentifierMapping
-
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
-
getMappedIdEmbeddableTypeDescriptor
Description copied from interface:CompositeIdentifierMapping
Returns the embeddable type descriptor of the id-class, if there is one, otherwise the one of the virtual embeddable mapping type.- Specified by:
getMappedIdEmbeddableTypeDescriptor
in interfaceCompositeIdentifierMapping
-
getMappedType
Description copied from interface:ValueMapping
Descriptor for the type of this mapping- Specified by:
getMappedType
in interfaceEmbeddableValuedModelPart
- Specified by:
getMappedType
in interfaceValueMapping
-