public class ArchiveServiceImpl extends java.lang.Object implements ArchiveService
| Constructor and Description |
|---|
ArchiveServiceImpl(PersistenceService definitiveArchivePersistenceService,
TechnicalLoggerService logger,
ArchivingStrategy archivingStrategy,
UserTransactionService transactionService) |
| Modifier and Type | Method and Description |
|---|---|
protected BatchArchiveCallable |
buildBatchArchiveCallable(ArchiveInsertRecord... records) |
int |
deleteFromQuery(java.lang.String queryName,
java.util.Map<java.lang.String,java.lang.Object> parameters) |
ReadPersistenceService |
getDefinitiveArchiveReadPersistenceService()
Get the ReadPersistenceService corresponding to the definitive archive
|
boolean |
isArchivable(java.lang.Class<? extends PersistentObject> sourceObjectClass) |
void |
recordDelete(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.
|
void |
recordInsert(long time,
ArchiveInsertRecord record)
Archive the given entity in sliding archive if relevant and in the appropriate definitive archive
|
void |
recordInserts(long time,
ArchiveInsertRecord... records)
Archive the given entities in the definitive archive
|
public ArchiveServiceImpl(PersistenceService definitiveArchivePersistenceService, TechnicalLoggerService logger, ArchivingStrategy archivingStrategy, UserTransactionService transactionService)
public void recordInsert(long time,
ArchiveInsertRecord record)
throws SRecorderException
ArchiveServicerecordInsert in interface ArchiveServicetime - The archive daterecord - Archive insert record containing the entity to be archivedSRecorderExceptionpublic void recordInserts(long time,
ArchiveInsertRecord... records)
throws SRecorderException
ArchiveServicerecordInserts in interface ArchiveServicetime - the time of archivingrecords - Archive inserts record containing the entity to be archivedSRecorderException - in case of a write errorprotected BatchArchiveCallable buildBatchArchiveCallable(ArchiveInsertRecord... records) throws SRecorderException
SRecorderExceptionpublic void recordDelete(DeleteRecord record) throws SRecorderException
ArchiveServicerecordDelete in interface ArchiveServicerecord - The delete record containing archived entity to be deletedSRecorderExceptionpublic boolean isArchivable(java.lang.Class<? extends PersistentObject> sourceObjectClass)
isArchivable in interface ArchiveServicesourceObjectClass - Persistent object to be judged achievable or notpublic ReadPersistenceService getDefinitiveArchiveReadPersistenceService()
ArchiveServicegetDefinitiveArchiveReadPersistenceService in interface ArchiveServicepublic int deleteFromQuery(java.lang.String queryName,
java.util.Map<java.lang.String,java.lang.Object> parameters)
throws SRecorderException
deleteFromQuery in interface ArchiveServiceSRecorderException