Record Class MultiTableMutationSupport
java.lang.Object
java.lang.Record
org.hibernate.dialect.mutation.spi.MultiTableMutationSupport
- Record Components:
mutationStrategyKind- the fallback for update and deleteinsertStrategyKind- the fallback for insert
@SPI({USE,SUPPLY})
public record MultiTableMutationSupport(MultiTableMutationStrategyKind mutationStrategyKind, MultiTableMutationStrategyKind insertStrategyKind)
extends Record
Immutable selection of Hibernate's fallback strategy families for SQM mutations of multi-table entities.
A custom Dialect should return a stable, non-null profile from
Dialect.getMultiTableMutationSupport(). Update and
delete share mutationStrategyKind, while insert independently uses
insertStrategyKind. Use forBoth(MultiTableMutationStrategyKind) or a
named profile when both operations use the same family, and invoke the
canonical constructor when they differ.
These values select Hibernate-owned fallback implementations. Supply a genuinely custom execution strategy through the query-engine mutation or insert strategy setting instead of depending on Hibernate's internal strategy implementations.
- Since:
- 8.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MultiTableMutationSupportUse modifiable common-table expressions for both operation families.static final MultiTableMutationSupportUse global temporary tables for both operation families.static final MultiTableMutationSupportUse local temporary tables for both operation families.static final MultiTableMutationSupportUse persistent tables for both operation families. -
Constructor Summary
ConstructorsConstructorDescriptionMultiTableMutationSupport(MultiTableMutationStrategyKind mutationStrategyKind, MultiTableMutationStrategyKind insertStrategyKind) Creates an instance of aMultiTableMutationSupportrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static MultiTableMutationSupportforBoth(MultiTableMutationStrategyKind strategyKind) Select one strategy kind for both update/delete and insert.final inthashCode()Returns a hash code value for this object.Returns the value of theinsertStrategyKindrecord component.Returns the value of themutationStrategyKindrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CTE
Use modifiable common-table expressions for both operation families. -
LOCAL_TEMPORARY_TABLE
Use local temporary tables for both operation families. -
GLOBAL_TEMPORARY_TABLE
Use global temporary tables for both operation families. -
PERSISTENT_TABLE
Use persistent tables for both operation families.
-
-
Constructor Details
-
MultiTableMutationSupport
public MultiTableMutationSupport(MultiTableMutationStrategyKind mutationStrategyKind, MultiTableMutationStrategyKind insertStrategyKind) Creates an instance of aMultiTableMutationSupportrecord class.- Parameters:
mutationStrategyKind- the value for themutationStrategyKindrecord componentinsertStrategyKind- the value for theinsertStrategyKindrecord component
-
-
Method Details
-
forBoth
Select one strategy kind for both update/delete and insert.- Parameters:
strategyKind- the shared non-null strategy kind- Returns:
- the canonical same-kind profile
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
mutationStrategyKind
Returns the value of themutationStrategyKindrecord component.- Returns:
- the value of the
mutationStrategyKindrecord component
-
insertStrategyKind
Returns the value of theinsertStrategyKindrecord component.- Returns:
- the value of the
insertStrategyKindrecord component
-