Class PluralAttributeMappingImpl
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.AbstractAttributeMapping
-
- org.hibernate.metamodel.mapping.internal.PluralAttributeMappingImpl
-
- All Implemented Interfaces:
FetchProfileAffectee,Loadable,AttributeMapping,Bindable,FilterRestrictable,JdbcMappingContainer,MappingModelExpressible,ModelPart,ModelPartContainer,OwnedValuedModelPart,PluralAttributeMapping,PropertyBasedMapping,Restrictable,SelectableMappings,SoftDeletableModelPart,ValuedModelPart,ValueMapping,WhereRestrictable,RootTableGroupProducer,TableGroupJoinProducer,TableGroupProducer,DatabaseSnapshotContributor,Fetchable,FetchableContainer,FetchOptions,FetchStyleAccess,FetchTimingAccess,JavaTypedExpressible,MutabilityPlanExposer
public class PluralAttributeMappingImpl extends AbstractAttributeMapping implements PluralAttributeMapping, FetchProfileAffectee, FetchOptions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePluralAttributeMappingImpl.AwareAllows callback after creation of the attribute mapping.-
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
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.PluralAttributeMapping
PluralAttributeMapping.IndexMetadata, PluralAttributeMapping.PredicateConsumer
-
-
Constructor Summary
Constructors Modifier Constructor Description PluralAttributeMappingImpl(String attributeName, Collection bootDescriptor, PropertyAccess propertyAccess, AttributeMetadata attributeMetadata, CollectionMappingType<?> collectionMappingType, int stateArrayPosition, int fetchableIndex, CollectionPart elementDescriptor, CollectionPart indexDescriptor, CollectionIdentifierDescriptor identifierDescriptor, FetchTiming fetchTiming, FetchStyle fetchStyle, CascadeStyle cascadeStyle, ManagedMappingType declaringType, CollectionPersister collectionDescriptor, MappingModelCreationProcess creationProcess)protectedPluralAttributeMappingImpl(PluralAttributeMappingImpl original)For Hibernate Reactive
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session)Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.voidapplySoftDeleteRestrictions(TableGroup tableGroup, PluralAttributeMapping.PredicateConsumer predicateConsumer)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>
intbreakDownJdbcValues(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.protected FetchbuildDelayedCollectionFetch(NavigablePath fetchedPath, PluralAttributeMapping fetchedAttribute, FetchParent fetchParent, DomainResult<?> collectionKeyResult, boolean unfetched)For Hibernate Reactiveprotected FetchbuildEagerCollectionFetch(NavigablePath fetchedPath, PluralAttributeMapping fetchedAttribute, TableGroup collectionTableGroup, boolean needsCollectionKeyResult, FetchParent fetchParent, DomainResultCreationState creationState)For Hibernate Reactiveprotected FetchbuildSelectEagerCollectionFetch(NavigablePath fetchedPath, PluralAttributeMapping fetchedAttribute, DomainResult<?> collectionKeyDomainResult, FetchParent fetchParent)For Hibernate ReactivebooleancontainsTableReference(String tableExpression)<T> DomainResult<T>createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)Create a DomainResult for a specific reference to this ModelPart.TableGroupcreateRootTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, Supplier<Consumer<Predicate>> additionalPredicateCollectorAccess, SqlAstCreationState creationState)Create a root TableGroup as defined by this producerTableGroupcreateRootTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType requestedJoinType, boolean fetched, @Nullable Consumer<Predicate> predicateConsumer, SqlAstCreationState creationState)Create the "join", but return a TableGroup.TableGroupJoincreateTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType requestedJoinType, boolean fetched, boolean addsPredicate, SqlAstCreationState creationState)Create a TableGroupJoin.SqlAstJoinTypedetermineSqlJoinType(TableGroup lhs, @Nullable SqlAstJoinType requestedJoinType, boolean fetched)Objectdisassemble(Object value, SharedSessionContractImplementor session)Breaks down a value ofJinto its simple pieces.ModelPartfindSubPart(String name, EntityMappingType treatTargetType)voidfinishInitialization(Property bootProperty, Collection bootDescriptor, MappingModelCreationProcess creationProcess)<X,Y>
intforEachDisassembledJdbcValue(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 offsetvoidforEachSubPart(IndexedConsumer<ModelPart> consumer, EntityMappingType treatTarget)FetchgenerateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)Generates a Fetch of this fetchableintgetBatchSize()CollectionPersistergetCollectionDescriptor()StringgetContainingTableExpression()The table which contains the columns mapped by this valueSqlAstJoinTypegetDefaultSqlAstJoinType(TableGroup parentTableGroup)CollectionPartgetElementDescriptor()StringgetFetchableName()The name of the fetchable.GeneratorgetGenerator()The value generation strategy to use for this attribute.CollectionIdentifierDescriptorgetIdentifierDescriptor()CollectionPartgetIndexDescriptor()PluralAttributeMapping.IndexMetadatagetIndexMetadata()JdbcMappinggetJdbcMapping(int index)intgetJdbcTypeCount()The number of JDBC mappingsForeignKeyDescriptorgetKeyDescriptor()OrderByFragmentgetManyToManyOrderByFragment()FetchOptionsgetMappedFetchOptions()The configured fetch timing and styleCollectionMappingTypegetMappedType()Descriptor for the type of this mappingNavigableRolegetNavigableRole()OrderByFragmentgetOrderByFragment()StringgetRootPathName()The name for this loadable, for use as the root when generating relative pathsSelectableMappinggetSelectable(int columnIndex)Get the selectable at the given positionStringgetSeparateCollectionTable()SoftDeleteMappinggetSoftDeleteMapping()Mapping for soft-delete support, ornullif soft-delete not definedTableDetailsgetSoftDeleteTableDetails()StringgetSqlAliasStem()Get the "stem" used as the base for generating SQL table aliases for table references that are part of the TableGroup being generatedFetchStylegetStyle()FetchTiminggetTiming()booleanhasPartitionedSelectionMapping()booleanisAffectedByEnabledFetchProfiles(LoadQueryInfluencers influencers)Whether any of the LoadQueryInfluencers.getEnabledFetchProfileNames() apply to this loadablebooleanisAffectedByEnabledFilters(LoadQueryInfluencers influencers, boolean onlyApplyForLoadByKeyFilters)Whether any of the "influencers" affect this loadable.booleanisAffectedByEntityGraph(LoadQueryInfluencers influencers)Whether the effective entity-graph applies to this loadablebooleanisBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart)booleanisSimpleJoinPredicate(Predicate predicate)Returns whether the given predicate is a simple join predicate for this attribute.voidregisterAffectingFetchProfile(String fetchProfileName)Register the profile name with the entity/collectionFetchresolveCircularFetch(NavigablePath fetchablePath, FetchParent fetchParent, FetchTiming fetchTiming, DomainResultCreationState creationState)Check whether this Fetchable is considered a circular fetch.voidsetForeignKeyDescriptor(ForeignKeyDescriptor fkDescriptor)StringtoString()voidvisitSubParts(Consumer<ModelPart> consumer, EntityMappingType treatTargetType)-
Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractAttributeMapping
getAttributeMetadata, getAttributeName, getDeclaringType, getFetchableKey, getJavaType, getPartMappingType, getPropertyAccess, getStateArrayPosition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.metamodel.mapping.AttributeMapping
asAttributeMapping, asEmbeddedAttributeMapping, compare, findContainingEntityMapping, getAttributeMetadata, getAttributeName, getDeclaringType, getExposedMutabilityPlan, getPartName, getPropertyAccess, getStateArrayPosition, getValue, isEmbeddedAttributeMapping, setValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
getFetchableKey, isSelectable
-
Methods inherited from interface org.hibernate.sql.results.graph.FetchableContainer
getSelectableIndex, visitFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.metamodel.mapping.FilterRestrictable
applyFilterRestrictions
-
Methods inherited from interface org.hibernate.loader.ast.spi.Loadable
isAffectedByEnabledFilters, isAffectedByInfluencers, isAffectedByInfluencers, isNotAffectedByInfluencers
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asBasicValuedModelPart, asEntityMappingType, breakDownJdbcValues, decompose, decompose, getJavaType, getPartMappingType, isEntityIdentifierMapping, isVirtual
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPartContainer
findByPath, findByPath, forEachSubPart
-
Methods inherited from interface org.hibernate.metamodel.mapping.PluralAttributeMapping
applyBaseManyToManyRestrictions, applyBaseRestrictions, applyFilterRestrictions, applyWhereRestrictions, asPluralAttributeMapping, createSnapshotDomainResult, getFetchable, getKeyFetchable, getNumberOfFetchableKeys, getNumberOfFetchables, getNumberOfKeyFetchables, hasWhereRestrictions, incrementFetchDepth, isPluralAttributeMapping, visitFetchables, visitFetchables, visitKeyFetchables, visitKeyFetchables
-
Methods inherited from interface org.hibernate.metamodel.mapping.Restrictable
applyBaseRestrictions
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachSelectable, forEachSelectable, forEachUpdatable, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
-
-
-
Constructor Detail
-
PluralAttributeMappingImpl
public PluralAttributeMappingImpl(String attributeName, Collection bootDescriptor, PropertyAccess propertyAccess, AttributeMetadata attributeMetadata, CollectionMappingType<?> collectionMappingType, int stateArrayPosition, int fetchableIndex, CollectionPart elementDescriptor, CollectionPart indexDescriptor, CollectionIdentifierDescriptor identifierDescriptor, FetchTiming fetchTiming, FetchStyle fetchStyle, CascadeStyle cascadeStyle, ManagedMappingType declaringType, CollectionPersister collectionDescriptor, MappingModelCreationProcess creationProcess)
-
PluralAttributeMappingImpl
protected PluralAttributeMappingImpl(PluralAttributeMappingImpl original)
For Hibernate Reactive
-
-
Method Detail
-
isBidirectionalAttributeName
public boolean isBidirectionalAttributeName(NavigablePath fetchablePath, ToOneAttributeMapping modelPart)
- Specified by:
isBidirectionalAttributeNamein interfacePluralAttributeMapping
-
finishInitialization
public void finishInitialization(Property bootProperty, Collection bootDescriptor, MappingModelCreationProcess creationProcess)
-
getNavigableRole
public NavigableRole getNavigableRole()
- Specified by:
getNavigableRolein interfaceModelPart- See Also:
ModelPart.getPartName()
-
getMappedType
public CollectionMappingType getMappedType()
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfacePluralAttributeMapping- Specified by:
getMappedTypein interfaceValueMapping
-
getKeyDescriptor
public ForeignKeyDescriptor getKeyDescriptor()
- Specified by:
getKeyDescriptorin interfacePluralAttributeMapping
-
getCollectionDescriptor
public CollectionPersister getCollectionDescriptor()
- Specified by:
getCollectionDescriptorin interfacePluralAttributeMapping
-
getElementDescriptor
public CollectionPart getElementDescriptor()
- Specified by:
getElementDescriptorin interfacePluralAttributeMapping
-
getIndexDescriptor
public CollectionPart getIndexDescriptor()
- Specified by:
getIndexDescriptorin interfacePluralAttributeMapping
-
getIndexMetadata
public PluralAttributeMapping.IndexMetadata getIndexMetadata()
- Specified by:
getIndexMetadatain interfacePluralAttributeMapping
-
getIdentifierDescriptor
public CollectionIdentifierDescriptor getIdentifierDescriptor()
- Specified by:
getIdentifierDescriptorin interfacePluralAttributeMapping
-
getSoftDeleteMapping
public SoftDeleteMapping getSoftDeleteMapping()
Description copied from interface:PluralAttributeMappingMapping for soft-delete support, ornullif soft-delete not defined- Specified by:
getSoftDeleteMappingin interfacePluralAttributeMapping- Specified by:
getSoftDeleteMappingin interfaceSoftDeletableModelPart
-
getSoftDeleteTableDetails
public TableDetails getSoftDeleteTableDetails()
- Specified by:
getSoftDeleteTableDetailsin interfaceSoftDeletableModelPart
-
getOrderByFragment
public OrderByFragment getOrderByFragment()
- Specified by:
getOrderByFragmentin interfacePluralAttributeMapping
-
getManyToManyOrderByFragment
public OrderByFragment getManyToManyOrderByFragment()
- Specified by:
getManyToManyOrderByFragmentin interfacePluralAttributeMapping
-
getSeparateCollectionTable
public String getSeparateCollectionTable()
- Specified by:
getSeparateCollectionTablein interfacePluralAttributeMapping
-
containsTableReference
public boolean containsTableReference(String tableExpression)
- Specified by:
containsTableReferencein interfaceTableGroupProducer
-
getGenerator
public Generator getGenerator()
Description copied from interface:AttributeMappingThe value generation strategy to use for this attribute.- Specified by:
getGeneratorin interfaceAttributeMapping
-
getFetchableName
public String getFetchableName()
Description copied from interface:FetchableThe name of the fetchable. This is the part's "local name".- Specified by:
getFetchableNamein interfaceFetchable- See Also:
ModelPart.getNavigableRole(),NavigableRole.getLocalName()
-
getMappedFetchOptions
public FetchOptions getMappedFetchOptions()
Description copied from interface:FetchableThe configured fetch timing and style- Specified by:
getMappedFetchOptionsin interfaceFetchable
-
getStyle
public FetchStyle getStyle()
- Specified by:
getStylein interfaceFetchStyleAccess
-
getTiming
public FetchTiming getTiming()
- Specified by:
getTimingin interfaceFetchTimingAccess
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()
- Specified by:
hasPartitionedSelectionMappingin interfaceModelPart
-
applySoftDeleteRestrictions
public void applySoftDeleteRestrictions(TableGroup tableGroup, PluralAttributeMapping.PredicateConsumer predicateConsumer)
- Specified by:
applySoftDeleteRestrictionsin interfacePluralAttributeMapping
-
createDomainResult
public <T> DomainResult<T> createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:ModelPartCreate a DomainResult for a specific reference to this ModelPart.- Specified by:
createDomainResultin interfaceModelPart
-
generateFetch
public Fetch generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:FetchableGenerates a Fetch of this fetchable- Specified by:
generateFetchin interfaceFetchable- Parameters:
fetchParent- The parent of the Fetch we are generatingfetchablePath- The overall path within the graphfetchTiming- The requested fetch timing
-
buildDelayedCollectionFetch
protected Fetch buildDelayedCollectionFetch(NavigablePath fetchedPath, PluralAttributeMapping fetchedAttribute, FetchParent fetchParent, DomainResult<?> collectionKeyResult, boolean unfetched)
For Hibernate Reactive
-
buildSelectEagerCollectionFetch
protected Fetch buildSelectEagerCollectionFetch(NavigablePath fetchedPath, PluralAttributeMapping fetchedAttribute, DomainResult<?> collectionKeyDomainResult, FetchParent fetchParent)
For Hibernate Reactive
-
buildEagerCollectionFetch
protected Fetch buildEagerCollectionFetch(NavigablePath fetchedPath, PluralAttributeMapping fetchedAttribute, TableGroup collectionTableGroup, boolean needsCollectionKeyResult, FetchParent fetchParent, DomainResultCreationState creationState)
For Hibernate Reactive
-
resolveCircularFetch
public Fetch resolveCircularFetch(NavigablePath fetchablePath, FetchParent fetchParent, FetchTiming fetchTiming, DomainResultCreationState creationState)
Description copied from interface:FetchableCheck whether this Fetchable is considered a circular fetch.- Specified by:
resolveCircularFetchin interfaceFetchable- Parameters:
fetchablePath- The overall path within the graph- Returns:
- The Fetch representing the circularity;
nullindicates the fetch is not circular
-
getSqlAliasStem
public String 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 interfaceTableGroupProducer- See Also:
SqlAliasBaseManager.createSqlAliasBase(java.lang.String)
-
getDefaultSqlAstJoinType
public SqlAstJoinType getDefaultSqlAstJoinType(TableGroup parentTableGroup)
- Specified by:
getDefaultSqlAstJoinTypein interfaceTableGroupJoinProducer
-
isSimpleJoinPredicate
public boolean isSimpleJoinPredicate(Predicate predicate)
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
-
createTableGroupJoin
public TableGroupJoin createTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType requestedJoinType, boolean fetched, boolean addsPredicate, SqlAstCreationState creationState)
Description copied from interface:TableGroupJoinProducerCreate a TableGroupJoin.- Specified by:
createTableGroupJoinin interfaceTableGroupJoinProducer- Parameters:
navigablePath- The NavigablePath to the joinlhs- The join's (L)eft-(H)and (S)ideexplicitSqlAliasBase- A specific SqlAliasBase to use. May benullindicating one should be created using the SqlAliasBaseGenerator fromcreationStaterequestedJoinType- An explicit join-type. May be null to signal that the join is for an implicit path.addsPredicate- Indicates there are explicit, additional predicates (from an SQM tree ON/WITH clause)
-
determineSqlJoinType
public SqlAstJoinType determineSqlJoinType(TableGroup lhs, @Nullable SqlAstJoinType requestedJoinType, boolean fetched)
- Specified by:
determineSqlJoinTypein interfaceTableGroupJoinProducer
-
createRootTableGroupJoin
public TableGroup createRootTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, @Nullable String explicitSourceAlias, @Nullable SqlAliasBase explicitSqlAliasBase, @Nullable SqlAstJoinType requestedJoinType, boolean fetched, @Nullable Consumer<Predicate> predicateConsumer, SqlAstCreationState creationState)
Description copied from interface:TableGroupJoinProducerCreate the "join", but return a TableGroup. Intended for creating sub-query correlations. E.g., givenfrom SomeEntity e where exists ( select 1 from AnotherEntity a where e.association.attr = 1 )We call this for the `e.association` path.- Specified by:
createRootTableGroupJoinin interfaceTableGroupJoinProducer- Parameters:
navigablePath- The NavigablePath to the joinlhs- The join's (L)eft-(H)and (S)ideexplicitSqlAliasBase- A specific SqlAliasBase to use. May benullindicating one should be created using the SqlAliasBaseGenerator fromcreationStaterequestedJoinType- An explicit join-type. May be null to signal that the join is for an implicit path.predicateConsumer- Consumer for additional predicates from the producer's mapping.
-
setForeignKeyDescriptor
public void setForeignKeyDescriptor(ForeignKeyDescriptor fkDescriptor)
-
createRootTableGroup
public TableGroup createRootTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, Supplier<Consumer<Predicate>> additionalPredicateCollectorAccess, SqlAstCreationState creationState)
Description copied from interface:RootTableGroupProducerCreate a root TableGroup as defined by this producer- Specified by:
createRootTableGroupin 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 benullindicating one should be created using the SqlAliasBaseGenerator fromcreationStateadditionalPredicateCollectorAccess- Collector for additional predicates associated with this producercreationState- The creation state
-
getBatchSize
public int getBatchSize()
- Specified by:
getBatchSizein interfaceLoadable
-
isAffectedByEnabledFilters
public boolean isAffectedByEnabledFilters(LoadQueryInfluencers influencers, boolean onlyApplyForLoadByKeyFilters)
Description copied from interface:LoadableWhether any of the "influencers" affect this loadable.- Specified by:
isAffectedByEnabledFiltersin interfaceLoadable
-
isAffectedByEntityGraph
public boolean isAffectedByEntityGraph(LoadQueryInfluencers influencers)
Description copied from interface:LoadableWhether the effective entity-graph applies to this loadable- Specified by:
isAffectedByEntityGraphin interfaceLoadable
-
registerAffectingFetchProfile
public void registerAffectingFetchProfile(String fetchProfileName)
Description copied from interface:FetchProfileAffecteeRegister the profile name with the entity/collection- Specified by:
registerAffectingFetchProfilein interfaceFetchProfileAffectee
-
isAffectedByEnabledFetchProfiles
public boolean isAffectedByEnabledFetchProfiles(LoadQueryInfluencers influencers)
Description copied from interface:LoadableWhether any of the LoadQueryInfluencers.getEnabledFetchProfileNames() apply to this loadable- Specified by:
isAffectedByEnabledFetchProfilesin interfaceLoadable
-
getRootPathName
public String getRootPathName()
Description copied from interface:LoadableThe name for this loadable, for use as the root when generating relative paths- Specified by:
getRootPathNamein interfaceLoadable
-
findSubPart
public ModelPart findSubPart(String name, EntityMappingType treatTargetType)
- Specified by:
findSubPartin interfaceModelPartContainer
-
forEachSubPart
public void forEachSubPart(IndexedConsumer<ModelPart> consumer, EntityMappingType treatTarget)
- Specified by:
forEachSubPartin interfaceModelPartContainer
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState)
Description copied from interface:ModelPartApply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelectionsin interfaceModelPart
-
applySqlSelections
public void applySqlSelections(NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer<SqlSelection,JdbcMapping> selectionConsumer)
Description copied from interface:ModelPartApply SQL selections for a specific reference to this ModelPart outside the domain query's root select clause.- Specified by:
applySqlSelectionsin interfaceModelPart
-
breakDownJdbcValues
public <X,Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.JdbcValueBiConsumer<X,Y> valueConsumer, SharedSessionContractImplementor session)
Description copied from interface:ModelPartBreaks down the domain value to its constituent JDBC values. Think of it as breaking the multi-dimensional array into a visitable flat array. Additionally, it passes through the valuesXandYto the consumer. Returns the amount of jdbc types that have been visited.- Specified by:
breakDownJdbcValuesin interfaceModelPart
-
visitSubParts
public void visitSubParts(Consumer<ModelPart> consumer, EntityMappingType treatTargetType)
- Specified by:
visitSubPartsin interfaceModelPartContainer
-
getContainingTableExpression
public String 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 interfaceJdbcMappingContainer- Specified by:
getJdbcTypeCountin interfaceSelectableMappings- Specified by:
getJdbcTypeCountin interfaceValuedModelPart
-
getJdbcMapping
public JdbcMapping getJdbcMapping(int index)
- Specified by:
getJdbcMappingin interfaceJdbcMappingContainer
-
getSelectable
public SelectableMapping getSelectable(int columnIndex)
Description copied from interface:SelectableMappingsGet the selectable at the given position- Specified by:
getSelectablein interfaceSelectableMappings
-
forEachJdbcType
public int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
disassemble
public Object disassemble(Object value, SharedSessionContractImplementor session)
Description copied from interface:BindableBreaks down a value ofJinto its simple pieces. E.g., an embedded value gets broken down into an array of its attribute state; a basic value converts to itself; etc.Generally speaking, this is the form in which entity state is kept relative to a Session via
EntityEntry.@Entity class Person { @Id Integer id; @Embedded Name name; int age; } @Embeddable class Name { String familiarName; String familyName; }At the top level, we would want to disassemble a
Personvalue, so we'd ask theBindablefor thePersonentity to disassemble. Given aPersonvalue:Person( id=1, name=Name( 'Steve', 'Ebersole' ), 28 )
this disassemble would result in a multidimensional array:
[ ["Steve", "Ebersole"], 28 ]
Note that the identifier is not part of this disassembled state. Note also how the embedded value results in a sub-array.
- Specified by:
disassemblein interfaceBindable- See Also:
EntityEntry
-
addToCacheKey
public void addToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session)
Description copied from interface:BindableAdd to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.- Specified by:
addToCacheKeyin interfaceBindable- Specified by:
addToCacheKeyin interfaceJavaTypedExpressible- Parameters:
cacheKey- the MutableCacheKey used to add the disassembled value and the hashCodevalue- the value to disassemblesession- the SharedSessionContractImplementor
-
forEachDisassembledJdbcValue
public <X,Y> int forEachDisassembledJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X,Y> valuesConsumer, SharedSessionContractImplementor session)
Description copied from interface:BindableLikeBindable.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).- Specified by:
forEachDisassembledJdbcValuein interfaceBindable
-
-