Record Class MetadataPoint
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.data.MetadataPoint
- All Implemented Interfaces:
ComplexPoint<PropertySet>, TemporalPoint<PropertySet, ComplexPointType>, Comparable<TemporalPoint<PropertySet, ComplexPointType>>
public record MetadataPoint(PropertySet value, QualityCode quality, Instant timestamp, QualifiedPath source)
extends Record
implements ComplexPoint<PropertySet>
Metadata for a source: a
ComplexPoint whose value is a PropertySet, with a
quality, timestamp and source.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMetadataPoint(PropertySet value, QualityCode quality, Instant timestamp, QualifiedPath source) Creates a point. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataPoint.Builderbuilder()Creates a builder.static MetadataPoint.Builderbuilder(MetadataPoint metadataPoint) Creates a builder initialized from an existing point.static MetadataPointempty(QualifiedPath source) Creates a point with no properties.booleanIndicates whether some other object is "equal to" this one.static MetadataPointfrom(PropertySet value, QualifiedPath source) Creates a point with good quality, timestamped now.inthashCode()Returns a hash code value for this object.quality()Returns the value of thequalityrecord 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()ReturnsStandardComplexPointType.METADATA.value()Returns the value of thevaluerecord component.withSource(QualifiedPath source) Returns a copy with a different source.Methods inherited from interface TemporalPoint
compareTo
-
Constructor Details
-
MetadataPoint
public MetadataPoint(PropertySet value, QualityCode quality, Instant timestamp, QualifiedPath source) Creates a point. A null value defaults toPropertySet.EMPTY, a null quality toQualityCode.Goodand a null timestamp to now.- Parameters:
value- the properties.quality- the quality.timestamp- the timestamp.source- the source path; must not be null.
-
-
Method Details
-
from
Creates a point with good quality, timestamped now.- Parameters:
value- the properties.source- the source path.- Returns:
- the new point.
-
empty
Creates a point with no properties.- Parameters:
source- the source path.- Returns:
- the new point.
-
type
ReturnsStandardComplexPointType.METADATA.- Specified by:
typein interfaceComplexPoint<PropertySet>- Specified by:
typein interfaceTemporalPoint<PropertySet, ComplexPointType>- Returns:
- the point type.
-
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). -
hashCode
-
withSource
Returns a copy with a different source.- Parameters:
source- the new source path.- Returns:
- the point with the new source.
-
builder
-
builder
Creates a builder initialized from an existing point.- Parameters:
metadataPoint- the point to copy.- Returns:
- a new builder.
-
toString
-
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceTemporalPoint<PropertySet, ComplexPointType>- Returns:
- the value of the
valuerecord component
-
quality
Returns the value of thequalityrecord component.- Returns:
- the value of the
qualityrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceTemporalPoint<PropertySet, ComplexPointType>- Returns:
- the value of the
timestamprecord component
-
source
Returns the value of thesourcerecord component.- Specified by:
sourcein interfaceTemporalPoint<PropertySet, ComplexPointType>- Returns:
- the value of the
sourcerecord component
-