Interface ISearchDao

  • All Superinterfaces:<Search,​Long>,<Search,​Long>,<Search,​Long>,<Search>,<Search,​Long>

    public interface ISearchDao
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int countDeleted()  
      void deleteByPid​(Long theId)  
      Optional<Search> findByUuidAndFetchIncludes​(String theUuid)<Long> findDeleted​( thePage)<Long> findWhereCreatedBefore​(Date theCutoff, Date theNow, thePage)  
      Collection<Search> findWithCutoffOrExpiry​(String theResourceType, int theHashCode, Date theCreatedCutoff)  
      void updateDeleted​(Long thePid, boolean theDeleted)  
      • Methods inherited from interface

        count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
      • Methods inherited from interface

        deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
      • Methods inherited from interface

      • Methods inherited from interface

        count, exists, findAll, findOne
    • Method Detail

      • findWhereCreatedBefore

        @Query("SELECT s.myId FROM Search s WHERE (s.myCreated < :cutoff) AND (s.myExpiryOrNull IS NULL OR s.myExpiryOrNull < :now) AND (s.myDeleted IS NULL OR s.myDeleted = FALSE)")<LongfindWhereCreatedBefore​(@Param("cutoff")
                                                                           Date theCutoff,
                                                                           Date theNow,
      • findDeleted

        @Query("SELECT s.myId FROM Search s WHERE s.myDeleted = TRUE")<LongfindDeleted​( thePage)
      • findWithCutoffOrExpiry

        @Query("SELECT s FROM Search s WHERE s.myResourceType = :type AND mySearchQueryStringHash = :hash AND (s.myCreated > :cutoff) AND s.myDeleted = false AND s.myStatus <> \'FAILED\'")
                                                  String theResourceType,
                                                  int theHashCode,
                                                  Date theCreatedCutoff)
      • countDeleted

        @Query("SELECT COUNT(s) FROM Search s WHERE s.myDeleted = TRUE")
        int countDeleted()
      • updateDeleted

        @Query("UPDATE Search s SET s.myDeleted = :deleted WHERE s.myId = :pid")
        void updateDeleted​(@Param("pid")
                           Long thePid,
                           boolean theDeleted)
      • deleteByPid

        @Query("DELETE FROM Search s WHERE s.myId = :pid")
        void deleteByPid​(@Param("pid")
                         Long theId)