Record Class AnnotationChangePoint
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.data.AnnotationChangePoint
- Record Components:
identifier- the annotation's unique id; not nullsource- the annotation's source path; not nulltimestamp- when the change happened; defaults to the current time at microsecond precision if null, and a supplied value is kept as givenvalue- the new annotation, ornullfor a deletion
- All Implemented Interfaces:
ChangePoint<AnnotationPoint>, TemporalPoint<AnnotationPoint, ChangePointType>, Comparable<TemporalPoint<AnnotationPoint, ChangePointType>>
public record AnnotationChangePoint(UUID identifier, QualifiedPath source, Instant timestamp, @Nullable AnnotationPoint value)
extends Record
implements ChangePoint<AnnotationPoint>
A
ChangePoint that creates, updates or deletes an annotation; a null value is a
deletion.-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationChangePoint(UUID identifier, QualifiedPath source, Instant timestamp, @Nullable AnnotationPoint value) Creates an instance of aAnnotationChangePointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationChangePointdelete(UUID identifier, QualifiedPath source, Instant timestamp) Creates a deletion change point.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theidentifierrecord component.source()Returns the value of thesourcerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.type()static AnnotationChangePointupdate(UUID identifier, QualifiedPath source, Instant timestamp, AnnotationPoint newValue) Creates an update change point.@Nullable AnnotationPointReturns the new annotation, ornullfor a deletion.@Nullable AnnotationPointvalue()Returns the value of thevaluerecord component.withSource(QualifiedPath source) Returns this change point with the given source, or this instance if the source is unchanged.Methods inherited from interface ChangePoint
isDeletionMethods inherited from interface TemporalPoint
compareTo
-
Constructor Details
-
AnnotationChangePoint
public AnnotationChangePoint(UUID identifier, QualifiedPath source, Instant timestamp, @Nullable AnnotationPoint value) Creates an instance of aAnnotationChangePointrecord class.- Parameters:
identifier- the value for theidentifierrecord componentsource- the value for thesourcerecord componenttimestamp- the value for thetimestamprecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceChangePoint<AnnotationPoint>- Specified by:
typein interfaceTemporalPoint<AnnotationPoint, ChangePointType>
-
withSource
Returns this change point with the given source, or this instance if the source is unchanged.- Parameters:
source- the new source path- Returns:
- the change point with the new source
-
updatedAnnotationPoint
Returns the new annotation, ornullfor a deletion. -
update
public static AnnotationChangePoint update(UUID identifier, QualifiedPath source, Instant timestamp, AnnotationPoint newValue) Creates an update change point.- Parameters:
identifier- the annotation's id; not nullsource- the annotation's source path; not nulltimestamp- when the update happened; not nullnewValue- the new annotation; not null- Returns:
- the change point
-
delete
public static AnnotationChangePoint delete(UUID identifier, QualifiedPath source, Instant timestamp) Creates a deletion change point.- Parameters:
identifier- the annotation's id; not nullsource- the annotation's source path; not nulltimestamp- when the deletion happened; not null- Returns:
- the change point
-
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). -
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-
source
Returns the value of thesourcerecord component.- Specified by:
sourcein interfaceTemporalPoint<AnnotationPoint, ChangePointType>- Returns:
- the value of the
sourcerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceTemporalPoint<AnnotationPoint, ChangePointType>- Returns:
- the value of the
timestamprecord component
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceChangePoint<AnnotationPoint>- Specified by:
valuein interfaceTemporalPoint<AnnotationPoint, ChangePointType>- Returns:
- the value of the
valuerecord component
-