Class AnonymousTupleEntityValuedModelPart
java.lang.Object
org.hibernate.query.sqm.tuple.internal.AnonymousTupleEntityValuedModelPart
- All Implemented Interfaces:
Loadable,Bindable,Discriminable,EntityMappingType,EntityValuedModelPart,FilterRestrictable,JdbcMappingContainer,ManagedMappingType,MappingModelExpressible,MappingType,ModelPart,ModelPartContainer,Restrictable,SelectableMappings,SoftDeletableModelPart,ValuedModelPart,ValueMapping,WhereRestrictable,LazyTableGroup.ParentTableGroupUseChecker,RootTableGroupProducer,TableGroupJoinProducer,TableGroupProducer,FetchableContainer,JavaTypedExpressible
@Incubating
public class AnonymousTupleEntityValuedModelPart
extends Object
implements EntityValuedModelPart, EntityMappingType, TableGroupJoinProducer, ValuedModelPart, LazyTableGroup.ParentTableGroupUseChecker
-
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.EntityMappingType
EntityMappingType.ConstraintOrderedTableConsumerNested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer -
Constructor Summary
ConstructorsConstructorDescriptionAnonymousTupleEntityValuedModelPart(EntityIdentifierMapping identifierMapping, DomainType<?> domainType, EntityValuedModelPart delegate, int fetchableIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.voidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.voidapplySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) Apply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.<X,Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X, Y> valueConsumer, SharedSessionContractImplementor session) Breaks down the domain value to its constituent JDBC values.booleancanUseParentTableGroup(TableGroupProducer producer, NavigablePath navigablePath, ValuedModelPart valuedModelPart) booleancontainsTableReference(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.createTableGroupInternal(boolean canUseInnerJoins, NavigablePath navigablePath, boolean fetched, String sourceAlias, SqlAliasBase sqlAliasBase, SqlAstCreationState creationState) createTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType requestedJoinType, boolean fetched, boolean addsPredicate, SqlAstCreationState creationState) Create a TableGroupJoin.disassemble(Object value, SharedSessionContractImplementor session) Breaks down a value ofJinto its simple pieces.Find an attribute-mapping, declared on this entity mapping (not super or subs), by namefindSubPart(String name, EntityMappingType treatTargetType) voidforEachAttributeMapping(Consumer<? super AttributeMapping> action) Visit each attribute mapping<X,Y> int forEachDisassembledJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) LikeBindable.forEachDisassembledJdbcValue(Object, Object, Object, JdbcValuesBiConsumer, SharedSessionContractImplementor), but additionally receives an offset by which the selectionIndex is incremented when callingBindable.JdbcValuesBiConsumer.consume(int, Object, Object, Object, JdbcMapping).intforEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action) Visit each JdbcMapping starting from the given offset<X,Y> int forEachJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> consumer, SharedSessionContractImplementor session) Visit each constituent JDBC value extracted from the entity instance itself.intforEachSelectable(int offset, SelectableConsumer consumer) Visits each selectable mapping with the selectable index offset by the given value.intforEachSelectable(SelectableConsumer consumer) A short hand form ofModelPart.forEachSelectable(int, SelectableConsumer), that passes 0 as offset.getAttributeMapping(int position) Retrieve an attribute mapping by position, relative to all attributesThe attributes mapping for this entity, including those declared on supertype mappingsintThe table which contains the columns mapped by this valueGet access to the attributes defined on this class - do not access attributes defined on the supergetDefaultSqlAstJoinType(TableGroup parentTableGroup) Mapping details for the entity's discriminator.The discriminator value which indicates this entity mappingThe descriptor of the entity that is the type for this partThe entity name.Safety-net.Mapping details for the entity's identifier.Details for the table that defines the identifier column(s) for an entity hierarchy.JavaType<?> The Java type for this part.getJdbcMapping(int index) intThe number of JDBC mappingsJavaType<?> The descriptor descriptor for the mapped Java typeDetails for the table this entity maps.Descriptor for the type of this mappingAccess to performing multi-value natural-id database selection.Access to performing natural-id database selection.The mapping for the natural-id of the entity, if one is definedintThe total number of attributes for this entity, including those declared on supertype mappingsintThe number of fetchables in the containerThe type for this part.The local part name, which is generally the unqualified role nameThe mapping for the row-id of the entity, if one is defined.getSelectable(int columnIndex) Get the selectable at the given positionMapping for soft-delete support, ornullif soft-delete not definedDetails about the table which holds the soft-delete column.Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedExtract a specific attribute value from the entity instance, by positionObject[]Extract the individual attribute values from the entity instanceMapping details for the entity's version when using the version strategy.booleanisAffectedByEnabledFilters(LoadQueryInfluencers influencers, boolean onlyApplyForLoadByKeyFilters) Whether any of the "influencers" affect this loadable.booleanisAffectedByInfluencers(LoadQueryInfluencers influencers) booleanIs this class explicit polymorphism only?booleanisNotAffectedByInfluencers(LoadQueryInfluencers influencers) booleanisSimpleJoinPredicate(Predicate predicate) Returns whether the given predicate is a simple join predicate for this attribute.loadByUniqueKey(String propertyName, Object uniqueKey, SharedSessionContractImplementor session) Load an instance of the persistent class, by a unique key other than the primary key.The type of optimistic locking, if any, defined for this entity mappingvoidInject a specific attribute value into the entity instance, by positionvoidInject the attribute values into the entity instancevoidvoidvisitDeclaredAttributeMappings(Consumer<? super AttributeMapping> action) Visit attributes defined on this class - do not visit attributes defined on the supervoidvisitQuerySpaces(Consumer<String> querySpaceConsumer) Visit each "query space" for the mapped entity.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.EntityMappingType
applyBaseRestrictions, applyDiscriminator, applyFilterRestrictions, applyWhereRestrictions, asEntityMappingType, createPrimaryTableReference, createRootTableGroup, createTableReferenceJoin, extractConcreteTypeStateValues, findSubPart, findSubTypesSubPart, getContributor, getFetchable, getIdentifierMappingForJoin, getImportedName, getMappedSuperclass, getNumberOfDeclaredAttributeMappings, getRepresentationStrategy, getRootEntityDescriptor, getRootPathName, getSqmMultiTableInsertStrategy, getSqmMultiTableMutationStrategy, getSubclassEntityNames, getSubclassId, getSubMappingTypes, getSuperMappingType, hasSubclasses, hasWhereRestrictions, isAbstract, isAffectedByEnabledFetchProfiles, isAffectedByEntityGraph, isConcreteProxy, isTypeOrSuperType, isTypeOrSuperType, pruneForSubclasses, resolveConcreteProxyTypeForId, visitAttributeMappings, visitSubTypeAttributeMappings, visitSuperTypeAttributeMappingsMethods inherited from interface org.hibernate.metamodel.mapping.EntityValuedModelPart
forEachSubPartMethods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, getSelectableIndex, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchablesMethods inherited from interface org.hibernate.metamodel.mapping.FilterRestrictable
applyFilterRestrictionsMethods inherited from interface org.hibernate.loader.ast.spi.Loadable
isAffectedByEnabledFilters, isAffectedByInfluencersMethods inherited from interface org.hibernate.metamodel.mapping.ManagedMappingType
anyRequiresAggregateColumnWriter, findAttributeMapping, forEachAttributeMapping, hasPartitionedSelectionMapping, isAffectedByEnabledFiltersMethods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, breakDownJdbcValues, decompose, decompose, isEntityIdentifierMapping, isVirtualMethods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPartMethods inherited from interface org.hibernate.metamodel.mapping.Restrictable
applyBaseRestrictionsMethods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupJoinProducer
determineSqlJoinTypeMethods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachUpdatableMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Constructor Details
-
AnonymousTupleEntityValuedModelPart
public AnonymousTupleEntityValuedModelPart(EntityIdentifierMapping identifierMapping, DomainType<?> domainType, EntityValuedModelPart delegate, int fetchableIndex)
-
-
Method Details
-
getForeignKeyPart
-
findSubPart
- Specified by:
findSubPartin interfaceEntityValuedModelPart- Specified by:
findSubPartin interfaceModelPartContainer
-
visitSubParts
- Specified by:
visitSubPartsin interfaceEntityValuedModelPart- Specified by:
visitSubPartsin interfaceModelPartContainer
-
getPartMappingType
Description copied from interface:ModelPartThe type for this part.- Specified by:
getPartMappingTypein interfaceEntityMappingType- Specified by:
getPartMappingTypein interfaceManagedMappingType- Specified by:
getPartMappingTypein interfaceModelPart
-
getMappedType
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping
-
getJavaType
Description copied from interface:ModelPartThe Java type for this part. Generally equivalent toMappingType.getMappedJavaType()relative toModelPart.getPartMappingType()- Specified by:
getJavaTypein interfaceEntityMappingType- Specified by:
getJavaTypein interfaceManagedMappingType- Specified by:
getJavaTypein interfaceModelPart
-
getPartName
Description copied from interface:ModelPartThe local part name, which is generally the unqualified role name- Specified by:
getPartNamein interfaceEntityMappingType- Specified by:
getPartNamein interfaceModelPart
-
getContainingTableExpression
Description copied from interface:ValuedModelPartThe table which contains the columns mapped by this value- Specified by:
getContainingTableExpressionin interfaceValuedModelPart
-
getJdbcTypeCount
public int getJdbcTypeCount()Description copied from interface:BindableThe number of JDBC mappings- Specified by:
getJdbcTypeCountin interfaceBindable- Specified by:
getJdbcTypeCountin interfaceEntityMappingType- Specified by:
getJdbcTypeCountin interfaceEntityValuedModelPart- Specified by:
getJdbcTypeCountin interfaceJdbcMappingContainer- Specified by:
getJdbcTypeCountin interfaceSelectableMappings- Specified by:
getJdbcTypeCountin interfaceValuedModelPart
-
getNumberOfAttributeMappings
public int getNumberOfAttributeMappings()Description copied from interface:EntityMappingTypeThe total number of attributes for this entity, including those declared on supertype mappings- Specified by:
getNumberOfAttributeMappingsin interfaceEntityMappingType- Specified by:
getNumberOfAttributeMappingsin interfaceManagedMappingType
-
getAttributeMapping
Description copied from interface:EntityMappingTypeRetrieve an attribute mapping by position, relative to all attributes- Specified by:
getAttributeMappingin interfaceEntityMappingType- Specified by:
getAttributeMappingin interfaceManagedMappingType
-
getAttributeMappings
Description copied from interface:EntityMappingTypeThe attributes mapping for this entity, including those declared on supertype mappings- Specified by:
getAttributeMappingsin interfaceEntityMappingType- Specified by:
getAttributeMappingsin interfaceManagedMappingType
-
forEachAttributeMapping
Description copied from interface:EntityMappingTypeVisit each attribute mapping- Specified by:
forEachAttributeMappingin interfaceEntityMappingType- Specified by:
forEachAttributeMappingin interfaceManagedMappingType- See Also:
-
getValues
Description copied from interface:ManagedMappingTypeExtract the individual attribute values from the entity instance- Specified by:
getValuesin interfaceManagedMappingType
-
getValue
Description copied from interface:ManagedMappingTypeExtract a specific attribute value from the entity instance, by position- Specified by:
getValuein interfaceManagedMappingType
-
setValues
Description copied from interface:ManagedMappingTypeInject the attribute values into the entity instance- Specified by:
setValuesin interfaceManagedMappingType
-
setValue
Description copied from interface:ManagedMappingTypeInject a specific attribute value into the entity instance, by position- Specified by:
setValuein interfaceManagedMappingType
-
getJdbcMapping
- Specified by:
getJdbcMappingin interfaceJdbcMappingContainer
-
getSingleJdbcMapping
- Specified by:
getSingleJdbcMappingin interfaceJdbcMappingContainer- Specified by:
getSingleJdbcMappingin interfaceValuedModelPart
-
forEachSelectable
Description copied from interface:ModelPartA short hand form ofModelPart.forEachSelectable(int, SelectableConsumer), that passes 0 as offset.- Specified by:
forEachSelectablein interfaceModelPart- Specified by:
forEachSelectablein interfaceSelectableMappings- Specified by:
forEachSelectablein interfaceValuedModelPart
-
forEachSelectable
Description copied from interface:ModelPartVisits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.- Specified by:
forEachSelectablein interfaceModelPart- Specified by:
forEachSelectablein interfaceSelectableMappings- Specified by:
forEachSelectablein interfaceValuedModelPart- See Also:
-
getSelectable
Description copied from interface:SelectableMappingsGet the selectable at the given position- Specified by:
getSelectablein interfaceSelectableMappings
-
getMappedJavaType
Description copied from interface:MappingTypeThe descriptor descriptor for the mapped Java type- Specified by:
getMappedJavaTypein interfaceEntityMappingType- Specified by:
getMappedJavaTypein interfaceMappingType
-
getSqlAliasStem
Description copied from interface:TableGroupProducerGet the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedNote that this is a metadata-ive value. It is only ever used internal to the producer producing its TableGroup.
- Specified by:
getSqlAliasStemin interfaceEntityMappingType- Specified by:
getSqlAliasStemin interfaceTableGroupProducer- See Also:
-
getNumberOfFetchables
public int getNumberOfFetchables()Description copied from interface:FetchableContainerThe number of fetchables in the container- Specified by:
getNumberOfFetchablesin interfaceEntityMappingType- Specified by:
getNumberOfFetchablesin interfaceFetchableContainer
-
findContainingEntityMapping
- Specified by:
findContainingEntityMappingin interfaceEntityMappingType- Specified by:
findContainingEntityMappingin interfaceModelPart
-
isExplicitPolymorphism
public boolean isExplicitPolymorphism()Description copied from interface:EntityMappingTypeIs this class explicit polymorphism only?- Specified by:
isExplicitPolymorphismin interfaceEntityMappingType
-
forEachJdbcType
Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceEntityValuedModelPart- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
getEntityPersister
Description copied from interface:EntityMappingTypeSafety-net.- Specified by:
getEntityPersisterin interfaceEntityMappingType
-
getEntityName
Description copied from interface:EntityMappingTypeThe entity name. For most entities, this will be the fully-qualified name of the entity class. The alternative is an explicit entity-name which takes precedence if provided- Specified by:
getEntityNamein interfaceEntityMappingType
-
getMappedTableDetails
Description copied from interface:EntityMappingTypeDetails for the table this entity maps. Generally this is the same asEntityMappingType.getIdentifierTableDetails(), though may be different for subtypes in joined andunion inheritance hierarchies- Specified by:
getMappedTableDetailsin interfaceEntityMappingType- See Also:
-
getIdentifierTableDetails
Description copied from interface:EntityMappingTypeDetails for the table that defines the identifier column(s) for an entity hierarchy.- Specified by:
getIdentifierTableDetailsin interfaceEntityMappingType
-
visitQuerySpaces
Description copied from interface:EntityMappingTypeVisit each "query space" for the mapped entity.- Specified by:
visitQuerySpacesin interfaceEntityMappingType
-
findDeclaredAttributeMapping
Description copied from interface:EntityMappingTypeFind an attribute-mapping, declared on this entity mapping (not super or subs), by name- Specified by:
findDeclaredAttributeMappingin interfaceEntityMappingType
-
getDeclaredAttributeMappings
Description copied from interface:EntityMappingTypeGet access to the attributes defined on this class - do not access attributes defined on the super- Specified by:
getDeclaredAttributeMappingsin interfaceEntityMappingType
-
visitDeclaredAttributeMappings
Description copied from interface:EntityMappingTypeVisit attributes defined on this class - do not visit attributes defined on the super- Specified by:
visitDeclaredAttributeMappingsin interfaceEntityMappingType
-
getIdentifierMapping
Description copied from interface:EntityMappingTypeMapping details for the entity's identifier. This is shared across all entity mappings within an inheritance hierarchy.- Specified by:
getIdentifierMappingin interfaceEntityMappingType
-
getDiscriminatorMapping
Description copied from interface:EntityMappingTypeMapping details for the entity's discriminator. This is shared across all entity mappings within an inheritance hierarchy.- Specified by:
getDiscriminatorMappingin interfaceDiscriminable- Specified by:
getDiscriminatorMappingin interfaceEntityMappingType
-
getDiscriminatorValue
Description copied from interface:EntityMappingTypeThe discriminator value which indicates this entity mapping- Specified by:
getDiscriminatorValuein interfaceEntityMappingType
-
getDiscriminatorSQLValue
- Specified by:
getDiscriminatorSQLValuein interfaceEntityMappingType
-
getVersionMapping
Description copied from interface:EntityMappingTypeMapping details for the entity's version when using the version strategy. This is shared across all entity mappings within an inheritance hierarchy.- Specified by:
getVersionMappingin interfaceEntityMappingType- Returns:
- The version mapping, or null if the entity is (1) defined
with a strategy other than
OptimisticLockStyle.VERSIONor (2) defined without optimistic locking - See Also:
-
optimisticLockStyle
Description copied from interface:EntityMappingTypeThe type of optimistic locking, if any, defined for this entity mapping- Specified by:
optimisticLockStylein interfaceEntityMappingType
-
getNaturalIdMapping
Description copied from interface:EntityMappingTypeThe mapping for the natural-id of the entity, if one is defined- Specified by:
getNaturalIdMappingin interfaceEntityMappingType
-
getRowIdMapping
Description copied from interface:EntityMappingTypeThe mapping for the row-id of the entity, if one is defined.- Specified by:
getRowIdMappingin interfaceEntityMappingType
-
getSoftDeleteMapping
Description copied from interface:EntityMappingTypeMapping for soft-delete support, ornullif soft-delete not defined- Specified by:
getSoftDeleteMappingin interfaceEntityMappingType- Specified by:
getSoftDeleteMappingin interfaceSoftDeletableModelPart
-
getSoftDeleteTableDetails
Description copied from interface:SoftDeletableModelPartDetails about the table which holds the soft-delete column.- Specified by:
getSoftDeleteTableDetailsin interfaceEntityMappingType- Specified by:
getSoftDeleteTableDetailsin interfaceSoftDeletableModelPart
-
visitConstraintOrderedTables
- Specified by:
visitConstraintOrderedTablesin interfaceEntityMappingType
-
getNaturalIdLoader
Description copied from interface:EntityMappingTypeAccess to performing natural-id database selection. This is per-entity in the hierarchy- Specified by:
getNaturalIdLoaderin interfaceEntityMappingType
-
getMultiNaturalIdLoader
Description copied from interface:EntityMappingTypeAccess to performing multi-value natural-id database selection. This is per-entity in the hierarchy- Specified by:
getMultiNaturalIdLoaderin interfaceEntityMappingType
-
getEntityMappingType
Description copied from interface:EntityValuedModelPartThe descriptor of the entity that is the type for this part- Specified by:
getEntityMappingTypein interfaceEntityValuedModelPart
-
getDefaultSqlAstJoinType
- Specified by:
getDefaultSqlAstJoinTypein interfaceTableGroupJoinProducer
-
isSimpleJoinPredicate
Description copied from interface:TableGroupJoinProducerReturns whether the given predicate is a simple join predicate for this attribute. This is useful to understand if a predicate has additional conjunctions other than the FK related predicate.- Specified by:
isSimpleJoinPredicatein interfaceTableGroupJoinProducer
-
containsTableReference
- Specified by:
containsTableReferencein interfaceTableGroupProducer
-
getBatchSize
public int getBatchSize()- Specified by:
getBatchSizein interfaceLoadable
-
isAffectedByInfluencers
- Specified by:
isAffectedByInfluencersin interfaceLoadable
-
isAffectedByEnabledFilters
public boolean isAffectedByEnabledFilters(LoadQueryInfluencers influencers, boolean onlyApplyForLoadByKeyFilters) Description copied from interface:LoadableWhether any of the "influencers" affect this loadable.- Specified by:
isAffectedByEnabledFiltersin interfaceEntityMappingType- Specified by:
isAffectedByEnabledFiltersin interfaceLoadable
-
isNotAffectedByInfluencers
- Specified by:
isNotAffectedByInfluencersin interfaceLoadable
-