Interface AuditRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Audit,​Long>, org.springframework.data.jpa.repository.JpaRepository<Audit,​Long>, org.springframework.data.repository.PagingAndSortingRepository<Audit,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Audit>, org.springframework.data.repository.Repository<Audit,​Long>

    @Repository
    public interface AuditRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Audit,​Long>
    • Method Detail

      • getByUserUUID

        @Query("SELECT a FROM Audit a WHERE a.useruuid = ?1 AND a.created > ?2 ORDER BY a.created DESC")
        List<Audit> getByUserUUID​(String uuid,
                                  Date since)
      • getByClientsourcehost

        @Query("SELECT a FROM Audit a WHERE a.clientsourcehost = ?1 AND a.created > ?2 ORDER BY a.created DESC")
        List<Audit> getByClientsourcehost​(String clientsourcehost,
                                          Date since)
      • getByEventname

        @Query("SELECT a FROM Audit a WHERE a.eventname = ?1 AND a.created > ?2 ORDER BY a.created DESC")
        List<Audit> getByEventname​(String eventname,
                                   Date since)
      • getAllEventnames

        @Query("SELECT a.eventname FROM Audit a GROUP BY a.eventname")
        List<String> getAllEventnames()
      • getLastClientsourcehosts

        @Query("SELECT a.clientsourcehost FROM Audit a WHERE a.created > ?1 GROUP BY a.clientsourcehost, a.created ORDER BY a.created DESC")
        List<String> getLastClientsourcehosts​(Date since)
      • getByEventref

        @Query("SELECT a FROM Audit a WHERE a.eventref = ?1")
        Audit getByEventref​(String eventref)