Record Class CollectionMutationInterpretation
java.lang.Object
java.lang.Record
org.hibernate.collection.spi.CollectionMutationInterpretation
@Incubating(since="8.0",
group="collection-delta")
public record CollectionMutationInterpretation(@Nonnull CollectionTransition transition, @Nonnull SemanticCollectionChange semanticChange, @Nonnull PhysicalCollectionMutation physicalMutation, long mutationGeneration)
extends Record
A frozen, queue-neutral interpretation of one semantic collection mutation.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionMutationInterpretation(CollectionTransition transition, SemanticCollectionChange semanticChange, PhysicalCollectionMutation physicalMutation, long mutationGeneration) Creates an instance of aCollectionMutationInterpretationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisValid(PersistentCollection<?> collection) Whether this interpretation still describes the collection's structural state.longReturns the value of themutationGenerationrecord component.Returns the value of thephysicalMutationrecord component.Returns the value of thesemanticChangerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransitionrecord component.
-
Constructor Details
-
CollectionMutationInterpretation
public CollectionMutationInterpretation(@Nonnull CollectionTransition transition, @Nonnull SemanticCollectionChange semanticChange, @Nonnull PhysicalCollectionMutation physicalMutation, long mutationGeneration) Creates an instance of aCollectionMutationInterpretationrecord class.- Parameters:
transition- the value for thetransitionrecord componentsemanticChange- the value for thesemanticChangerecord componentphysicalMutation- the value for thephysicalMutationrecord componentmutationGeneration- the value for themutationGenerationrecord component
-
-
Method Details
-
isValid
Whether this interpretation still describes the collection's structural state. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
transition
Returns the value of thetransitionrecord component.- Returns:
- the value of the
transitionrecord component
-
semanticChange
Returns the value of thesemanticChangerecord component.- Returns:
- the value of the
semanticChangerecord component
-
physicalMutation
Returns the value of thephysicalMutationrecord component.- Returns:
- the value of the
physicalMutationrecord component
-
mutationGeneration
public long mutationGeneration()Returns the value of themutationGenerationrecord component.- Returns:
- the value of the
mutationGenerationrecord component
-