@Repository(value="manifestItemRepo") public interface JpaManifestItemRepo extends org.springframework.data.jpa.repository.JpaRepository<ManifestItem,Long>
| Modifier and Type | Method and Description |
|---|---|
void |
deleteByAccountAndStoreIdAndSpaceId(String account,
String storeId,
String spaceId) |
int |
deleteFirst50000ByDeletedTrueAndModifiedBefore(Date expiration) |
ManifestItem |
findByAccountAndStoreIdAndSpaceIdAndContentId(String account,
String storeId,
String spaceId,
String contentId) |
List<ManifestItem> |
findByAccountAndStoreIdAndSpaceIdAndDeletedFalse(String account,
String storeId,
String spaceId,
long lastId,
int limit) |
org.springframework.data.domain.Page<ManifestItem> |
findByAccountAndStoreIdAndSpaceIdAndDeletedFalseOrderByContentIdAsc(String account,
String storeId,
String spaceId,
org.springframework.data.domain.Pageable pageable) |
long |
getMinId(String account,
String storeId,
String spaceId)
Returns the minimum id value for the specified data set.
|
Object[] |
getStorageStatsByAccountAndStoreIdAndSpaceId(String account,
String storeId,
String spaceId)
Returns an array with the following values: [item_count,byte_count]
|
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllorg.springframework.data.domain.Page<ManifestItem> findByAccountAndStoreIdAndSpaceIdAndDeletedFalseOrderByContentIdAsc(String account, String storeId, String spaceId, org.springframework.data.domain.Pageable pageable)
account - storeId - spaceId - pageable - @Query(nativeQuery=true,
value="select * from manifest_item where account = ?1 and store_id=?2 and space_id = ?3 and deleted = false and id > ?4 order by id limit ?5")
List<ManifestItem> findByAccountAndStoreIdAndSpaceIdAndDeletedFalse(String account,
String storeId,
String spaceId,
long lastId,
int limit)
account - storeId - spaceId - lastId - The last id of the previous page. If there was no previous
page, we recommend that you use the minimum id minus 1 in the
unpaged set for optimum performance.limit - @Query(nativeQuery=true,
value="select ifnull(min(id),0) from manifest_item where account = ?1 and store_id=?2 and space_id = ?3 and deleted = false")
long getMinId(String account,
String storeId,
String spaceId)
account - storeId - spaceId - ManifestItem findByAccountAndStoreIdAndSpaceIdAndContentId(String account, String storeId, String spaceId, String contentId)
account - storeId - spaceId - contentId - @Modifying
@Query(nativeQuery=true,
value="delete from manifest_item where deleted = true and modified < ?1 limit 50000")
int deleteFirst50000ByDeletedTrueAndModifiedBefore(Date expiration)
expiration - void deleteByAccountAndStoreIdAndSpaceId(String account, String storeId, String spaceId)
@Query(nativeQuery=true,
value="select count(*) objectCount, sum(content_size) as byteCount from manifest_item where account = :account and store_id = :storeId and space_id= :spaceId and deleted=false")
Object[] getStorageStatsByAccountAndStoreIdAndSpaceId(@Param(value="account")
String account,
@Param(value="storeId")
String storeId,
@Param(value="spaceId")
String spaceId)
account - storeId - spaceId - Copyright © 2015–2020 LYRASIS. All rights reserved.