jakarta.persistence.ManyToMany mappingsjakarta.persistence.OneToMany with jakarta.persistence.JoinTable mappings| Modifier and Type | Field and Description |
|---|---|
| private ValuedModelPart | |
| private ForeignKeyDescriptor |
| Access | Constructor and Description |
|---|---|
| public | ManyToManyCollectionPart(CollectionPart.
|
| public | ManyToManyCollectionPart(CollectionPart.
|
| Modifier and Type | Method and Description |
|---|---|
| public <X, Y> int | breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart.
Implements org. |
| public boolean | canUseParentTableGroup(TableGroupProducer producer, NavigablePath navigablePath, ValuedModelPart valuedModelPart)
Implements org. |
| private ForeignKeyDescriptor | createForeignKeyDescriptor(Value fkBootDescriptorSource, EntityType entityType, ModelPart fkTargetModelPart, MappingModelCreationProcess creationProcess, Dialect dialect)
|
| private ForeignKeyDescriptor | createJoinTablePartForeignKey(String collectionTableName, ManyToOne elementBootDescriptor, MappingModelCreationProcess creationProcess)
|
| public LazyTableGroup | createRootTableGroupJoin(NavigablePath
The NavigablePath to the join navigablePath, TableGroup The join's (L)eft-(H)and (S)ide lhs, String explicitSourceAlias, SqlAliasBase A specific SqlAliasBase to use. May be explicitSqlAliasBase, SqlAstJoinType null indicating one should be created using the SqlAliasBaseGenerator from creationStateAn explicit join-type. May be null to signal that the join is for an implicit path. requestedJoinType, boolean fetched, Consumer<Predicate> Consumer for additional predicates from the producer's mapping. predicateConsumer, SqlAstCreationState creationState)Implements org. |
| private SimpleForeignKeyDescriptor | createSimpleForeignKeyDescriptor(Value fkBootDescriptorSource, EntityType entityType, MappingModelCreationProcess creationProcess, Dialect dialect, String fkKeyTableName, BasicValuedModelPart basicFkTargetPart)
|
| public TableGroupJoin | createTableGroupJoin(NavigablePath
The NavigablePath to the join navigablePath, TableGroup The join's (L)eft-(H)and (S)ide lhs, String explicitSourceAlias, SqlAliasBase A specific SqlAliasBase to use. May be explicitSqlAliasBase, SqlAstJoinType null indicating one should be created using the SqlAliasBaseGenerator from creationStateAn explicit join-type. May be null to signal that the join is for an implicit path. requestedJoinType, boolean fetched, boolean Indicates there are explicit, additional predicates (from an SQM tree ON/WITH clause) addsPredicate, SqlAstCreationState creationState)Implements org. |
| public <X, Y> int | decompose(Object domainValue, int offset, X x, Y y, ModelPart.
Overrides default org. breakDownJdbcValues(Object, int, Object, Object, JdbcValueBiConsumer, SharedSessionContractImplementor),
but this method is supposed to be used for decomposing values for assignment expressions.
|
| private ForeignKeyDescriptor | determineForeignKey(ForeignKeyDescriptor foreignKeyDescriptor, Value fkBootDescriptorSource, MappingModelCreationProcess creationProcess)
|
| public ModelPart | findSubPart(String name, EntityMappingType targetType)
Overrides default org. Implements org. |
| public boolean | finishInitialization(CollectionPersister collectionDescriptor, Collection bootCollectionDescriptor, String fkTargetModelPartName, MappingModelCreationProcess creationProcess)
Implements org. |
| public void | forEachInsertable(SelectableConsumer consumer)
Overrides default org. |
| public int | forEachSelectable(int offset, SelectableConsumer consumer)
Overrides default org. |
| public void | forEachUpdatable(SelectableConsumer consumer)
Overrides default org. |
| public EntityCollectionPart. | |
| public String | getContainingTableExpression()
Implements org. |
| public SqlAstJoinType | getDefaultSqlAstJoinType(TableGroup parentTableGroup)
Implements org. |
| public ForeignKeyDescriptor | getForeignKeyDescriptor()
Implements org. |
| public ModelPart | |
| public JdbcMapping | getJdbcMapping(final int index)
Implements org. |
| public ModelPart | getKeyTargetMatchPart()
Implements org. |
| public SelectableMapping | getSelectable(int columnIndex)
Implements org. |
| public ForeignKeyDescriptor. | getSideNature()
Implements org. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isSimpleJoinPredicate(Predicate predicate)
Implements org. |
| protected AssociationKey | |
| private static ValuedModelPart | resolveNamedTargetPart(String targetPartName, EntityMappingType entityMappingType, CollectionPersister collectionDescriptor)
|
| fkTargetModelPart | back to summary |
|---|---|
| private ValuedModelPart fkTargetModelPart | |
| foreignKey | back to summary |
|---|---|
| private ForeignKeyDescriptor foreignKey | |
| ManyToManyCollectionPart | back to summary |
|---|---|
| public ManyToManyCollectionPart(CollectionPart. | |
| ManyToManyCollectionPart | back to summary |
|---|---|
| public ManyToManyCollectionPart(CollectionPart. | |
| breakDownJdbcValues | back to summary |
|---|---|
| public <X, Y> int breakDownJdbcValues(Object domainValue, int offset, X x, Y y, ModelPart. Implements org. Doc from org. Breaks 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 values
| |
| canUseParentTableGroup | back to summary |
|---|---|
| public boolean canUseParentTableGroup(TableGroupProducer producer, NavigablePath navigablePath, ValuedModelPart valuedModelPart) Implements org.
| |
| createForeignKeyDescriptor | back to summary |
|---|---|
| private ForeignKeyDescriptor createForeignKeyDescriptor(Value fkBootDescriptorSource, EntityType entityType, ModelPart fkTargetModelPart, MappingModelCreationProcess creationProcess, Dialect dialect) | |
| createJoinTablePartForeignKey | back to summary |
|---|---|
| private ForeignKeyDescriptor createJoinTablePartForeignKey(String collectionTableName, ManyToOne elementBootDescriptor, MappingModelCreationProcess creationProcess) | |
| createRootTableGroupJoin | back to summary |
|---|---|
| public LazyTableGroup createRootTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, SqlAstJoinType requestedJoinType, boolean fetched, Consumer<Predicate> predicateConsumer, SqlAstCreationState creationState) Implements org. Doc from org. Create the "join", but return a TableGroup. Intended for creating sub-query correlations. E.g., given
from SomeEntity e
where exists (
select 1
from AnotherEntity a
where e.association.attr = 1
)
We call this for the `e.association` path.
| |
| createSimpleForeignKeyDescriptor | back to summary |
|---|---|
| private SimpleForeignKeyDescriptor createSimpleForeignKeyDescriptor(Value fkBootDescriptorSource, EntityType entityType, MappingModelCreationProcess creationProcess, Dialect dialect, String fkKeyTableName, BasicValuedModelPart basicFkTargetPart) | |
| createTableGroupJoin | back to summary |
|---|---|
| public TableGroupJoin createTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, SqlAstJoinType requestedJoinType, boolean fetched, boolean addsPredicate, SqlAstCreationState creationState) Implements org. Doc from org. Create a TableGroupJoin.
| |
| decompose | back to summary |
|---|---|
| public <X, Y> int decompose(Object domainValue, int offset, X x, Y y, ModelPart. Overrides default org. Doc from org. Similar to
| |
| determineForeignKey | back to summary |
|---|---|
| private ForeignKeyDescriptor determineForeignKey(ForeignKeyDescriptor foreignKeyDescriptor, Value fkBootDescriptorSource, MappingModelCreationProcess creationProcess) | |
| findSubPart | back to summary |
|---|---|
| public ModelPart findSubPart(String name, EntityMappingType targetType) Overrides default org. Implements org.
| |
| finishInitialization | back to summary |
|---|---|
| public boolean finishInitialization(CollectionPersister collectionDescriptor, Collection bootCollectionDescriptor, String fkTargetModelPartName, MappingModelCreationProcess creationProcess) Implements org. Doc from org. Perform any delayed initialization.
The initialization is considered successful if the result is
If the exception is something that will just never succeed, consider throwing
an exception with the
| |
| forEachInsertable | back to summary |
|---|---|
| public void forEachInsertable(SelectableConsumer consumer) Overrides default org.
| |
| forEachSelectable | back to summary |
|---|---|
| public int forEachSelectable(int offset, SelectableConsumer consumer) Overrides default org. Doc from org. Visits each selectable mapping with the selectable index offset by the given value. Returns the amount of jdbc types that have been visited.
| |
| forEachUpdatable | back to summary |
|---|---|
| public void forEachUpdatable(SelectableConsumer consumer) Overrides default org.
| |
| getCardinality | back to summary |
|---|---|
| public EntityCollectionPart. Implements org.
| |
| getContainingTableExpression | back to summary |
|---|---|
| public String getContainingTableExpression() Implements org. Doc from org. The table which contains the columns mapped by this value
| |
| getDefaultSqlAstJoinType | back to summary |
|---|---|
| public SqlAstJoinType getDefaultSqlAstJoinType(TableGroup parentTableGroup) Implements org.
| |
| getForeignKeyDescriptor | back to summary |
|---|---|
| public ForeignKeyDescriptor getForeignKeyDescriptor() Implements org. Doc from org. The descriptor, allowing access to column(s), etc
| |
| getInclusionCheckPart | back to summary |
|---|---|
| public ModelPart getInclusionCheckPart() Overrides default org.
| |
| getJdbcMapping | back to summary |
|---|---|
| public JdbcMapping getJdbcMapping(final int index) Implements org.
| |
| getKeyTargetMatchPart | back to summary |
|---|---|
| public ModelPart getKeyTargetMatchPart() Implements org. Doc from org. The model sub-part relative to the associated entity type that is the target of this association's foreign-key
| |
| getSelectable | back to summary |
|---|---|
| public SelectableMapping getSelectable(int columnIndex) Implements org. Doc from org. Get the selectable at the given position
| |
| getSideNature | back to summary |
|---|---|
| public ForeignKeyDescriptor. Implements org. Doc from org. Indicates which "side" of the foreign-key this association describes
| |
| hasPartitionedSelectionMapping | back to summary |
|---|---|
| public boolean hasPartitionedSelectionMapping() Implements org.
| |
| isFkOptimizationAllowed | back to summary |
|---|---|
| public boolean isFkOptimizationAllowed() Implements org.
| |
| isReferenceToPrimaryKey | back to summary |
|---|---|
| public boolean isReferenceToPrimaryKey() Implements org.
| |
| isSimpleJoinPredicate | back to summary |
|---|---|
| public boolean isSimpleJoinPredicate(Predicate predicate) Implements org. Doc from org. Returns 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.
| |
| resolveFetchAssociationKey | back to summary |
|---|---|
| protected AssociationKey resolveFetchAssociationKey() Implements abstract org.
| |
| resolveNamedTargetPart | back to summary |
|---|---|
| private static ValuedModelPart resolveNamedTargetPart(String targetPartName, EntityMappingType entityMappingType, CollectionPersister collectionDescriptor) | |