Record Class AnnotationPoint
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.data.AnnotationPoint
- Record Components:
identifier- the unique id of the annotation; must not be null.source- the source the annotation is on; must not be null.value- the annotation content; must not be null.startTime- when the annotation starts; must not be null.endTime- when the annotation ends, if it does.lastUpdated- when the annotation was last edited or deleted, empty if never. A store compares it in its guarded edit and delete statements, so an edit must supply it.deleted- whether the annotation is soft-deleted: it keeps its row and content but is excluded from annotation queries. Ordinary stores leave thisfalse; it is set when a stored annotation's exact state is being reproduced.
- All Implemented Interfaces:
ComplexPoint<Annotation>, TemporalPoint<Annotation, ComplexPointType>, Comparable<TemporalPoint<Annotation, ComplexPointType>>
public record AnnotationPoint(UUID identifier, QualifiedPath source, Annotation value, Instant startTime, Optional<Instant> endTime, Optional<Instant> lastUpdated, boolean deleted)
extends Record
implements ComplexPoint<Annotation>
An annotation on a source: a
ComplexPoint whose value is an Annotation, with a
start time and an optional end time.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationPoint(UUID identifier, QualifiedPath source, Annotation value, Instant startTime, Optional<Instant> endTime, Optional<Instant> lastUpdated, boolean deleted) Validates the point. -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationPoint.Builderbuilder()Creates a builder.booleandeleted()Returns the value of thedeletedrecord component.endTime()Returns the value of theendTimerecord component.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.Returns the value of thelastUpdatedrecord component.source()Returns the value of thesourcerecord component.Returns the value of thestartTimerecord component.Returns the annotation's start time.final StringtoString()Returns a string representation of this record class.type()ReturnsStandardComplexPointType.ANNOTATION.value()Returns the value of thevaluerecord component.withSource(QualifiedPath source) Returns a copy with a different source, or this instance if it is unchanged.Methods inherited from interface TemporalPoint
compareTo
-
Constructor Details
-
AnnotationPoint
public AnnotationPoint(UUID identifier, QualifiedPath source, Annotation value, Instant startTime, Optional<Instant> endTime, Optional<Instant> lastUpdated, boolean deleted) Validates the point.- Throws:
NullPointerException- if a required field is null.IllegalArgumentException- if the end time is before the start time.
-
-
Method Details
-
builder
-
withSource
Returns a copy with a different source, or this instance if it is unchanged.- Parameters:
source- the new source.- Returns:
- the point with the new source.
-
timestamp
Returns the annotation's start time.- Specified by:
timestampin interfaceTemporalPoint<Annotation, ComplexPointType>- Returns:
- the start time.
-
type
ReturnsStandardComplexPointType.ANNOTATION.- Specified by:
typein interfaceComplexPoint<Annotation>- Specified by:
typein interfaceTemporalPoint<Annotation, ComplexPointType>- Returns:
- the point type.
-
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. -
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<Annotation, ComplexPointType>- Returns:
- the value of the
sourcerecord component
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceTemporalPoint<Annotation, ComplexPointType>- Returns:
- the value of the
valuerecord component
-
startTime
-
endTime
-
lastUpdated
Returns the value of thelastUpdatedrecord component.- Returns:
- the value of the
lastUpdatedrecord component
-
deleted
-