public interface WlanSessionRepository extends org.springframework.data.jpa.repository.JpaRepository<WlanSession,WlanSessionPK>
| Modifier and Type | Method and Description |
|---|---|
int |
closeOpenSessionsOf(long deviceId,
long endTime) |
int |
countByIdDeviceId(long deviceId) |
int |
countFilteredByIP(Long siteId,
String ipAddress) |
int |
countFilteredByMac(Long siteId,
String macAddress,
boolean activeOnly) |
int |
countFilteredByUser(Long siteId,
boolean voucher,
String loginName,
boolean activeOnly) |
int |
countFilteredByUserAndMac(Long siteId,
boolean voucher,
String loginName,
String macAddress,
boolean activeOnly) |
List<WlanSession> |
findByGuestId(String guestId) |
List<WlanSession> |
findFilteredByIP(Long siteId,
String ipAddress,
org.springframework.data.domain.Pageable pageable) |
List<WlanSession> |
findFilteredByMac(Long siteId,
String macAddress,
boolean activeOnly,
org.springframework.data.domain.Pageable pageable) |
List<WlanSession> |
findFilteredByUser(Long siteId,
boolean voucher,
String loginName,
boolean activeOnly,
org.springframework.data.domain.Pageable pageable) |
List<WlanSession> |
findFilteredByUserAndMac(Long siteId,
boolean voucher,
String loginName,
String macAddress,
boolean activeOnly,
org.springframework.data.domain.Pageable pageable) |
Stream<WlanSession> |
findOpenSessions() |
long |
totalClosedSessionTime(Principal principal) |
long |
totalOpenSessionTime(Principal principal,
long refTime) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllList<WlanSession> findByGuestId(String guestId)
@Modifying
@Query(value="update WlanSession s set s.logoutTime = ?2 where s.id.device.id = ?1 and s.logoutTime is null")
int closeOpenSessionsOf(long deviceId,
long endTime)
@Query(value="select sum(s.logoutTime - s.id.loginTime) from WlanSession s where s.logoutTime is not null and s.id.device.principal = :principal") long totalClosedSessionTime(Principal principal)
@Query(value="select sum(:refTime - s.id.loginTime) from WlanSession s where s.logoutTime is null and s.id.device.principal = :principal") long totalOpenSessionTime(Principal principal, long refTime)
int countByIdDeviceId(long deviceId)
@Query(value="select s from WlanSession s where s.logoutTime is null") @Lock(value=PESSIMISTIC_WRITE) Stream<WlanSession> findOpenSessions()
@Query(value="select count(s) from WlanSession s where s.id.device.principal.site.id = ?1 and s.id.device.principal.voucher = ?2 and s.id.device.principal.loginName = ?3 and (?4 = false or s.logoutTime is null)") int countFilteredByUser(Long siteId, boolean voucher, String loginName, boolean activeOnly)
@Query(value="select count(s) from WlanSession s where s.id.device.principal.site.id = ?1 and s.id.device.macAddress = ?2 and (?3 = false or s.logoutTime is null)") int countFilteredByMac(Long siteId, String macAddress, boolean activeOnly)
@Query(value="select count(s) from WlanSession s where s.id.device.principal.site.id = ?1 and s.deviceIP = ?2") int countFilteredByIP(Long siteId, String ipAddress)
@Query(value="select count(s) from WlanSession s where s.id.device.principal.site.id = ?1 and s.id.device.principal.voucher = ?2 and s.id.device.principal.loginName = ?3 and s.id.device.macAddress = ?4 and (?5 = false or s.logoutTime is null)") int countFilteredByUserAndMac(Long siteId, boolean voucher, String loginName, String macAddress, boolean activeOnly)
@Query(value="select s from WlanSession s where s.id.device.principal.site.id = ?1 and s.id.device.principal.voucher = ?2 and s.id.device.principal.loginName = ?3 and (?4 = false or s.logoutTime is null)") List<WlanSession> findFilteredByUser(Long siteId, boolean voucher, String loginName, boolean activeOnly, org.springframework.data.domain.Pageable pageable)
@Query(value="select s from WlanSession s where s.id.device.principal.site.id = ?1 and s.id.device.macAddress = ?2 and (?3 = false or s.logoutTime is null)") List<WlanSession> findFilteredByMac(Long siteId, String macAddress, boolean activeOnly, org.springframework.data.domain.Pageable pageable)
@Query(value="select s from WlanSession s where s.id.device.principal.site.id = ?1 and s.deviceIP = ?2") List<WlanSession> findFilteredByIP(Long siteId, String ipAddress, org.springframework.data.domain.Pageable pageable)
@Query(value="select s from WlanSession s where s.id.device.principal.site.id = ?1 and s.id.device.principal.voucher = ?2 and s.id.device.principal.loginName = ?3 and s.id.device.macAddress = ?4 and (?5 = false or s.logoutTime is null)") List<WlanSession> findFilteredByUserAndMac(Long siteId, boolean voucher, String loginName, String macAddress, boolean activeOnly, org.springframework.data.domain.Pageable pageable)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.