Package net.solarnetwork.central.dao
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 Summary
ConstructorsConstructorDescriptionAuditNodeServiceEntity(net.solarnetwork.domain.datum.DatumId id, net.solarnetwork.domain.datum.Aggregation aggregation, long count) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuditNodeServiceEntityaccumulativeAuditNodeService(Long nodeId, String service, Instant timestamp, long count) Create an accumulative "running total" audit datum.static AuditNodeServiceEntitydailyAuditNodeService(Long nodeId, String service, Instant timestamp, long count) Create a daily audit datum.booleandiffersFrom(AuditNodeServiceValue other) net.solarnetwork.domain.datum.AggregationGet time period associated with this audit value.longgetCount()Get the count value properties.Get the associated timestamp of this audit value.static AuditNodeServiceEntityhourlyAuditNodeService(Long nodeId, String service, Instant timestamp, long count) Create a hourly audit datum.booleanisSameAs(AuditNodeServiceValue other) Test if the properties of another object are the same as in this instance.static AuditNodeServiceEntitymonthlyAuditNodeService(Long nodeId, String service, Instant timestamp, long count) Create a monthly audit datum.toString()Methods inherited from class net.solarnetwork.dao.BasicIdentity
clone, compareTo, equals, getId, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.solarnetwork.central.domain.AuditNodeServiceValue
getNodeId, getServiceMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.solarnetwork.domain.Identity
getId, hasId
-
Constructor Details
-
AuditNodeServiceEntity
public AuditNodeServiceEntity(net.solarnetwork.domain.datum.DatumId id, net.solarnetwork.domain.datum.Aggregation aggregation, long count) Constructor.- Parameters:
id- the IDaggregation- the aggregationcount- 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 IDservice- the service nametimestamp- the timecount- 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 IDservice- the service nametimestamp- the timecount- 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 IDservice- the service nametimestamp- the timecount- 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 IDservice- the service nametimestamp- the timecount- the count- Returns:
- the audit entity
-
toString
-
isSameAs
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
- Specified by:
differsFromin interfacenet.solarnetwork.domain.Differentiable<AuditNodeServiceValue>
-
getTimestamp
Description copied from interface:AuditNodeServiceValueGet 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:
getTimestampin interfaceAuditNodeServiceValue- Returns:
- the timestamp for this datum
-
getAggregation
public net.solarnetwork.domain.datum.Aggregation getAggregation()Description copied from interface:AuditNodeServiceValueGet time period associated with this audit value.- Specified by:
getAggregationin interfaceAuditNodeServiceValue- Returns:
- the aggregation
-
getCount
public long getCount()Description copied from interface:AuditNodeServiceValueGet the count value properties.- Specified by:
getCountin interfaceAuditNodeServiceValue- Returns:
- the count
-