Class ArchiveServiceImpl
java.lang.Object
org.bonitasoft.engine.archive.impl.ArchiveServiceImpl
- All Implemented Interfaces:
ArchiveService
- Author:
- Matthieu Chaffotte, Hongwen Zang, Celine Souchet
-
Constructor Summary
ConstructorsConstructorDescriptionArchiveServiceImpl(PersistenceService definitiveArchivePersistenceService, ArchivingStrategy archivingStrategy, UserTransactionService transactionService) -
Method Summary
Modifier and TypeMethodDescriptionprotected BatchArchiveCallablebuildBatchArchiveCallable(ArchiveInsertRecord... records) intdeleteFromQuery(String queryName, Map<String, Object> parameters) Get the ReadPersistenceService corresponding to the definitive archivebooleanisArchivable(Class<? extends PersistentObject> sourceObjectClass) voidrecordDelete(DeleteRecord record) Remove the given entity from both sliding archive (if present) and the right archive level (if present) This operation should normally to be used.voidrecordInsert(long time, ArchiveInsertRecord record) Archive the given entity in sliding archive if relevant and in the appropriate definitive archivevoidrecordInserts(long time, ArchiveInsertRecord... records) Archive the given entities in the definitive archive
-
Constructor Details
-
ArchiveServiceImpl
public ArchiveServiceImpl(PersistenceService definitiveArchivePersistenceService, ArchivingStrategy archivingStrategy, UserTransactionService transactionService)
-
-
Method Details
-
recordInsert
Description copied from interface:ArchiveServiceArchive the given entity in sliding archive if relevant and in the appropriate definitive archive- Specified by:
recordInsertin interfaceArchiveService- Parameters:
time- The archive daterecord- Archive insert record containing the entity to be archived- Throws:
SRecorderException
-
recordInserts
Description copied from interface:ArchiveServiceArchive the given entities in the definitive archive- Specified by:
recordInsertsin interfaceArchiveService- Parameters:
time- the time of archivingrecords- Archive inserts record containing the entity to be archived- Throws:
SRecorderException- in case of a write error
-
buildBatchArchiveCallable
protected BatchArchiveCallable buildBatchArchiveCallable(ArchiveInsertRecord... records) throws SRecorderException - Throws:
SRecorderException
-
recordDelete
Description copied from interface:ArchiveServiceRemove the given entity from both sliding archive (if present) and the right archive level (if present) This operation should normally to be used. This is for admin purpose only- Specified by:
recordDeletein interfaceArchiveService- Parameters:
record- The delete record containing archived entity to be deleted- Throws:
SRecorderException
-
isArchivable
- Specified by:
isArchivablein interfaceArchiveService- Parameters:
sourceObjectClass- Persistent object to be judged achievable or not- Returns:
- Return true if the objects of the given class can be archived.
-
getDefinitiveArchiveReadPersistenceService
Description copied from interface:ArchiveServiceGet the ReadPersistenceService corresponding to the definitive archive- Specified by:
getDefinitiveArchiveReadPersistenceServicein interfaceArchiveService- Returns:
- the ReadPersistenceService corresponding to the definitive archive
-
deleteFromQuery
public int deleteFromQuery(String queryName, Map<String, Object> parameters) throws SRecorderException- Specified by:
deleteFromQueryin interfaceArchiveService- Throws:
SRecorderException
-