Interface TurSNSiteMetricAccessRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<TurSNSiteMetricAccess, String>, org.springframework.data.jpa.repository.JpaRepository<TurSNSiteMetricAccess, String>, org.springframework.data.repository.ListCrudRepository<TurSNSiteMetricAccess, String>, org.springframework.data.repository.ListPagingAndSortingRepository<TurSNSiteMetricAccess, String>, org.springframework.data.repository.PagingAndSortingRepository<TurSNSiteMetricAccess, String>, org.springframework.data.repository.query.QueryByExampleExecutor<TurSNSiteMetricAccess>, org.springframework.data.repository.Repository<TurSNSiteMetricAccess, String>
public interface TurSNSiteMetricAccessRepository
extends org.springframework.data.jpa.repository.JpaRepository<TurSNSiteMetricAccess, String>
- Since:
- 0.3.6
- Author:
- Alexandre Oliveira
-
Method Summary
Modifier and TypeMethodDescriptionintcountTerms(TurSNSite turSNSite) intcountTermsByPeriod(TurSNSite turSNSite, Instant startDate, Instant endDate) findByTurSNSite(TurSNSite turSNSite) findByTurSNSiteAndLanguage(TurSNSite turSNSite, String language) findLastMinuteMetrics(String siteId, Instant since) findLatestSearches(TurSNSite turSNSite, String language, String userId, org.springframework.data.domain.Pageable pageable) topTermsBetweenDates(TurSNSite turSNSite, Instant startDate, Instant endDate, org.springframework.data.domain.Pageable pageable) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findLastMinuteMetrics
@Query("SELECT t FROM TurSNSiteMetricAccess t WHERE t.turSNSite.id = :siteId AND t.accessDate >= :since ORDER BY t.accessDate ASC") List<TurSNSiteMetricAccess> findLastMinuteMetrics(@Param("siteId") String siteId, @Param("since") Instant since) -
findLatestSearches
@Query("select distinct new com.viglet.turing.persistence.repository.sn.metric.TurSNSiteMetricAccessTerm(sanatizedTerm, max(accessDate)) from TurSNSiteMetricAccess where turSNSite = ?1 and language = ?2 and userId = ?3 GROUP BY sanatizedTerm ORDER BY MAX(accessDate) DESC") List<TurSNSiteMetricAccessTerm> findLatestSearches(TurSNSite turSNSite, String language, String userId, org.springframework.data.domain.Pageable pageable) -
topTerms
@Query("select distinct new com.viglet.turing.persistence.repository.sn.metric.TurSNSiteMetricAccessTerm(sanatizedTerm, COUNT(sanatizedTerm), AVG(CAST(numFound as double))) from TurSNSiteMetricAccess where turSNSite = ?1 GROUP BY sanatizedTerm ORDER BY COUNT(sanatizedTerm) DESC") List<TurSNSiteMetricAccessTerm> topTerms(TurSNSite turSNSite, org.springframework.data.domain.Pageable pageable) -
topTermsBetweenDates
@Query("select distinct new com.viglet.turing.persistence.repository.sn.metric.TurSNSiteMetricAccessTerm(sanatizedTerm, COUNT(sanatizedTerm), AVG(CAST(numFound as double))) from TurSNSiteMetricAccess where turSNSite = ?1 AND accessDate BETWEEN ?2 AND ?3 GROUP BY sanatizedTerm ORDER BY COUNT(sanatizedTerm) DESC") List<TurSNSiteMetricAccessTerm> topTermsBetweenDates(TurSNSite turSNSite, Instant startDate, Instant endDate, org.springframework.data.domain.Pageable pageable) -
countTerms
@Query("select COUNT(sanatizedTerm) from TurSNSiteMetricAccess where turSNSite = ?1") int countTerms(TurSNSite turSNSite) -
countTermsByPeriod
-
findByTurSNSiteAndLanguage
-
findByTurSNSite
-