Record Class DeferredCollectionPosition
java.lang.Object
java.lang.Record
org.hibernate.collection.spi.DeferredCollectionPosition
- Record Components:
persistedSize- The one shared persisted-size handle for the mutationrelativePosition- The position relative to persisted size
@Incubating(since="8.0",
group="collection-delta")
public record DeferredCollectionPosition(PersistedCollectionSize persistedSize, int relativePosition)
extends Record
A list position calculated from persisted size plus a relative adjustment.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionDeferredCollectionPosition(PersistedCollectionSize persistedSize, int relativePosition) Creates an instance of aDeferredCollectionPositionrecord 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.Returns the value of thepersistedSizerecord component.intReturns the value of therelativePositionrecord component.intresolve()Resolve the absolute list position.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeferredCollectionPosition
Creates an instance of aDeferredCollectionPositionrecord class.- Parameters:
persistedSize- the value for thepersistedSizerecord componentrelativePosition- the value for therelativePositionrecord component
-
-
Method Details
-
resolve
public int resolve()Resolve the absolute list position. -
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. -
persistedSize
Returns the value of thepersistedSizerecord component.- Returns:
- the value of the
persistedSizerecord component
-
relativePosition
public int relativePosition()Returns the value of therelativePositionrecord component.- Returns:
- the value of the
relativePositionrecord component
-