Record Class CollectionDelta
java.lang.Object
java.lang.Record
org.hibernate.collection.spi.CollectionDelta
- Record Components:
baseline- The reference state against which the changes are expressedcoverage- Whether the changes completely describe the difference from the baselinechanges- The ordered semantic changessources- How the changes were discovered
@Incubating(since="8.0",
group="collection-delta")
public record CollectionDelta(@Nonnull CollectionBaseline baseline, @Nonnull DeltaCoverage coverage, @Nonnull List<CollectionChange> changes, @Nonnull Set<DeltaSource> sources)
extends Record
An immutable semantic description of collection changes relative to an
identified reference state.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionDelta(CollectionBaseline baseline, DeltaCoverage coverage, List<CollectionChange> changes, Set<DeltaSource> sources) Creates an instance of aCollectionDeltarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbaseline()Returns the value of thebaselinerecord component.changes()Returns the value of thechangesrecord component.coverage()Returns the value of thecoveragerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Whether the delta contains no semantic changes.Project the known orphan candidates represented by removals and replacements.sources()Returns the value of thesourcesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CollectionDelta
public CollectionDelta(@Nonnull CollectionBaseline baseline, @Nonnull DeltaCoverage coverage, @Nonnull List<CollectionChange> changes, @Nonnull Set<DeltaSource> sources) Creates an instance of aCollectionDeltarecord class.
-
-
Method Details
-
isEmpty
public boolean isEmpty()Whether the delta contains no semantic changes. -
orphanCandidates
-
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). -
baseline
-
coverage
-
changes
-
sources
-