@Override public void recordInsert(final long time, final ArchiveInsertRecord record) throws SRecorderException { if (isArchivable(record.getEntity().getPersistentObjectInterface())) { recordInserts(time, record); } }
@Override public void recordDelete(final DeleteRecord record) throws SRecorderException { String methodName = "recordDelete"; try { logBeforeMethod(TechnicalLogSeverity.TRACE, methodName); definitiveArchivePersistenceService.delete(record.getEntity()); logAfterMethod(TechnicalLogSeverity.TRACE, methodName); } catch (final SPersistenceException e) { logOnExceptionMethod(TechnicalLogSeverity.TRACE, methodName, e); throw new SRecorderException(e); } }
private void assignArchiveDate(final long time, final ArchiveInsertRecord... records) throws SRecorderException { for (final ArchiveInsertRecord record : records) { if (record != null) { setArchiveDate(record.getEntity(), time); } } }
@Override public void recordInserts(final long time, final ArchiveInsertRecord... records) throws SRecorderException { final String methodName = "recordInserts"; logBeforeMethod(TechnicalLogSeverity.TRACE, methodName); if (records != null) { assignArchiveDate(time, records); final BatchArchiveCallable callable = buildBatchArchiveCallable(records); try { transactionService.registerBeforeCommitCallable(callable); } catch (final STransactionNotFoundException e) { if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.TRACE)) { logger.log(this.getClass(), TechnicalLogSeverity.ERROR, "Unable to register the beforeCommitCallable to log queriable logs: transaction not found", e); } } } logAfterMethod(TechnicalLogSeverity.TRACE, methodName); }
@Override public void recordInserts(final long time, final ArchiveInsertRecord... records) throws SRecorderException { final String methodName = "recordInserts"; logBeforeMethod(TechnicalLogSeverity.TRACE, methodName); if (records != null) { assignArchiveDate(time, records); final BatchArchiveCallable callable = buildBatchArchiveCallable(records); try { transactionService.registerBeforeCommitCallable(callable); } catch (final STransactionNotFoundException e) { if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.TRACE)) { logger.log(this.getClass(), TechnicalLogSeverity.ERROR, "Unable to register the beforeCommitCallable to log queriable logs: transaction not found", e); } } } logAfterMethod(TechnicalLogSeverity.TRACE, methodName); }
@Override public void recordDelete(final DeleteRecord record) throws SRecorderException { String methodName = "recordDelete"; try { logBeforeMethod(TechnicalLogSeverity.TRACE, methodName); definitiveArchivePersistenceService.delete(record.getEntity()); logAfterMethod(TechnicalLogSeverity.TRACE, methodName); } catch (final SPersistenceException e) { logOnExceptionMethod(TechnicalLogSeverity.TRACE, methodName, e); throw new SRecorderException(e); } }
@Override public void recordInsert(final long time, final ArchiveInsertRecord record) throws SRecorderException { if (isArchivable(record.getEntity().getPersistentObjectInterface())) { recordInserts(time, record); } }
private void assignArchiveDate(final long time, final ArchiveInsertRecord... records) throws SRecorderException { for (final ArchiveInsertRecord record : records) { if (record != null) { setArchiveDate(record.getEntity(), time); } } }