Class DeviceTelemetry
java.lang.Object
com.endurancetrio.data.common.model.entity.AuditableEntity
com.endurancetrio.data.common.model.entity.BaseEntity<Long>
com.endurancetrio.data.tracker.model.entity.DeviceTelemetry
- All Implemented Interfaces:
Serializable
The
DeviceTelemetry represents the telemetry data recorded by a device at a
specific time.
The DeviceTelemetry fields are defined as follows:
-
BaseEntity.getId()id : The unique identifier of theDeviceTelemetrythat is automatically generated and is the primary key. -
getAccount()account : The account that recorded this telemetry data -
getDevice()device : Identifier of the device that recorded this telemetry data -
getTime()time : The timestamp when the telemetry data was recorded -
getLatitude()latitude : The latitude coordinate within the telemetry data -
getLongitude()longitude : The longitude coordinate within the telemetry data -
isActive()active : Flag indicating whether the device is active -
AuditableEntity.getVersion()version : The version number for optimistic locking, inherited fromAuditableEntity. -
AuditableEntity.getCreatedAt()createdAt : The system timestamp of creation, inherited fromAuditableEntity. -
AuditableEntity.getUpdatedAt()updatedAt : The system timestamp of the last update, inherited fromAuditableEntity.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeviceTelemetry(TrackerAccount account, String device, Instant time, Double latitude, Double longitude, boolean active) -
Method Summary
Modifier and TypeMethodDescriptionbooleanEquality is based on the entity's identifier.getTime()inthashCode()booleanisActive()voidsetAccount(TrackerAccount account) voidsetActive(boolean active) voidvoidsetLatitude(Double latitude) voidsetLongitude(Double longitude) voidtoString()Methods inherited from class com.endurancetrio.data.common.model.entity.BaseEntity
getId, setIdMethods inherited from class com.endurancetrio.data.common.model.entity.AuditableEntity
getCreatedAt, getUpdatedAt, getVersion
-
Constructor Details
-
DeviceTelemetry
public DeviceTelemetry() -
DeviceTelemetry
public DeviceTelemetry(TrackerAccount account, String device, Instant time, Double latitude, Double longitude, boolean active)
-
-
Method Details
-
getAccount
-
setAccount
-
getDevice
-
setDevice
-
getTime
-
setTime
-
getLatitude
-
setLatitude
-
getLongitude
-
setLongitude
-
isActive
public boolean isActive() -
setActive
public void setActive(boolean active) -
equals
Description copied from class:BaseEntityEquality is based on the entity's identifier. Two entities are considered equal if they are of the same class and have the same non-null identifier.If the ID is null, we treat it as a transient (new) object. Transient objects are only equal if they are the exact same instance.
- Overrides:
equalsin classBaseEntity<Long>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseEntity<Long>
-
toString
-