Package org.duracloud.mill.manifest.jpa
Class JpaManifestStore
- java.lang.Object
-
- org.duracloud.mill.manifest.jpa.JpaManifestStore
-
- All Implemented Interfaces:
ManifestStore
public class JpaManifestStore extends Object implements ManifestStore
- Author:
- Daniel Bernstein
-
-
Constructor Summary
Constructors Constructor Description JpaManifestStore(JpaManifestItemRepo manifestItemRepo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddUpdate(String account, String storeId, String spaceId, String contentId, String contentChecksum, String contentMimetype, String contentSize, Date eventTimestamp)voiddelete(String account, String storeId, String spaceId)booleanflagAsDeleted(String account, String storeId, String spaceId, String contentId, Date eventTimestamp)ManifestItemgetItem(String account, String storeId, String spaceId, String contentId)Iterator<ManifestItem>getItems(String account, String storeId, String spaceId)Iterator<ManifestItem>getItems(String account, String storeId, String spaceId, boolean ordered)Provides a method or ordering the resultsintpurgeDeletedItemsBefore(Date expiration)voidupdateMissingFromStorageProviderFlag(String account, String storeId, String spaceId, String contentId, boolean flag)
-
-
-
Constructor Detail
-
JpaManifestStore
@Autowired public JpaManifestStore(JpaManifestItemRepo manifestItemRepo)
-
-
Method Detail
-
addUpdate
@Transactional(value="millJpaRepoTransactionManager", propagation=REQUIRES_NEW) public boolean addUpdate(String account, String storeId, String spaceId, String contentId, String contentChecksum, String contentMimetype, String contentSize, Date eventTimestamp) throws ManifestItemWriteException- Specified by:
addUpdatein interfaceManifestStore- Returns:
- true if the store was updated; false if it was not (due to the update being out of order).
- Throws:
ManifestItemWriteException
-
flagAsDeleted
@Transactional(value="millJpaRepoTransactionManager", propagation=REQUIRES_NEW) public boolean flagAsDeleted(String account, String storeId, String spaceId, String contentId, Date eventTimestamp) throws ManifestItemWriteException- Specified by:
flagAsDeletedin interfaceManifestStore- Returns:
- true if the store was updated; false if it was not (due to the update being out of order).
- Throws:
ManifestItemWriteException
-
getItems
public Iterator<ManifestItem> getItems(String account, String storeId, String spaceId)
- Specified by:
getItemsin interfaceManifestStore- Returns:
-
getItems
public Iterator<ManifestItem> getItems(String account, String storeId, String spaceId, boolean ordered)
Description copied from interface:ManifestStoreProvides a method or ordering the results- Specified by:
getItemsin interfaceManifestStore- Returns:
-
getItem
public ManifestItem getItem(String account, String storeId, String spaceId, String contentId) throws NotFoundException
- Specified by:
getItemin interfaceManifestStore- Returns:
- Throws:
NotFoundException
-
purgeDeletedItemsBefore
@Transactional(value="millJpaRepoTransactionManager", propagation=REQUIRES_NEW) public int purgeDeletedItemsBefore(Date expiration)- Specified by:
purgeDeletedItemsBeforein interfaceManifestStore- Returns:
- Count of items deleted.
-
updateMissingFromStorageProviderFlag
@Transactional(value="millJpaRepoTransactionManager", propagation=REQUIRES_NEW) public void updateMissingFromStorageProviderFlag(String account, String storeId, String spaceId, String contentId, boolean flag) throws ManifestItemWriteException- Specified by:
updateMissingFromStorageProviderFlagin interfaceManifestStore- Throws:
ManifestItemWriteException
-
delete
@Transactional(value="millJpaRepoTransactionManager", propagation=REQUIRES_NEW) public void delete(String account, String storeId, String spaceId) throws ManifestItemWriteException- Specified by:
deletein interfaceManifestStore- Throws:
ManifestItemWriteException
-
-