Package org.bonitasoft.engine.archive
Interface ArchiveService
-
- All Known Implementing Classes:
ArchiveServiceImpl
public interface ArchiveService- Since:
- 6.0
- Author:
- Feng Hui, Matthieu Chaffotte
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intdeleteFromQuery(java.lang.String queryName, java.util.Map<java.lang.String,java.lang.Object> parameters)ReadPersistenceServicegetDefinitiveArchiveReadPersistenceService()Get the ReadPersistenceService corresponding to the definitive archivebooleanisArchivable(java.lang.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
-
-
-
Method Detail
-
recordInsert
void recordInsert(long time, ArchiveInsertRecord record) throws SRecorderExceptionArchive the given entity in sliding archive if relevant and in the appropriate definitive archive- Parameters:
time- The archive daterecord- Archive insert record containing the entity to be archived- Throws:
SRecorderException
-
recordInserts
void recordInserts(long time, ArchiveInsertRecord... records) throws SRecorderExceptionArchive the given entities in the definitive archive- Parameters:
time- the time of archivingrecords- Archive inserts record containing the entity to be archived- Throws:
SRecorderException- in case of a write error
-
recordDelete
void recordDelete(DeleteRecord record) throws SRecorderException
Remove 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- Parameters:
record- The delete record containing archived entity to be deleted- Throws:
SRecorderException
-
getDefinitiveArchiveReadPersistenceService
ReadPersistenceService getDefinitiveArchiveReadPersistenceService()
Get the ReadPersistenceService corresponding to the definitive archive- Returns:
- the ReadPersistenceService corresponding to the definitive archive
-
isArchivable
boolean isArchivable(java.lang.Class<? extends PersistentObject> sourceObjectClass)
- Parameters:
sourceObjectClass- Persistent object to be judged achievable or not- Returns:
- Return true if the objects of the given class can be archived.
-
deleteFromQuery
int deleteFromQuery(java.lang.String queryName, java.util.Map<java.lang.String,java.lang.Object> parameters) throws SRecorderException- Throws:
SRecorderException
-
-