@Service
public class AreaStatisticsService
extends java.lang.Object
Constructor and Description |
---|
AreaStatisticsService(ZoneSequenceStatisticsRepository zoneSequenceStatisticsRepository,
ZoneService zoneService,
NativeQueriesService nativeQueriesService) |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<StatisticsView> |
findAll()
Returns an iterable of all statistics in the database
|
AreaStatistics |
getAreaStatisticsView(java.util.UUID monitoredAreaID,
java.time.Instant since,
java.time.Instant until,
boolean activeOnly)
Returns an iterable that contains the number of vehicles that passed through the given
area during the given time interval, broken down per zone sequence
|
int |
getTotalVehiclePassed(java.util.UUID zoneSequenceID,
java.time.Instant since,
java.time.Instant until) |
java.lang.Iterable<TransitStatistics> |
getVehiclePassedByTransit(java.util.UUID monitoredAreaID,
java.time.Instant since,
java.time.Instant until,
boolean activeOnly)
Returns an iterable that contains the number of vehicles that passed through the given
area during the given time interval, broken down per zone sequence
|
TimeSeriesOfTransits |
getVehiclePassedByTransitAndTime(java.util.UUID monitoredAreaID,
java.time.Instant since,
java.time.Instant until,
boolean activeOnly,
TimeStepEnum step)
Returns an iterable that contains the number of vehicles that passed through the given
area during the given time interval, broken down per zone sequence and time period
|
@Autowired public AreaStatisticsService(ZoneSequenceStatisticsRepository zoneSequenceStatisticsRepository, ZoneService zoneService, NativeQueriesService nativeQueriesService)
public java.lang.Iterable<StatisticsView> findAll()
public java.lang.Iterable<TransitStatistics> getVehiclePassedByTransit(java.util.UUID monitoredAreaID, java.time.Instant since, java.time.Instant until, boolean activeOnly)
monitoredAreaID
- the ID of the areasince
- the start of the time intervaluntil
- the end of the time intervalactiveOnly
- if true, only statistics related to active zones will be returnedpublic int getTotalVehiclePassed(java.util.UUID zoneSequenceID, java.time.Instant since, java.time.Instant until)
public AreaStatistics getAreaStatisticsView(java.util.UUID monitoredAreaID, java.time.Instant since, java.time.Instant until, boolean activeOnly)
monitoredAreaID
- the ID of the areasince
- the start of the time intervaluntil
- the end of the time intervalactiveOnly
- if true, only statistics related to active zones will be returnedpublic TimeSeriesOfTransits getVehiclePassedByTransitAndTime(java.util.UUID monitoredAreaID, java.time.Instant since, java.time.Instant until, boolean activeOnly, TimeStepEnum step)
monitoredAreaID
- the zone sequencesince
- the start of the time intervaluntil
- the end of the time intervalactiveOnly
- if true, only active zones sequences are consideredstep
- time step by which statistics are aggregated