Class AuditNodeServiceEntity

java.lang.Object
net.solarnetwork.dao.BasicIdentity<net.solarnetwork.domain.datum.DatumId>
net.solarnetwork.central.dao.AuditNodeServiceEntity
All Implemented Interfaces:
Serializable, Cloneable, Comparable<net.solarnetwork.domain.datum.DatumId>, AuditNodeServiceValue, net.solarnetwork.domain.Differentiable<AuditNodeServiceValue>, net.solarnetwork.domain.Identity<net.solarnetwork.domain.datum.DatumId>

public class AuditNodeServiceEntity extends net.solarnetwork.dao.BasicIdentity<net.solarnetwork.domain.datum.DatumId> implements AuditNodeServiceValue, Cloneable, Serializable, net.solarnetwork.domain.Differentiable<AuditNodeServiceValue>
Audit node service entity.
See Also:
  • Constructor Details

    • AuditNodeServiceEntity

      public AuditNodeServiceEntity(net.solarnetwork.domain.datum.DatumId id, net.solarnetwork.domain.datum.Aggregation aggregation, long count)
      Constructor.
      Parameters:
      id - the ID
      aggregation - the aggregation
      count - the count
  • Method Details

    • hourlyAuditNodeService

      public static AuditNodeServiceEntity hourlyAuditNodeService(Long nodeId, String service, Instant timestamp, long count)
      Create a hourly audit datum.
      Parameters:
      nodeId - the node ID
      service - the service name
      timestamp - the time
      count - the count
      Returns:
      the audit entity
    • dailyAuditNodeService

      public static AuditNodeServiceEntity dailyAuditNodeService(Long nodeId, String service, Instant timestamp, long count)
      Create a daily audit datum.
      Parameters:
      nodeId - the node ID
      service - the service name
      timestamp - the time
      count - the count
      Returns:
      the audit entity
    • monthlyAuditNodeService

      public static AuditNodeServiceEntity monthlyAuditNodeService(Long nodeId, String service, Instant timestamp, long count)
      Create a monthly audit datum.
      Parameters:
      nodeId - the node ID
      service - the service name
      timestamp - the time
      count - the count
      Returns:
      the audit entity
    • accumulativeAuditNodeService

      public static AuditNodeServiceEntity accumulativeAuditNodeService(Long nodeId, String service, Instant timestamp, long count)
      Create an accumulative "running total" audit datum.
      Parameters:
      nodeId - the node ID
      service - the service name
      timestamp - the time
      count - the count
      Returns:
      the audit entity
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isSameAs

      public boolean isSameAs(AuditNodeServiceValue other)
      Test if the properties of another object are the same as in this instance.
      Parameters:
      other - the other entity to compare to
      Returns:
      true if the properties of this instance are equal to the other
    • differsFrom

      public boolean differsFrom(AuditNodeServiceValue other)
      Specified by:
      differsFrom in interface net.solarnetwork.domain.Differentiable<AuditNodeServiceValue>
    • getTimestamp

      public Instant getTimestamp()
      Description copied from interface: AuditNodeServiceValue
      Get the associated timestamp of this audit value.

      This value represents the point in time the count associated with this service were observed, collected, inferred, predicted, etc.

      This is a shortcut for getId().getTimestamp().

      Specified by:
      getTimestamp in interface AuditNodeServiceValue
      Returns:
      the timestamp for this datum
    • getAggregation

      public net.solarnetwork.domain.datum.Aggregation getAggregation()
      Description copied from interface: AuditNodeServiceValue
      Get time period associated with this audit value.
      Specified by:
      getAggregation in interface AuditNodeServiceValue
      Returns:
      the aggregation
    • getCount

      public long getCount()
      Description copied from interface: AuditNodeServiceValue
      Get the count value properties.
      Specified by:
      getCount in interface AuditNodeServiceValue
      Returns:
      the count