public interface DetectedObjectMovementRepository extends org.springframework.data.repository.PagingAndSortingRepository<DetectedObjectMovement,java.util.UUID>
Modifier and Type | Method and Description |
---|---|
long |
getFilteredMovementCount(java.util.UUID monitoredAreaID,
boolean filterBySince,
java.time.Instant since,
boolean filterByUntil,
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
getFilteredMovements(UUID, boolean, Instant, boolean, Instant, double, double) getFilteredMovements}
with the same arguments
The filterBySince and filterByUntil parameters are needed due to known bugs in the
Hibernate adapter for PostgreSQL |
java.lang.Iterable<MovementView> |
getFilteredMovements(java.util.UUID monitoredAreaID,
boolean filterBySince,
java.time.Instant since,
boolean filterByUntil,
java.time.Instant until,
@Min(value=0L) double minVelocity,
@Min(value=-1L) double maxVelocity)
Returns movements filtered by the given criteria
The filterBySince and filterByUntil parameters are needed due to known bugs in the
Hibernate adapter for PostgreSQL
|
java.lang.Iterable<MovementWithTransitView> |
getFilteredMovementsWithTranistId(java.util.UUID monitoredAreaID,
boolean filterBySince,
java.time.Instant since,
boolean filterByUntil,
java.time.Instant until,
@Min(value=0L) double minVelocity,
@Min(value=-1L) double maxVelocity)
Returns movements along with their transit IDs filtered by the given criteria.
|
MinMax |
getVelocityRangeByArea(java.util.UUID monitoredAreaID,
boolean filterBySince,
java.time.Instant since,
boolean filterByUntil,
java.time.Instant until)
Returns the smallest and larges velocity recorded in the given area.
|
@Query(value="select new smartmobility.entity.views.MovementView(dom.positionX, dom.positionY) from DetectedObjectMovement dom join dom.transit where dom.transit.zoneSequence.area.id = ?1 and (?2 = false or dom.time >= ?3) and (?4 = false or dom.time < ?5) and dom.speed >= ?6 and (?7 = -1.0 or dom.speed <= ?7)") java.lang.Iterable<MovementView> getFilteredMovements(java.util.UUID monitoredAreaID, boolean filterBySince, java.time.Instant since, boolean filterByUntil, 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 returnedfilterBySince
- true if since is null, false otherwisesince
- the time since when movements should be returnedfilterByUntil
- true if after is null, false otherwiseuntil
- 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@Query(value="select new smartmobility.entity.views.MovementWithTransitView(dom.positionX, dom.positionY, dom.transit.id) from DetectedObjectMovement dom join dom.transit where dom.transit.zoneSequence.area.id = ?1 and (?2 = false or dom.time >= ?3) and (?4 = false or dom.time < ?5) and dom.speed >= ?6 and (?7 = -1.0 or dom.speed <= ?7)order by dom.transit.id, dom.time") java.lang.Iterable<MovementWithTransitView> getFilteredMovementsWithTranistId(java.util.UUID monitoredAreaID, boolean filterBySince, java.time.Instant since, boolean filterByUntil, 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 returnedfilterBySince
- true if since is null, false otherwisesince
- the time since when movements should be returnedfilterByUntil
- true if after is null, false otherwiseuntil
- 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@Query(value="select count(dom) from DetectedObjectMovement dom where dom.transit.zoneSequence.area.id = ?1 and (?2 = false or dom.time >= ?3) and (?4 = false or dom.time < ?5) and dom.speed >= ?6 and (?7 = -1.0 or dom.speed <= ?7)") long getFilteredMovementCount(java.util.UUID monitoredAreaID, boolean filterBySince, java.time.Instant since, boolean filterByUntil, java.time.Instant until, @Min(value=0L) @Min(value=0L) double minVelocity, @Min(value=-1L) @Min(value=-1L) double maxVelocity)
getFilteredMovements(UUID, boolean, Instant, boolean, Instant, double, double)
getFilteredMovements}
with the same arguments
The filterBySince and filterByUntil parameters are needed due to known bugs in the
Hibernate adapter for PostgreSQLmonitoredAreaID
- the ID of the monitored are who movements should be returnedfilterBySince
- true if since is null, false otherwisesince
- the time since when movements should be returnedfilterByUntil
- true if after is null, false otherwiseuntil
- 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@Query(value="select new smartmobility.util.MinMax(min(dom.speed), max(dom.speed)) from DetectedObjectMovement dom where dom.transit.zoneSequence.area.id = ?1 and (?2 = false or dom.time >= ?3) and (?4 = false or dom.time < ?5)") MinMax getVelocityRangeByArea(java.util.UUID monitoredAreaID, boolean filterBySince, java.time.Instant since, boolean filterByUntil, java.time.Instant until)
filterBySince
- true if since is null, false otherwisesince
- the time since when movements should be returnedfilterByUntil
- true if after is null, false otherwiseuntil
- the time until when movements should be returned