Class AnnotationPoint.Builder

java.lang.Object
com.inductiveautomation.historian.common.model.data.AnnotationPoint.Builder
Enclosing class:
AnnotationPoint

public static class AnnotationPoint.Builder extends Object
Builder for AnnotationPoint.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • notes

      public AnnotationPoint.Builder notes(String notes)
      Sets the notes.
      Parameters:
      notes - the notes.
      Returns:
      this builder.
    • annotationType

      public AnnotationPoint.Builder annotationType(String annotationType)
      Sets the annotation type.
      Parameters:
      annotationType - the type.
      Returns:
      this builder.
    • author

      public AnnotationPoint.Builder author(String author)
      Sets the author.
      Parameters:
      author - the author.
      Returns:
      this builder.
    • startTime

      public AnnotationPoint.Builder startTime(Instant startTime)
      Sets the start time.
      Parameters:
      startTime - the start time.
      Returns:
      this builder.
    • endTime

      public AnnotationPoint.Builder endTime(@Nullable Instant endTime)
      Sets the end time.
      Parameters:
      endTime - the end time, or null if none.
      Returns:
      this builder.
    • source

      public AnnotationPoint.Builder source(QualifiedPath source)
      Sets the source.
      Parameters:
      source - the source.
      Returns:
      this builder.
    • identifier

      public AnnotationPoint.Builder identifier(UUID identifier)
      Sets the identifier.
      Parameters:
      identifier - the id.
      Returns:
      this builder.
    • identifier

      public AnnotationPoint.Builder identifier(String identifier)
      Sets the identifier from its string form.
      Parameters:
      identifier - the id as a UUID string.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the string is not a valid UUID.
    • lastUpdated

      public AnnotationPoint.Builder lastUpdated(@Nullable Instant lastUpdated)
      Sets the last-updated time.
      Parameters:
      lastUpdated - the time, or null if none.
      Returns:
      this builder.
    • deleted

      public AnnotationPoint.Builder deleted(boolean deleted)
      Sets whether the annotation is soft-deleted; default false.
      Parameters:
      deleted - whether it is soft-deleted.
      Returns:
      this builder.
    • build

      public AnnotationPoint build()
      Builds the point.
      Returns:
      the new point.
      Throws:
      NullPointerException - if a required field is null.