@Service
public class AggregatedMovementService
extends java.lang.Object
Constructor and Description |
---|
AggregatedMovementService(AggregatedMovementRepository aggregatedMovementRepository) |
Modifier and Type | Method and Description |
---|---|
long |
getAggregatedMovementCountByAreaId(java.util.UUID monitoredAreaID,
java.time.Instant since,
java.time.Instant until,
@Min(value=0L) double minVelocity,
@Min(value=-1L) double maxVelocity)
Returns the number of movements that would be returned by a call to
getMovementsByAreaId
with the same arguments |
java.lang.Iterable<MovementView> |
getAggregatedMovementsByAreaId(java.util.UUID monitoredAreaID,
java.time.Instant since,
java.time.Instant until,
@Min(value=0L) double minVelocity,
@Min(value=-1L) double maxVelocity)
Returns movements filtered by the given criteria
|
MinMax |
getAggregatedVelocityRangeByArea(java.util.UUID monitoredAreaID,
java.time.Instant since,
java.time.Instant until)
Returns the smallest and larges velocity recorded in the given area.
|
@Autowired public AggregatedMovementService(AggregatedMovementRepository aggregatedMovementRepository)
public java.lang.Iterable<MovementView> getAggregatedMovementsByAreaId(java.util.UUID monitoredAreaID, java.time.Instant since, java.time.Instant until, @Min(value=0L) @Min(value=0L) double minVelocity, @Min(value=-1L) @Min(value=-1L) double maxVelocity)
monitoredAreaID
- the ID of the monitored are who movements should be returnedsince
- the time since when movements should be returneduntil
- the time until when movements should be returnedminVelocity
- minimum speed in pixels per second, points at which the speed was
lower will not be returnedmaxVelocity
- maximum speed in pixels per second (-1 for unlimited), points at
which the speed was higher will not be returnedpublic long getAggregatedMovementCountByAreaId(java.util.UUID monitoredAreaID, java.time.Instant since, java.time.Instant until, @Min(value=0L) @Min(value=0L) double minVelocity, @Min(value=-1L) @Min(value=-1L) double maxVelocity)
getMovementsByAreaId
with the same argumentsmonitoredAreaID
- the ID of the monitored are who movements should be returnedsince
- the time since when movements should be returneduntil
- the time until when movements should be returnedminVelocity
- minimum speed in pixels per second, points at which the speed was
lower will not be returnedmaxVelocity
- maximum speed in pixels per second (-1 for unlimited), points at
which the speed was higher will not be returned
recorded speed; points at which the speed was higher will not be returnedpublic MinMax getAggregatedVelocityRangeByArea(java.util.UUID monitoredAreaID, java.time.Instant since, java.time.Instant until)
monitoredAreaID
- the id of the monitored areasince
- the time since when movements should be returneduntil
- the time until when movements should be returned