Class SimpleNodeControlInfoDatum

java.lang.Object
net.solarnetwork.domain.BasicIdentity<net.solarnetwork.domain.datum.DatumId>
net.solarnetwork.domain.datum.GeneralDatum
net.solarnetwork.node.domain.datum.SimpleDatum
net.solarnetwork.node.domain.datum.SimpleNodeControlInfoDatum
All Implemented Interfaces:
Serializable, Cloneable, Comparable<net.solarnetwork.domain.datum.DatumId>, net.solarnetwork.domain.datum.Datum, net.solarnetwork.domain.datum.DatumSamplesContainer, net.solarnetwork.domain.datum.DatumSamplesOperations, net.solarnetwork.domain.datum.MutableDatum, net.solarnetwork.domain.datum.MutableDatumSamplesOperations, net.solarnetwork.domain.Differentiable<net.solarnetwork.domain.datum.DatumSamplesOperations>, net.solarnetwork.domain.Identity<net.solarnetwork.domain.datum.DatumId>, net.solarnetwork.domain.NodeControlInfo, MutableNodeDatum, NodeDatum

public class SimpleNodeControlInfoDatum extends SimpleDatum implements net.solarnetwork.domain.NodeControlInfo
Extension of SimpleDatum that wraps a NodeControlInfo instance.
Since:
2.0
Version:
1.0
Author:
matt
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default property name used for instantaneous values when none provided by a control.
    static final String
    The default property name used if none provided by a given control.

    Fields inherited from interface net.solarnetwork.domain.datum.Datum

    DATUM_TYPE_PROPERTY, DATUM_TYPES_PROPERTY, OP_STATE, OP_STATES, REVERSE_ACCUMULATING_SUFFIX_KEY, SOURCE_ID, TIMESTAMP

    Fields inherited from interface net.solarnetwork.node.domain.datum.NodeDatum

    TIMESTAMP_UPLOAD
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleNodeControlInfoDatum(net.solarnetwork.domain.NodeControlInfo info, Instant timestamp)
    Constructor.
    SimpleNodeControlInfoDatum(net.solarnetwork.domain.NodeControlInfo info, Instant timestamp, Iterable<net.solarnetwork.domain.NodeControlInfo> infos)
    Construct from a collection of NodeControlInfo instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    Public clone method.
    protected String[]
     
     
     
     
    net.solarnetwork.domain.NodeControlPropertyType
     
     
     

    Methods inherited from class net.solarnetwork.node.domain.datum.SimpleDatum

    copyWithId, copyWithSamples, getUploaded, locationDatum, locationDatum, nodeDatum, nodeDatum, nodeDatum, setUploaded

    Methods inherited from class net.solarnetwork.domain.datum.GeneralDatum

    addTag, asMutableSampleOperations, asSampleOperations, asSimpleMap, clear, createSimpleMap, findSampleValue, getKind, getObjectId, getSampleBigDecimal, getSampleData, getSampleData, getSampleDouble, getSampleFloat, getSampleInteger, getSampleLong, getSamples, getSampleString, getSampleValue, getSourceId, getTags, getTimestamp, hasSampleValue, hasSampleValue, hasTag, isEmpty, nodeDatum, putSampleValue, removeTag, setSampleData, setTags, toString

    Methods inherited from class net.solarnetwork.domain.BasicIdentity

    compareTo, equals, getId, hashCode

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface net.solarnetwork.domain.datum.Datum

    asSampleOperations, asSimpleMap, getKind, getObjectId, getSampleData, getSourceId, getTimestamp

    Methods inherited from interface net.solarnetwork.domain.datum.DatumSamplesOperations

    differsFrom

    Methods inherited from interface net.solarnetwork.domain.Identity

    getId, hasId

    Methods inherited from interface net.solarnetwork.domain.datum.MutableDatum

    asMutableSampleOperations

    Methods inherited from interface net.solarnetwork.domain.datum.MutableDatumSamplesOperations

    copyFrom, mergeFrom, mergeFrom, removeTag
  • Field Details

    • DEFAULT_PROPERTY_NAME

      public static final String DEFAULT_PROPERTY_NAME
      The default property name used if none provided by a given control.
      See Also:
    • DEFAULT_INSTANT_PROPERTY_NAME

      public static final String DEFAULT_INSTANT_PROPERTY_NAME
      The default property name used for instantaneous values when none provided by a control.
      See Also:
  • Constructor Details

    • SimpleNodeControlInfoDatum

      public SimpleNodeControlInfoDatum(net.solarnetwork.domain.NodeControlInfo info, Instant timestamp)
      Constructor.

      This constructs a node datum.

      Parameters:
      info - the control info
      timestamp - the timestamp
    • SimpleNodeControlInfoDatum

      public SimpleNodeControlInfoDatum(net.solarnetwork.domain.NodeControlInfo info, Instant timestamp, Iterable<net.solarnetwork.domain.NodeControlInfo> infos)
      Construct from a collection of NodeControlInfo instances.

      The info argument will serve as the primary delegate provide of the NodeControlInfo API methods. All available properties from infos will be added as datum properties.

      Parameters:
      info - the primary info
      timestamp - the timestamp
      infos - a collection of info to construct from
  • Method Details

    • clone

      Description copied from interface: NodeDatum
      Public clone method.
      Specified by:
      clone in interface MutableNodeDatum
      Specified by:
      clone in interface NodeDatum
      Overrides:
      clone in class SimpleDatum
      Returns:
      a copy of this instance
    • datumTypes

      protected String[] datumTypes()
      Overrides:
      datumTypes in class net.solarnetwork.domain.datum.GeneralDatum
    • getControlId

      public String getControlId()
      Specified by:
      getControlId in interface net.solarnetwork.domain.NodeControlInfo
    • getPropertyName

      public String getPropertyName()
      Specified by:
      getPropertyName in interface net.solarnetwork.domain.NodeControlInfo
    • getType

      public net.solarnetwork.domain.NodeControlPropertyType getType()
      Specified by:
      getType in interface net.solarnetwork.domain.NodeControlInfo
    • getValue

      public String getValue()
      Specified by:
      getValue in interface net.solarnetwork.domain.NodeControlInfo
    • getReadonly

      public Boolean getReadonly()
      Specified by:
      getReadonly in interface net.solarnetwork.domain.NodeControlInfo
    • getUnit

      public String getUnit()
      Specified by:
      getUnit in interface net.solarnetwork.domain.NodeControlInfo