Package org.hibernate.metamodel.mapping
Interface EntityMappingType
-
- All Superinterfaces:
Bindable
,Discriminable
,EntityValuedModelPart
,FetchableContainer
,FilterRestrictable
,JdbcMappingContainer
,Loadable
,ManagedMappingType
,MappingModelExpressible
,MappingType
,ModelPart
,ModelPartContainer
,Restrictable
,RootTableGroupProducer
,SoftDeletableModelPart
,TableGroupProducer
,WhereRestrictable
- All Known Subinterfaces:
DeprecatedEntityStuff
,EntityPersister
,InFlightEntityMappingType
,Loadable
,Lockable
,OuterJoinLoadable
,PostInsertIdentityPersister
,Queryable
,SQLLoadable
,UniqueKeyLoadable
- All Known Implementing Classes:
AbstractEntityPersister
,AnonymousTupleEntityValuedModelPart
,JoinedSubclassEntityPersister
,MockEntityPersister
,ProcessorSessionFactory.EntityPersister
,SingleTableEntityPersister
,UnionSubclassEntityPersister
public interface EntityMappingType extends ManagedMappingType, EntityValuedModelPart, Loadable, Restrictable, Discriminable, SoftDeletableModelPart
Mapping of an entity- See Also:
Entity
,EntityType
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EntityMappingType.ConstraintOrderedTableConsumer
-
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.ModelPart
ModelPart.JdbcValueBiConsumer<X,Y>, ModelPart.JdbcValueConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
applyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
Applies the base set of restrictions.default void
applyDiscriminator(Consumer<Predicate> predicateConsumer, String alias, TableGroup tableGroup, SqlAstCreationState creationState)
Apply the discriminator as a predicate via thepredicateConsumer
default void
applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, SqlAstCreationState creationState)
Applies just theFilter
values enabled for the associated entitydefault void
applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)
Apply theWhere
restrictionsdefault EntityMappingType
asEntityMappingType()
default TableReference
createPrimaryTableReference(SqlAliasBase sqlAliasBase, SqlAstCreationState creationState)
default TableGroup
createRootTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, Supplier<Consumer<Predicate>> additionalPredicateCollectorAccess, SqlAstCreationState creationState)
Create a root TableGroup as defined by this producerdefault TableReferenceJoin
createTableReferenceJoin(String joinTableExpression, SqlAliasBase sqlAliasBase, TableReference lhs, SqlAstCreationState creationState)
default Object[]
extractConcreteTypeStateValues(Map<AttributeMapping,DomainResultAssembler> assemblerMapping, RowProcessingState rowProcessingState)
Deprecated, for removal: This API element is subject to removal in a future version.default EntityMappingType
findContainingEntityMapping()
AttributeMapping
findDeclaredAttributeMapping(String name)
Find an attribute-mapping, declared on this entity mapping (not super or subs), by namedefault ModelPart
findSubPart(String name)
default ModelPart
findSubTypesSubPart(String name, EntityMappingType treatTargetType)
default void
forEachAttributeMapping(Consumer<? super AttributeMapping> action)
Visit each attribute mappingdefault AttributeMapping
getAttributeMapping(int position)
Retrieve an attribute mapping by position, relative to all attributesdefault AttributeMappingsList
getAttributeMappings()
The attributes mapping for this entity, including those declared on supertype mappingsdefault String
getContributor()
Deprecated.AttributeMappingsMap
getDeclaredAttributeMappings()
Get access to the attributes defined on this class - do not access attributes defined on the superEntityDiscriminatorMapping
getDiscriminatorMapping()
Mapping details for the entity's discriminator.default String
getDiscriminatorSQLValue()
Object
getDiscriminatorValue()
The discriminator value which indicates this entity mappingString
getEntityName()
The entity name.EntityPersister
getEntityPersister()
Safety-net.default Fetchable
getFetchable(int position)
EntityIdentifierMapping
getIdentifierMapping()
Mapping details for the entity's identifier.default EntityIdentifierMapping
getIdentifierMappingForJoin()
Mapping details for the entity's identifier.TableDetails
getIdentifierTableDetails()
Details for the table that defines the identifier column(s) for an entity hierarchy.default JavaType<?>
getJavaType()
The Java type for this part.default int
getJdbcTypeCount()
The number of JDBC mappingsdefault JavaType<?>
getMappedJavaType()
The descriptor descriptor for the mapped Java typedefault String
getMappedSuperclass()
Get the name of the entity that is the "super class" for this entityTableDetails
getMappedTableDetails()
Details for the table this entity maps.MultiNaturalIdLoader<?>
getMultiNaturalIdLoader()
Access to performing multi-value natural-id database selection.NaturalIdLoader<?>
getNaturalIdLoader()
Access to performing natural-id database selection.NaturalIdMapping
getNaturalIdMapping()
The mapping for the natural-id of the entity, if one is defineddefault int
getNumberOfAttributeMappings()
The total number of attributes for this entity, including those declared on supertype mappingsdefault int
getNumberOfDeclaredAttributeMappings()
Get the number of attributes defined on this entity mapping - do not access attributes defined on the superdefault int
getNumberOfFetchables()
The number of fetchables in the containerdefault MappingType
getPartMappingType()
The type for this part.default String
getPartName()
The local part name, which is generally the unqualified role namedefault EntityRepresentationStrategy
getRepresentationStrategy()
Describes how the entity is represented in the application's domain model.default EntityMappingType
getRootEntityDescriptor()
default String
getRootPathName()
The name for this loadable, for use as the root when generating relative pathsEntityRowIdMapping
getRowIdMapping()
The mapping for the row-id of the entity, if one is defined.default SoftDeleteMapping
getSoftDeleteMapping()
Mapping for soft-delete support, ornull
if soft-delete not defineddefault TableDetails
getSoftDeleteTableDetails()
default String
getSqlAliasStem()
Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generateddefault SqmMultiTableInsertStrategy
getSqmMultiTableInsertStrategy()
default SqmMultiTableMutationStrategy
getSqmMultiTableMutationStrategy()
default Set<String>
getSubclassEntityNames()
default int
getSubclassId()
A value that uniquely identifies an entity mapping relative to its inheritance hierarchydefault Collection<EntityMappingType>
getSubMappingTypes()
Retrieve mappings for all subtypesdefault EntityMappingType
getSuperMappingType()
The mapping for the entity which is the supertype for this entity mapping.EntityVersionMapping
getVersionMapping()
Mapping details for the entity's version when using the version strategy.default boolean
hasSubclasses()
Whether this entity mapping has any subtype mappingsdefault boolean
hasWhereRestrictions()
Does this restrictable have a where restriction?default boolean
isAbstract()
Whether this entity is defined as abstract using the Javaabstract
keyworddefault boolean
isAffectedByEnabledFetchProfiles(LoadQueryInfluencers influencers)
Whether any of the LoadQueryInfluencers.getEnabledFetchProfileNames() apply to this loadabledefault boolean
isAffectedByEnabledFilters(LoadQueryInfluencers influencers, boolean onlyApplyForLoadByKeyFilters)
Whether any of the "influencers" affect this loadable.default boolean
isAffectedByEntityGraph(LoadQueryInfluencers influencers)
Whether the effective entity-graph applies to this loadabledefault boolean
isConcreteProxy()
Returnstrue
if this entity type's hierarchy is configured to return concrete-typed proxies.boolean
isExplicitPolymorphism()
Is this class explicit polymorphism only?default boolean
isTypeOrSuperType(EntityMappingType targetType)
Whether the passed entity mapping is the same as or is a supertype of this entity mappingdefault boolean
isTypeOrSuperType(ManagedMappingType targetType)
Whether the passed mapping is (1) an entity mapping and (2) the same as or a supertype of this entity mappingObject
loadByUniqueKey(String propertyName, Object uniqueKey, SharedSessionContractImplementor session)
Load an instance of the persistent class, by a unique key other than the primary key.default OptimisticLockStyle
optimisticLockStyle()
The type of optimistic locking, if any, defined for this entity mappingdefault void
pruneForSubclasses(TableGroup tableGroup, Map<String,EntityNameUse> entityNameUses)
Adapts the table group and its table reference as well as table reference joins in a way such that unnecessary tables or joins are omitted if possible, based on the given treated entity names.default void
pruneForSubclasses(TableGroup tableGroup, Set<String> treatedEntityNames)
Deprecated, for removal: This API element is subject to removal in a future version.UsepruneForSubclasses(TableGroup, Map)
insteaddefault EntityMappingType
resolveConcreteProxyTypeForId(Object id, SharedSessionContractImplementor session)
If this entity is configured to return concrete-typed proxies, this method queries the entity table(s) do determine the concrete entity type associated with the provided id and returns its persister.default void
visitAttributeMappings(Consumer<? super AttributeMapping> action)
Visit the mappings, but limited to just attributes defined in the targetType or its super-type(s) if any.void
visitConstraintOrderedTables(EntityMappingType.ConstraintOrderedTableConsumer consumer)
void
visitDeclaredAttributeMappings(Consumer<? super AttributeMapping> action)
Visit attributes defined on this class - do not visit attributes defined on the supervoid
visitQuerySpaces(Consumer<String> querySpaceConsumer)
Visit each "query space" for the mapped entity.default void
visitSubTypeAttributeMappings(Consumer<? super AttributeMapping> action)
Walk this type's attributes as well as its sub-type'sdefault void
visitSuperTypeAttributeMappings(Consumer<? super AttributeMapping> action)
Walk this type's attributes as well as its super-type's-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.EntityValuedModelPart
addToCacheKey, applySqlSelections, applySqlSelections, createDomainResult, disassemble, findSubPart, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachSubPart, getEntityMappingType, visitSubParts
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getKeyFetchable, getNumberOfFetchableKeys, getNumberOfKeyFetchables, getSelectableIndex, visitFetchables, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.metamodel.mapping.FilterRestrictable
applyFilterRestrictions
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
getJdbcMapping, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.loader.ast.spi.Loadable
getBatchSize, isAffectedByEnabledFilters, isAffectedByInfluencers, isAffectedByInfluencers, isNotAffectedByInfluencers
-
Methods inherited from interface org.hibernate.metamodel.mapping.ManagedMappingType
anyRequiresAggregateColumnWriter, findAttributeMapping, forEachAttributeMapping, getValue, getValues, hasPartitionedSelectionMapping, isAffectedByEnabledFilters, setValue, setValues
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asAttributeMapping, asBasicValuedModelPart, breakDownJdbcValues, breakDownJdbcValues, decompose, decompose, forEachSelectable, forEachSelectable, getNavigableRole, isEntityIdentifierMapping, isVirtual
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
-
Methods inherited from interface org.hibernate.metamodel.mapping.Restrictable
applyBaseRestrictions
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroupProducer
containsTableReference
-
-
-
-
Method Detail
-
getEntityName
String getEntityName()
The 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- API Note:
- Different from
Entity.name()
, which is just a glorified SQM "import" name
-
getRepresentationStrategy
default EntityRepresentationStrategy getRepresentationStrategy()
Describes how the entity is represented in the application's domain model.
-
getMappedTableDetails
TableDetails getMappedTableDetails()
Details for the table this entity maps. Generally this is the same asgetIdentifierTableDetails()
, though may be different for subtypes in joined andunion inheritance hierarchies- See Also:
getIdentifierTableDetails()
-
getIdentifierTableDetails
TableDetails getIdentifierTableDetails()
Details for the table that defines the identifier column(s) for an entity hierarchy.
-
findContainingEntityMapping
default EntityMappingType findContainingEntityMapping()
- Specified by:
findContainingEntityMapping
in interfaceModelPart
-
getJavaType
default JavaType<?> getJavaType()
Description copied from interface:ModelPart
The Java type for this part. Generally equivalent toMappingType.getMappedJavaType()
relative toModelPart.getPartMappingType()
- Specified by:
getJavaType
in interfaceManagedMappingType
- Specified by:
getJavaType
in interfaceModelPart
-
asEntityMappingType
default EntityMappingType asEntityMappingType()
- Specified by:
asEntityMappingType
in interfaceModelPart
-
getPartMappingType
default MappingType getPartMappingType()
Description copied from interface:ModelPart
The type for this part.- Specified by:
getPartMappingType
in interfaceManagedMappingType
- Specified by:
getPartMappingType
in interfaceModelPart
-
visitQuerySpaces
void visitQuerySpaces(Consumer<String> querySpaceConsumer)
Visit each "query space" for the mapped entity.- API Note:
- "Query space" is simply the table expressions to which the entity is mapped; the name is historical.
-
findSubPart
default ModelPart findSubPart(String name)
- Specified by:
findSubPart
in interfaceEntityValuedModelPart
-
findSubTypesSubPart
default ModelPart findSubTypesSubPart(String name, EntityMappingType treatTargetType)
-
getJdbcTypeCount
default int getJdbcTypeCount()
Description copied from interface:Bindable
The number of JDBC mappings- Specified by:
getJdbcTypeCount
in interfaceBindable
- Specified by:
getJdbcTypeCount
in interfaceEntityValuedModelPart
- Specified by:
getJdbcTypeCount
in interfaceJdbcMappingContainer
-
isAbstract
default boolean isAbstract()
Whether this entity is defined as abstract using the Javaabstract
keyword
-
hasSubclasses
default boolean hasSubclasses()
Whether this entity mapping has any subtype mappings
-
getSuperMappingType
default EntityMappingType getSuperMappingType()
The mapping for the entity which is the supertype for this entity mapping.- Returns:
- The supertype mapping, or
null
if there is no supertype - API Note:
- This need not be the direct superclass of the entity as it is driven by mapping.
-
getMappedSuperclass
default String getMappedSuperclass()
Get the name of the entity that is the "super class" for this entity- See Also:
getSuperMappingType()
-
getSubMappingTypes
default Collection<EntityMappingType> getSubMappingTypes()
Retrieve mappings for all subtypes
-
isTypeOrSuperType
default boolean isTypeOrSuperType(EntityMappingType targetType)
Whether the passed entity mapping is the same as or is a supertype of this entity mapping
-
isTypeOrSuperType
default boolean isTypeOrSuperType(ManagedMappingType targetType)
Whether the passed mapping is (1) an entity mapping and (2) the same as or a supertype of this entity mapping- See Also:
isTypeOrSuperType(EntityMappingType)
-
getSubclassId
default int getSubclassId()
A value that uniquely identifies an entity mapping relative to its inheritance hierarchy
-
isExplicitPolymorphism
boolean isExplicitPolymorphism()
Is this class explicit polymorphism only?
-
getDiscriminatorValue
Object getDiscriminatorValue()
The discriminator value which indicates this entity mapping
-
getDiscriminatorSQLValue
default String getDiscriminatorSQLValue()
-
getRootEntityDescriptor
default EntityMappingType getRootEntityDescriptor()
-
pruneForSubclasses
default void pruneForSubclasses(TableGroup tableGroup, Map<String,EntityNameUse> entityNameUses)
Adapts the table group and its table reference as well as table reference joins in a way such that unnecessary tables or joins are omitted if possible, based on the given treated entity names.The goal is to e.g. remove join inheritance "branches" or union selects that are impossible.
Consider the following example:
class BaseEntity {} class Sub1 extends BaseEntity {} class Sub1Sub1 extends Sub1 {} class Sub1Sub2 extends Sub1 {} class Sub2 extends BaseEntity {} class Sub2Sub1 extends Sub2 {} class Sub2Sub2 extends Sub2 {}
If the
treatedEntityNames
only containsSub1
or any of its subtypes, this means thatSub2
and all subtypes are impossible, thus the joins/selects for these types shall be omitted in the given table group.- Parameters:
tableGroup
- The table group to prune subclass tables forentityNameUses
- The entity names under which a table group was used.
-
pruneForSubclasses
@Deprecated(forRemoval=true) default void pruneForSubclasses(TableGroup tableGroup, Set<String> treatedEntityNames)
Deprecated, for removal: This API element is subject to removal in a future version.UsepruneForSubclasses(TableGroup, Map)
insteadAdapts the table group and its table reference as well as table reference joins in a way such that unnecessary tables or joins are omitted if possible, based on the given treated entity names. The goal is to e.g. remove join inheritance "branches" or union selects that are impossible. Consider the following example:class BaseEntity {} class Sub1 extends BaseEntity {} class Sub1Sub1 extends Sub1 {} class Sub1Sub2 extends Sub1 {} class Sub2 extends BaseEntity {} class Sub2Sub1 extends Sub2 {} class Sub2Sub2 extends Sub2 {}
If thetreatedEntityNames
only containsSub1
or any of its subtypes, this means thatSub2
and all subtypes are impossible, thus the joins/selects for these types shall be omitted in the given table group.- Parameters:
tableGroup
- The table group to prune subclass tables fortreatedEntityNames
- The entity names for which path usages were registered
-
getIdentifierMapping
EntityIdentifierMapping getIdentifierMapping()
Mapping details for the entity's identifier. This is shared across all entity mappings within an inheritance hierarchy.
-
getIdentifierMappingForJoin
default EntityIdentifierMapping getIdentifierMappingForJoin()
Mapping details for the entity's identifier. This is shared across all entity mappings within an inheritance hierarchy.
-
getDiscriminatorMapping
EntityDiscriminatorMapping getDiscriminatorMapping()
Mapping details for the entity's discriminator. This is shared across all entity mappings within an inheritance hierarchy.- Specified by:
getDiscriminatorMapping
in interfaceDiscriminable
-
isConcreteProxy
@Incubating default boolean isConcreteProxy()
Returnstrue
if this entity type's hierarchy is configured to return concrete-typed proxies.- Since:
- 6.6
- See Also:
ConcreteProxy
-
resolveConcreteProxyTypeForId
@Incubating default EntityMappingType resolveConcreteProxyTypeForId(Object id, SharedSessionContractImplementor session)
If this entity is configured to return concrete-typed proxies, this method queries the entity table(s) do determine the concrete entity type associated with the provided id and returns its persister. Otherwise, this method simply returns this entity persister.- Since:
- 6.6
- See Also:
isConcreteProxy()
-
getVersionMapping
EntityVersionMapping getVersionMapping()
Mapping details for the entity's version when using the version strategy. This is shared across all entity mappings within an inheritance hierarchy.- Returns:
- The version mapping, or null if the entity is (1) defined
with a strategy other than
OptimisticLockStyle.VERSION
or (2) defined without optimistic locking - See Also:
optimisticLockStyle()
-
optimisticLockStyle
default OptimisticLockStyle optimisticLockStyle()
The type of optimistic locking, if any, defined for this entity mapping
-
getNaturalIdMapping
NaturalIdMapping getNaturalIdMapping()
The mapping for the natural-id of the entity, if one is defined
-
getRowIdMapping
EntityRowIdMapping getRowIdMapping()
The mapping for the row-id of the entity, if one is defined.
-
getSoftDeleteMapping
default SoftDeleteMapping getSoftDeleteMapping()
Mapping for soft-delete support, ornull
if soft-delete not defined- Specified by:
getSoftDeleteMapping
in interfaceSoftDeletableModelPart
-
getSoftDeleteTableDetails
default TableDetails getSoftDeleteTableDetails()
- Specified by:
getSoftDeleteTableDetails
in interfaceSoftDeletableModelPart
-
getNumberOfAttributeMappings
default int getNumberOfAttributeMappings()
The total number of attributes for this entity, including those declared on supertype mappings- Specified by:
getNumberOfAttributeMappings
in interfaceManagedMappingType
-
getAttributeMappings
default AttributeMappingsList getAttributeMappings()
The attributes mapping for this entity, including those declared on supertype mappings- Specified by:
getAttributeMappings
in interfaceManagedMappingType
-
forEachAttributeMapping
default void forEachAttributeMapping(Consumer<? super AttributeMapping> action)
Visit each attribute mapping- Specified by:
forEachAttributeMapping
in interfaceManagedMappingType
- See Also:
getAttributeMappings()
-
getAttributeMapping
default AttributeMapping getAttributeMapping(int position)
Retrieve an attribute mapping by position, relative to all attributes- Specified by:
getAttributeMapping
in interfaceManagedMappingType
-
findDeclaredAttributeMapping
AttributeMapping findDeclaredAttributeMapping(String name)
Find an attribute-mapping, declared on this entity mapping (not super or subs), by name
-
getNumberOfDeclaredAttributeMappings
default int getNumberOfDeclaredAttributeMappings()
Get the number of attributes defined on this entity mapping - do not access attributes defined on the super
-
getDeclaredAttributeMappings
AttributeMappingsMap getDeclaredAttributeMappings()
Get access to the attributes defined on this class - do not access attributes defined on the super
-
visitDeclaredAttributeMappings
void visitDeclaredAttributeMappings(Consumer<? super AttributeMapping> action)
Visit attributes defined on this class - do not visit attributes defined on the super
-
visitAttributeMappings
default void visitAttributeMappings(Consumer<? super AttributeMapping> action)
Visit the mappings, but limited to just attributes defined in the targetType or its super-type(s) if any.
-
visitSubTypeAttributeMappings
default void visitSubTypeAttributeMappings(Consumer<? super AttributeMapping> action)
Walk this type's attributes as well as its sub-type's
-
visitSuperTypeAttributeMappings
default void visitSuperTypeAttributeMappings(Consumer<? super AttributeMapping> action)
Walk this type's attributes as well as its super-type's
-
visitConstraintOrderedTables
void visitConstraintOrderedTables(EntityMappingType.ConstraintOrderedTableConsumer consumer)
-
extractConcreteTypeStateValues
@Deprecated(forRemoval=true) default Object[] extractConcreteTypeStateValues(Map<AttributeMapping,DomainResultAssembler> assemblerMapping, RowProcessingState rowProcessingState)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getNaturalIdLoader
NaturalIdLoader<?> getNaturalIdLoader()
Access to performing natural-id database selection. This is per-entity in the hierarchy
-
getMultiNaturalIdLoader
MultiNaturalIdLoader<?> getMultiNaturalIdLoader()
Access to performing multi-value natural-id database selection. This is per-entity in the hierarchy
-
loadByUniqueKey
Object loadByUniqueKey(String propertyName, Object uniqueKey, SharedSessionContractImplementor session)
Load an instance of the persistent class, by a unique key other than the primary key.
-
isAffectedByEnabledFilters
default boolean isAffectedByEnabledFilters(LoadQueryInfluencers influencers, boolean onlyApplyForLoadByKeyFilters)
Description copied from interface:Loadable
Whether any of the "influencers" affect this loadable.- Specified by:
isAffectedByEnabledFilters
in interfaceLoadable
-
isAffectedByEntityGraph
default boolean isAffectedByEntityGraph(LoadQueryInfluencers influencers)
Description copied from interface:Loadable
Whether the effective entity-graph applies to this loadable- Specified by:
isAffectedByEntityGraph
in interfaceLoadable
-
isAffectedByEnabledFetchProfiles
default boolean isAffectedByEnabledFetchProfiles(LoadQueryInfluencers influencers)
Description copied from interface:Loadable
Whether any of the LoadQueryInfluencers.getEnabledFetchProfileNames() apply to this loadable- Specified by:
isAffectedByEnabledFetchProfiles
in interfaceLoadable
-
getSqmMultiTableMutationStrategy
default SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy()
-
getSqmMultiTableInsertStrategy
default SqmMultiTableInsertStrategy getSqmMultiTableInsertStrategy()
-
getSqlAliasStem
default String getSqlAliasStem()
Description copied from interface:TableGroupProducer
Get 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:
getSqlAliasStem
in interfaceTableGroupProducer
- See Also:
SqlAliasBaseManager.createSqlAliasBase(java.lang.String)
-
createRootTableGroup
default TableGroup createRootTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, Supplier<Consumer<Predicate>> additionalPredicateCollectorAccess, SqlAstCreationState creationState)
Description copied from interface:RootTableGroupProducer
Create a root TableGroup as defined by this producer- Specified by:
createRootTableGroup
in interfaceRootTableGroupProducer
- Parameters:
canUseInnerJoins
- Whether inner joins can be used when creating table-references within this groupnavigablePath
- The overall NavigablePath for the rootexplicitSourceAlias
- The alias, if one, explicitly provided by the application for this rootexplicitSqlAliasBase
- A specific SqlAliasBase to use. May benull
indicating one should be created using the SqlAliasBaseGenerator fromcreationState
additionalPredicateCollectorAccess
- Collector for additional predicates associated with this producercreationState
- The creation state
-
createPrimaryTableReference
default TableReference createPrimaryTableReference(SqlAliasBase sqlAliasBase, SqlAstCreationState creationState)
-
createTableReferenceJoin
default TableReferenceJoin createTableReferenceJoin(String joinTableExpression, SqlAliasBase sqlAliasBase, TableReference lhs, SqlAstCreationState creationState)
-
getMappedJavaType
default JavaType<?> getMappedJavaType()
Description copied from interface:MappingType
The descriptor descriptor for the mapped Java type- Specified by:
getMappedJavaType
in interfaceMappingType
-
getNumberOfFetchables
default int getNumberOfFetchables()
Description copied from interface:FetchableContainer
The number of fetchables in the container- Specified by:
getNumberOfFetchables
in interfaceFetchableContainer
-
getFetchable
default Fetchable getFetchable(int position)
- Specified by:
getFetchable
in interfaceFetchableContainer
-
applyDiscriminator
default void applyDiscriminator(Consumer<Predicate> predicateConsumer, String alias, TableGroup tableGroup, SqlAstCreationState creationState)
Description copied from interface:Discriminable
Apply the discriminator as a predicate via thepredicateConsumer
- Specified by:
applyDiscriminator
in interfaceDiscriminable
-
applyFilterRestrictions
default void applyFilterRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, SqlAstCreationState creationState)
Description copied from interface:FilterRestrictable
Applies just theFilter
values enabled for the associated entity- Specified by:
applyFilterRestrictions
in interfaceFilterRestrictable
-
applyBaseRestrictions
default void applyBaseRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, Map<String,Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, Set<String> treatAsDeclarations, SqlAstCreationState creationState)
Description copied from interface:Restrictable
Applies the base set of restrictions.- Specified by:
applyBaseRestrictions
in interfaceRestrictable
-
hasWhereRestrictions
default boolean hasWhereRestrictions()
Description copied from interface:WhereRestrictable
Does this restrictable have a where restriction?- Specified by:
hasWhereRestrictions
in interfaceWhereRestrictable
-
applyWhereRestrictions
default void applyWhereRestrictions(Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifier, SqlAstCreationState creationState)
Description copied from interface:WhereRestrictable
Apply theWhere
restrictions- Specified by:
applyWhereRestrictions
in interfaceWhereRestrictable
-
getEntityPersister
@Internal EntityPersister getEntityPersister()
Safety-net.
-
getContributor
@Deprecated default String getContributor()
Deprecated.
-
getPartName
default String getPartName()
Description copied from interface:ModelPart
The local part name, which is generally the unqualified role name- Specified by:
getPartName
in interfaceModelPart
-
getRootPathName
default String getRootPathName()
Description copied from interface:Loadable
The name for this loadable, for use as the root when generating relative paths- Specified by:
getRootPathName
in interfaceLoadable
-
-