Interface IResourceHistoryTableDao

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void deleteByPid​(Long theId)  
      ResourceHistoryTable findForIdAndVersionAndFetchProvenance​(long theId, long theVersion)  
      org.springframework.data.domain.Slice<Long> findForResourceId​(org.springframework.data.domain.Pageable thePage, Long theId, Long theDontWantVersion)  
      org.springframework.data.domain.Slice<Long> findIdsOfPreviousVersionsOfResourceId​(org.springframework.data.domain.Pageable thePage, Long theResourceId)  
      org.springframework.data.domain.Slice<Long> findIdsOfPreviousVersionsOfResources​(org.springframework.data.domain.Pageable thePage)  
      org.springframework.data.domain.Slice<Long> findIdsOfPreviousVersionsOfResources​(org.springframework.data.domain.Pageable thePage, String theResourceName)  
      void updateVersion​(long theId, long theOldVersion, long theNewVersion)  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findOne
    • Method Detail

      • findForIdAndVersionAndFetchProvenance

        @Query("SELECT t FROM ResourceHistoryTable t LEFT OUTER JOIN FETCH t.myProvenance WHERE t.myResourceId = :id AND t.myResourceVersion = :version")
        ResourceHistoryTable findForIdAndVersionAndFetchProvenance​(@Param("id")
                                                                   long theId,
                                                                   @Param("version")
                                                                   long theVersion)
      • findForResourceId

        @Query("SELECT t.myId FROM ResourceHistoryTable t WHERE t.myResourceId = :resId AND t.myResourceVersion != :dontWantVersion")
        org.springframework.data.domain.Slice<LongfindForResourceId​(org.springframework.data.domain.Pageable thePage,
                                                                      @Param("resId")
                                                                      Long theId,
                                                                      @Param("dontWantVersion")
                                                                      Long theDontWantVersion)
      • findIdsOfPreviousVersionsOfResourceId

        @Query("SELECT v.myId FROM ResourceHistoryTable v LEFT OUTER JOIN ResourceTable t ON (v.myResourceId = t.myId) WHERE v.myResourceVersion != t.myVersion AND t.myId = :resId")
        org.springframework.data.domain.Slice<LongfindIdsOfPreviousVersionsOfResourceId​(org.springframework.data.domain.Pageable thePage,
                                                                                          @Param("resId")
                                                                                          Long theResourceId)
      • findIdsOfPreviousVersionsOfResources

        @Query("SELECT v.myId FROM ResourceHistoryTable v LEFT OUTER JOIN ResourceTable t ON (v.myResourceId = t.myId) WHERE v.myResourceVersion != t.myVersion AND t.myResourceType = :restype")
        org.springframework.data.domain.Slice<LongfindIdsOfPreviousVersionsOfResources​(org.springframework.data.domain.Pageable thePage,
                                                                                         @Param("restype")
                                                                                         String theResourceName)
      • findIdsOfPreviousVersionsOfResources

        @Query("SELECT v.myId FROM ResourceHistoryTable v LEFT OUTER JOIN ResourceTable t ON (v.myResourceId = t.myId) WHERE v.myResourceVersion != t.myVersion")
        org.springframework.data.domain.Slice<LongfindIdsOfPreviousVersionsOfResources​(org.springframework.data.domain.Pageable thePage)
      • updateVersion

        @Modifying
        @Query("UPDATE ResourceHistoryTable r SET r.myResourceVersion = :newVersion WHERE r.myResourceId = :id AND r.myResourceVersion = :oldVersion")
        void updateVersion​(@Param("id")
                           long theId,
                           @Param("oldVersion")
                           long theOldVersion,
                           @Param("newVersion")
                           long theNewVersion)
      • deleteByPid

        @Modifying
        @Query("DELETE FROM ResourceHistoryTable t WHERE t.myId = :pid")
        void deleteByPid​(@Param("pid")
                         Long theId)